OpenAI-compatible chat completions via SSE or JSON
Authorization
BearerAuth AuthorizationBearer <token>
MagickMind API key (mm_...) or user JWT, sent as Authorization: Bearer <token>. /v1/chat/completions accepts an API key only. JWTs (not mm_ keys) may alternatively be passed as a ?token= query parameter.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system" } ], "model": "string" }'{ "choices": [ { "finish_reason": "string", "index": 0, "message": { "content": null, "name": "string", "role": "system", "tool_calls": [ { "property1": null, "property2": null } ] } } ], "created": 0, "id": "string", "model": "string", "object": "string"}{ "error": { "type": "string", "title": "string", "status": 0, "detail": "string", "instance": "string", "request_id": "string", "errors": [ { "field": "string", "message": "string" } ] }}{ "error": { "type": "string", "title": "string", "status": 0, "detail": "string", "instance": "string", "request_id": "string", "errors": [ { "field": "string", "message": "string" } ] }}