curl https://mdb.ai/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer $MINDS_API_KEY" \-d '{ "model": "<name of the mind that you created>", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Can you summarize the data you have access to?" } ], "stream": false}'
Copy
Ask AI
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1702685778, "model": "<name of the mind that you created>", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "I have access to sales data, customer info, and website analytics. Let me know if you need details!" } } ], "usage": { "prompt_tokens": 9, "completion_tokens": 9, "total_tokens": 18 }, "system_fingerprint": null}
API Reference
Chat Completions
Copy
Ask AI
curl https://mdb.ai/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer $MINDS_API_KEY" \-d '{ "model": "<name of the mind that you created>", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Can you summarize the data you have access to?" } ], "stream": false}'
Copy
Ask AI
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1702685778, "model": "<name of the mind that you created>", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "I have access to sales data, customer info, and website analytics. Let me know if you need details!" } } ], "usage": { "prompt_tokens": 9, "completion_tokens": 9, "total_tokens": 18 }, "system_fingerprint": null}
This API endpoint creates a model response for the given chat conversation using the POST method.
This parameter controls the randomness of the output with values ranging from 0 to 2. A higher value increases randomness in the output, while a lower value, like 0.1, results in more focused and deterministic output.
curl https://mdb.ai/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer $MINDS_API_KEY" \-d '{ "model": "<name of the mind that you created>", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Can you summarize the data you have access to?" } ], "stream": false}'
Copy
Ask AI
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1702685778, "model": "<name of the mind that you created>", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "I have access to sales data, customer info, and website analytics. Let me know if you need details!" } } ], "usage": { "prompt_tokens": 9, "completion_tokens": 9, "total_tokens": 18 }, "system_fingerprint": null}