Create a chat completion with an open model. Set the OpenAI SDK base URL to https://api.munito.ai/inference/v1 and use your Munito API key. Both Authorization: Bearer and X-API-Key are accepted. Use stream for streamed output, tools for function calls, and response_format for structured output. Each model accepts its own parameters, media types, and limits, and the API answers 400 to a request outside them. Images and video can use inline data or validated remote URLs. Audio uses inline data only. Set store to true to retain the completion. Account limits can further restrict output.
AuthorizationBearer <token>Your Munito API key.
munito-service-tier?stringpriority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See Service tiers.
"standard""priority""standard""flex"munito-affinity?stringAn opaque token. Send it back with the next request of the conversation, so that the prompt cache can serve it. Without it, the API uses prompt_cache_key, x-session-affinity or user, or metadata.user_id on the Messages API, for the same purpose.
munito-overflow?stringoff, model, class or any: what may serve a chat request that its own capacity refuses. The response names the step that served it. Off by default. The request keeps its region, and you pay the price of the model that you asked for. Flex, background and free-tier requests do not overflow.
"off""off""model""class""any"munito-prompt-cache-isolation-key?stringA secret string of up to 256 characters. Requests with different keys never share the prompt cache. The body field prompt_cache_isolation_key does the same. See Prompt caching.
length <= 256prefer?"respond-async"respond-async: answer 202 at once. Then poll the location until the request finishes.
"respond-async"application/json- body
model*stringModel id from GET /models, e.g. qwen/qwen3.8-27b.
messages*array<>OpenAI-style messages. Content can contain text and media parts when the selected model supports them: image_url, video_url, or input_audio for an audio model. An input_audio part holds base64 data and its format (wav, mp3, flac, ogg, webm, m4a or mp4), at most 30 seconds of audio, and up to 4 parts in one request. Send a longer recording to POST /audio/transcriptions.
max_tokens?integerMaximum tokens to generate. Omit it to allow the output maximum of the model. A larger value uses that maximum.
temperature?numberSampling temperature (0–2). Omit it to use the default of the model.
stream?booleanStream tokens back as server-sent events.
falsetools?array<>OpenAI-style function tools the model may call (steer with tool_choice).
store?booleanPersist the completion for later retrieval via GET /chat/completions/{id}.
falseprompt_cache_isolation_key?stringA secret key. Requests with different keys never share the prompt cache. See Prompt caching.
length <= 256An OpenAI-compatible chat completion.
application/jsoncurl -X POST 'https://api.munito.ai/inference/v1/chat/completions' \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen/qwen3.8-27b",
"messages": [
{
"role": "user",
"content": "Explain intelligence sovereignty in one sentence."
}
],
"max_tokens": 512
}'{
"id": "chatcmpl-7f3c1a",
"object": "chat.completion",
"model": "qwen/qwen3.8-27b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Intelligence sovereignty is the ability to run, govern, and improve your own AI on infrastructure you control, with no foreign cloud in the loop."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 34,
"total_tokens": 52
}
}List chat completions GET
Lists the completions of your workspace that were created with store: true, oldest first by default. Page with after and limit.
Delete a chat completion DELETE
Deletes a completion that was created with store: true, before the 30-day retention window ends. A deleted completion can no longer be retrieved.