{"openapi":"3.0.0","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your Munito API key."},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Munito API key."}}},"info":{"title":"munito.ai API","version":"v1","description":"An OpenAI- and Anthropic-compatible inference API for open models. Point your existing client at munito.ai, name an open model, and choose where inference runs."},"servers":[{"url":"https://api.munito.ai/inference/v1","description":"Global"},{"url":"https://api.eu.munito.ai/inference/v1","description":"EU"},{"url":"https://api.us.munito.ai/inference/v1","description":"US"}],"paths":{"/systemone":{"post":{"operationId":"createDecision","summary":"Evaluate decisions","tags":["Decisions"],"description":"Evaluate Noul, Choice, and Score questions against one state, with a TypeSafe-compatible response. Use a TypeSafe SDK base URL of https://api.munito.ai/inference. perplexity-ai/pplx-decider-v1.2 answers every question of a request in one pass, with calibrated probabilities. blockbrain/cygnet uses one pass for each question, and each pass counts as one request against the rate limit. A request over the limit gets 429 before any pass runs. Billing counts only a request that answers. Requests are synchronous; streaming and respond-async are unavailable. perplexity-ai/pplx-decider-v1.2 also accepts up to 8 images as base64 data URLs (JPEG, PNG, GIF, or WebP); it scales each image to at most 1.6 megapixels, about 1,000 input tokens per megapixel. An image link instead of a data URL gets 422. blockbrain/cygnet is text only.","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","state","questions"],"properties":{"model":{"type":"string","description":"A decision model available to your account."},"state":{"description":"The state to evaluate, as a string, object, or array.","oneOf":[{"type":"string"},{"type":"object"},{"type":"array","items":{}}]},"images":{"type":"array","description":"perplexity-ai/pplx-decider-v1.2 only: up to 8 images as base64 data URLs (data:image/png;base64,...), each up to 10 MB. Image links are not supported.","items":{"type":"string"}},"questions":{"type":"object","minProperties":1,"maxProperties":64,"description":"Questions keyed by a caller-selected identifier. The response preserves each identifier.","additionalProperties":{"type":"object","required":["type","instructions"],"properties":{"type":{"type":"string","enum":["noul","choice","score"]},"instructions":{"description":"The question or rubric, as a string, object, or array.","oneOf":[{"type":"string"},{"type":"object"},{"type":"array","items":{}}]},"criteria":{"description":"Choice requires an object with 2–255 option identifiers and descriptions. Score requires an ordered array of 2–10 levels. Noul accepts optional true and false descriptions. On blockbrain/cygnet, more than 20 choices require multiple passes, which increases latency and changes probability semantics.","oneOf":[{"type":"object"},{"type":"array","items":{}}]}}}}}},"example":{"model":"perplexity-ai/pplx-decider-v1.2","state":"The payment failed.","questions":{"retry":{"type":"noul","instructions":"Did the payment fail?"}}}}}},"responses":{"200":{"description":"Answers keyed by question identifier and aggregate input/output token usage. Noul returns a probability. Choice returns the selected option, probabilities, and confidence. Score returns the expected level index, legend, probabilities, and confidence.","content":{"application/json":{"example":{"model":"perplexity-ai/pplx-decider-v1.2","answers":{"retry":{"type":"noul","noul":0.96}},"usage":{"input_tokens":100,"output_tokens":0}}}}},"401":{"description":"Authentication failed. The response contains a detail field."},"422":{"description":"Invalid request or unavailable decision model. The response contains a detail field."},"429":{"description":"Rate limit exceeded. Retry according to the Retry-After header."},"529":{"description":"Temporary capacity failure. Retry according to the Retry-After header."}}}},"/decisions":{"post":{"operationId":"createOpenAIDecision","summary":"Create a decision (OpenAI format)","tags":["Decisions"],"description":"OpenAI's Decisions contract: ordered Predicate, Choice, and Score questions about one input, answered in the same order with probabilities. Use an OpenAI base URL of https://api.munito.ai/inference/v1 and call this path over HTTP. The models, rate limits, billing, and errors are those of Evaluate decisions, with OpenAI error envelopes. perplexity-ai/pplx-decider-v1.2 accepts up to 8 input_image parts whose image_url is a base64 data URL; an image link gets 400. blockbrain/cygnet is text only, and a request with an image gets 400.","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input","questions"],"properties":{"model":{"type":"string","description":"A decision model available to your account."},"input":{"description":"A string, or user messages whose content is a string or input_text and input_image parts. Images go to perplexity-ai/pplx-decider-v1.2 only.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"questions":{"type":"array","description":"1 to 64 questions, in answer order.","items":{"type":"object","required":["type","instructions"],"properties":{"type":{"type":"string","enum":["predicate","choice","score"]},"instructions":{"type":"string","description":"The question or rubric."},"name":{"type":"string","description":"An optional name, returned with the answer."},"choices":{"type":"array","description":"Choice only: 2 to 255 distinct values (string or boolean), each with an optional description.","items":{"type":"object","required":["value"]}},"levels":{"type":"array","description":"Score only: 2 to 10 ordered levels, lowest first, each with a label and an optional description.","items":{"type":"object","required":["label"]}}}}},"safety_identifier":{"type":"string","description":"Up to 128 characters. Accepted and not used."}}},"example":{"model":"perplexity-ai/pplx-decider-v1.2","input":"The parcel arrived with a crushed corner and the mug inside is broken.","questions":[{"type":"predicate","instructions":"Is the item damaged?"},{"type":"choice","instructions":"What should we offer?","choices":[{"value":"refund"},{"value":"replacement"}]}]}}}},"responses":{"200":{"description":"Answers in question order. A predicate returns its probability. A choice returns the chosen value, its confidence, and the probability of each value. A score returns the expected level, its confidence, and the probability of each level.","content":{"application/json":{"example":{"model":"perplexity-ai/pplx-decider-v1.2","answers":[{"type":"predicate","name":null,"probability":0.99},{"type":"choice","name":null,"choice":"replacement","confidence":0.21,"probabilities":[{"value":"refund","probability":0.39},{"value":"replacement","probability":0.61}]}],"usage":{"input_tokens":138,"output_tokens":0,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens_details":{"reasoning_tokens":0},"total_tokens":138}}}}},"400":{"description":"Invalid request or unavailable decision model, in an OpenAI error envelope."},"401":{"description":"Authentication failed, in an OpenAI error envelope."},"429":{"description":"Rate limit exceeded. Retry according to the Retry-After header."}}}},"/chat/completions":{"get":{"operationId":"listChatCompletions","summary":"List chat completions","tags":["Completions"],"description":"Lists the completions of your workspace that were created with `store: true`, oldest first by default. Page with `after` and `limit`.","parameters":[{"name":"model","in":"query","description":"Only completions of this model.","schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Only completions whose `metadata` holds each given pair, as `metadata[key1]=value1&metadata[key2]=value2`.","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"after","in":"query","description":"The id of the last completion of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of completions to return, from 1 to 100.","schema":{"type":"integer","default":20}},{"name":"order","in":"query","description":"Sort by creation time.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"A page of stored chat completions.","content":{"application/json":{"example":{"object":"list","data":[{"id":"chatcmpl-7f3c1a","object":"chat.completion","model":"qwen/qwen3.8-27b","metadata":{"team":"research"},"choices":[{"index":0,"message":{"role":"assistant","content":"Data residency keeps every token in the EU."},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":9,"total_tokens":21}}],"first_id":"chatcmpl-7f3c1a","last_id":"chatcmpl-7f3c1a","has_more":false}}}}}},"post":{"operationId":"createChatCompletion","summary":"Chat completion","tags":["Completions"],"parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}},{"name":"munito-affinity","in":"header","description":"An 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.","schema":{"type":"string"}},{"name":"munito-overflow","in":"header","description":"off, 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.","schema":{"type":"string","enum":["off","model","class","any"],"default":"off"}},{"name":"prefer","in":"header","description":"`respond-async`: answer 202 at once. Then poll the `location` until the request finishes.","schema":{"type":"string","enum":["respond-async"]}}],"description":"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Model id from GET /models, e.g. `qwen/qwen3.8-27b`.","example":"qwen/qwen3.8-27b"},"messages":{"type":"array","description":"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.","items":{"type":"object","properties":{"role":{"type":"string","enum":["developer","system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"Content parts: `text`, `image_url`, `video_url`, `input_audio` or `file`."}],"nullable":true}}}},"max_tokens":{"type":"integer","description":"Maximum tokens to generate. Omit it to allow the output maximum of the model. A larger value uses that maximum."},"temperature":{"type":"number","description":"Sampling temperature (0–2). Omit it to use the default of the model."},"stream":{"type":"boolean","description":"Stream tokens back as server-sent events.","default":false},"tools":{"type":"array","description":"OpenAI-style function tools the model may call (steer with `tool_choice`).","items":{"type":"object"}},"store":{"type":"boolean","description":"Persist the completion for later retrieval via GET /chat/completions/{id}.","default":false}}},"example":{"model":"qwen/qwen3.8-27b","messages":[{"role":"user","content":"Explain intelligence sovereignty in one sentence."}],"max_tokens":512}}}},"responses":{"200":{"description":"An OpenAI-compatible chat completion.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"munito-affinity":{"description":"An 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.","schema":{"type":"string"}},"munito-overflow":{"description":"off, model, class or any: what may serve a chat request that its own capacity refuses. The response names the step that served it.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-output-tokens":{"description":"","schema":{"type":"string"}}},"content":{"application/json":{"example":{"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}}}}},"202":{"description":"Accepted, when the request sends `Prefer: respond-async`. Poll the `location` until it finishes.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"location":{"description":"Where the result or the redirect target is.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-output-tokens":{"description":"","schema":{"type":"string"}}}}}}},"/chat/completions/{completion_id}":{"delete":{"operationId":"deleteChatCompletion","summary":"Delete a chat completion","tags":["Completions"],"description":"Deletes a completion that was created with `store: true`, before the 30-day retention window ends. A deleted completion can no longer be retrieved.","parameters":[{"name":"completion_id","in":"path","required":true,"description":"The completion id to delete.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"example":{"id":"chatcmpl-7f3c1a","object":"chat.completion.deleted","deleted":true}}}},"404":{"description":"No completion with this id is stored in your workspace."}}},"get":{"operationId":"getChatCompletion","summary":"Retrieve a chat completion","tags":["Completions"],"description":"Returns a completion that was created with `store: true` or with `Prefer: respond-async`. A background completion answers 202 until it finishes. Pass ?stream=true to attach to its live stream, and send Last-Event-ID to resume after that event.","parameters":[{"name":"completion_id","in":"path","required":true,"description":"The completion id, e.g. `chatcmpl-7f3c1a`.","schema":{"type":"string"}},{"name":"stream","in":"query","description":"Attach to the live stream of a background completion.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The chat completion object."},"202":{"description":"The completion is still running. Poll again."},"404":{"description":"No completion with this id is stored in your workspace."}}},"post":{"operationId":"updateChatCompletion","summary":"Update a chat completion","tags":["Completions"],"description":"Replaces the `metadata` of a completion that was created with `store: true`. Metadata is the only field you can change. Send `null` to clear it.","parameters":[{"name":"completion_id","in":"path","required":true,"description":"The completion id to update.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["metadata"],"additionalProperties":false,"properties":{"metadata":{"type":"object","description":"Up to 16 string pairs, or `null`. A key has at most 64 characters, and a value at most 512 characters.","additionalProperties":{"type":"string"}}}},"example":{"metadata":{"team":"research"}}}}},"responses":{"200":{"description":"The chat completion object with the new metadata."},"400":{"description":"The body holds a field other than `metadata`, or the metadata is not valid."},"404":{"description":"No completion with this id is stored in your workspace."}}}},"/chat/completions/{completion_id}/messages":{"get":{"operationId":"listChatCompletionMessages","summary":"List chat completion messages","tags":["Completions"],"description":"Lists the request messages of a completion that was created with `store: true`, in the order of the request by default. A message with a list of content parts keeps the list in `content_parts`, and `content` holds its text.","parameters":[{"name":"completion_id","in":"path","required":true,"description":"The completion id.","schema":{"type":"string"}},{"name":"after","in":"query","description":"The id of the last message of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of messages to return, from 1 to 100.","schema":{"type":"integer","default":20}},{"name":"order","in":"query","description":"Sort by the position in the request.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"A page of the request messages.","content":{"application/json":{"example":{"object":"list","data":[{"id":"chatcmpl-7f3c1a-0","role":"user","content":"Why does data residency matter?","name":null,"content_parts":null}],"first_id":"chatcmpl-7f3c1a-0","last_id":"chatcmpl-7f3c1a-0","has_more":false}}}},"400":{"description":"`limit` or `order` is not valid."},"404":{"description":"No completion with this id is stored in your workspace."}}}},"/messages":{"post":{"operationId":"createMessage","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}},{"name":"munito-affinity","in":"header","description":"An 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.","schema":{"type":"string"}},{"name":"munito-overflow","in":"header","description":"off, 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.","schema":{"type":"string","enum":["off","model","class","any"],"default":"off"}}],"summary":"Create a message","tags":["Messages"],"description":"Generate a response with the Anthropic Messages API. The Anthropic SDK uses your Munito key through `X-API-Key`. Set its base URL to `https://api.munito.ai/inference`.\n\n- Send the conversation in `messages` and the system prompt in `system`.\n- Set `stream: true` for Anthropic SSE events.\n- Use `tools` and `tool_choice` for tool calls. Reasoning models can return `thinking` content blocks.\n- Set `thinking` to turn reasoning on (`enabled` or `adaptive`) or off (`disabled`). The API validates `budget_tokens` but does not enforce it. `max_tokens` bounds the whole answer.\n- The API accepts `cache_control`, `service_tier` and `speed: \"standard\"`, and they change nothing: it caches each prompt prefix, and the `munito-service-tier` header selects the tier. `speed: \"fast\"` is not available.\n\nThe API requires `max_tokens`. Values above the model's output maximum use that maximum. A response that reaches the cap returns `stop_reason: \"max_tokens\"`.\n\nRequests are stateless and billed per token. Use `/messages/count_tokens` to count input tokens without inference.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model","messages","max_tokens"],"properties":{"model":{"type":"string","description":"Model id from GET /models, e.g. `qwen/qwen3.8-27b`.","example":"qwen/qwen3.8-27b"},"messages":{"type":"array","description":"The conversation as Anthropic-style messages: `content` is a string or an array of content blocks.","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"Content blocks: `text`, `image`, `tool_use`, `tool_result` and `thinking`."}]}}}},"max_tokens":{"type":"integer","description":"Maximum tokens to generate. Required. Clamped to the model's output maximum."},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"`text` blocks."}],"description":"System prompt (top-level, Anthropic-style): a string or an array of `text` blocks."},"stream":{"type":"boolean","description":"Stream Anthropic SSE events (message_start … message_stop).","default":false},"tools":{"type":"array","description":"Anthropic-style tools the model may call (steer with `tool_choice`).","items":{"type":"object"}}}},"example":{"model":"qwen/qwen3.8-27b","max_tokens":512,"messages":[{"role":"user","content":"Explain intelligence sovereignty in one sentence."}]}}}},"responses":{"200":{"description":"An Anthropic-compatible message.","headers":{"request-id":{"description":"The id that Munito makes for each request, on the Messages routes. Quote it to support. Anthropic sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"munito-affinity":{"description":"An 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.","schema":{"type":"string"}},"munito-overflow":{"description":"off, model, class or any: what may serve a chat request that its own capacity refuses. The response names the step that served it.","schema":{"type":"string"}},"anthropic-ratelimit-requests-limit":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-requests-remaining":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-requests-reset":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-tokens-limit":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-tokens-remaining":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-tokens-reset":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-input-tokens-limit":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-input-tokens-remaining":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-input-tokens-reset":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-output-tokens-limit":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-output-tokens-remaining":{"description":"","schema":{"type":"string"}},"anthropic-ratelimit-output-tokens-reset":{"description":"","schema":{"type":"string"}}},"content":{"application/json":{"example":{"id":"msg_7f3c1a","type":"message","role":"assistant","model":"qwen/qwen3.8-27b","content":[{"type":"text","text":"Intelligence sovereignty is the ability to run, govern, and improve your own AI on infrastructure you control, with no foreign cloud in the loop."}],"stop_reason":"end_turn","usage":{"input_tokens":18,"output_tokens":34}}}}}}}},"/messages/count_tokens":{"post":{"operationId":"countMessageTokens","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}},{"name":"munito-affinity","in":"header","description":"An 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.","schema":{"type":"string"}}],"summary":"Count tokens","tags":["Messages"],"description":"Count the input tokens a Messages request would consume, without running it. Same request shape as POST /messages (minus `max_tokens`); free.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Model id from GET /models.","example":"qwen/qwen3.8-27b"},"messages":{"type":"array","description":"The conversation as Anthropic-style messages: `content` is a string or an array of content blocks.","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"Content blocks: `text`, `image`, `tool_use`, `tool_result` and `thinking`."}]}}}},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"`text` blocks."}],"description":"System prompt (top-level, Anthropic-style): a string or an array of `text` blocks."}}},"example":{"model":"qwen/qwen3.8-27b","messages":[{"role":"user","content":"Explain intelligence sovereignty in one sentence."}]}}}},"responses":{"200":{"description":"The input-token count.","content":{"application/json":{"example":{"input_tokens":18}}}}}}},"/responses":{"post":{"operationId":"createResponse","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}},{"name":"munito-affinity","in":"header","description":"An 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.","schema":{"type":"string"}},{"name":"munito-overflow","in":"header","description":"off, 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.","schema":{"type":"string","enum":["off","model","class","any"],"default":"off"}}],"summary":"Create a response","tags":["Responses"],"description":"Create a response with the OpenAI Responses API. Send a string or a list of items in `input`. Set the system prompt with `instructions`.\n\n- Continue a conversation with `previous_response_id`. The server restores its history from responses created with `store: true`.\n- Set `stream: true` to receive response events.\n- Set `background: true` to generate a response asynchronously, then poll or attach later. A background response is stored.\n- Use function `tools` or `text.format` with `json_schema` for structured output.\n\nA response is not stored by default, unlike OpenAI. Send `store: true` to keep it for 30 days. A `max_output_tokens` above the output maximum of the model uses that maximum.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","description":"Model id from GET /models, e.g. `qwen/qwen3.8-27b`.","example":"qwen/qwen3.8-27b"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"},"description":"Input items: messages, function calls and function-call outputs."}],"description":"The input: a plain string, or an array of input items (messages, function-call outputs)."},"instructions":{"type":"string","description":"System instructions for this response."},"previous_response_id":{"type":"string","description":"Continue from an earlier response. The server replays that conversation state."},"store":{"type":"boolean","description":"Keep the response for 30 days for later retrieval and for `previous_response_id`.","default":false},"stream":{"type":"boolean","description":"Stream semantic events back as server-sent events.","default":false},"background":{"type":"boolean","description":"Generate server-side and return immediately; poll or attach later. A background response is stored, so `store: false` with `background: true` answers 400.","default":false},"max_output_tokens":{"type":"integer","description":"Maximum output tokens to generate, capped at the model's output maximum."},"temperature":{"type":"number","description":"Sampling temperature (0–2)."},"tools":{"type":"array","description":"OpenAI-style function tools the model may call. A namespace tool groups function tools. The API accepts a hosted web search tool, and the model answers without a search.","items":{"type":"object"}}}},"example":{"model":"qwen/qwen3.8-27b","input":"Summarize the EU AI Act in one paragraph."}}}},"responses":{"200":{"description":"The response object: the same shape that the final response.completed stream event carries.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"munito-affinity":{"description":"An 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.","schema":{"type":"string"}},"munito-overflow":{"description":"off, model, class or any: what may serve a chat request that its own capacity refuses. The response names the step that served it.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-output-tokens":{"description":"","schema":{"type":"string"}}},"content":{"application/json":{"example":{"id":"resp_9f41c2d7b3a8","object":"response","status":"completed","model":"qwen/qwen3.8-27b","output":[{"type":"message","id":"msg_5b1e88a04c21","role":"assistant","status":"completed","content":[{"type":"output_text","text":"The EU AI Act is the first comprehensive AI law: a risk-based framework that bans a narrow set of unacceptable uses, imposes strict obligations on high-risk systems, adds transparency duties for general-purpose models, and phases in enforcement with fines of up to 7% of global turnover."}]}],"usage":{"input_tokens":12,"output_tokens":42,"total_tokens":54},"previous_response_id":null,"store":true}}}}}}},"/responses/{response_id}":{"get":{"operationId":"getResponse","summary":"Retrieve a response","tags":["Responses"],"description":"Returns a stored (or still-in-progress) response by id. For a background response that is still generating, pass ?stream=true&starting_after=N to attach to the live event stream, resuming after event N.","parameters":[{"name":"response_id","in":"path","required":true,"description":"The response id, e.g. `resp_9f41c2d7b3a8`.","schema":{"type":"string"}},{"name":"stream","in":"query","description":"Attach to the live event stream of an in-progress response.","schema":{"type":"boolean"}},{"name":"starting_after","in":"query","description":"Resume the stream after this event sequence number.","schema":{"type":"integer"}}],"responses":{"200":{"description":"The stored response object.","content":{"application/json":{"example":{"id":"resp_9f41c2d7b3a8","object":"response","status":"completed","model":"qwen/qwen3.8-27b","output":[{"type":"message","id":"msg_5b1e88a04c21","role":"assistant","status":"completed","content":[{"type":"output_text","text":"The EU AI Act is the first comprehensive AI law: …"}]}],"store":true}}}}}},"delete":{"operationId":"deleteResponse","summary":"Delete a response","tags":["Responses"],"description":"Deletes a stored response and its items ahead of the 30-day retention window. A deleted response can no longer be retrieved or chained via previous_response_id.","parameters":[{"name":"response_id","in":"path","required":true,"description":"The response id to delete.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"example":{"id":"resp_9f41c2d7b3a8","object":"response.deleted","deleted":true}}}}}}},"/responses/{response_id}/input_items":{"get":{"operationId":"listInputItems","summary":"List input items","tags":["Responses"],"description":"Lists the input items of this response. The items of an earlier response in a `previous_response_id` chain stay with that response: list them from its own id.","parameters":[{"name":"response_id","in":"path","required":true,"description":"The response id whose inputs to list.","schema":{"type":"string"}},{"name":"after","in":"query","description":"The id of the last item of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of items to return, from 1 to 100.","schema":{"type":"integer","default":20}},{"name":"order","in":"query","description":"`desc` lists the newest item first.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}],"responses":{"200":{"description":"The input items, in list order.","content":{"application/json":{"example":{"object":"list","data":[{"type":"message","id":"msg_in_77ab01","role":"user","content":[{"type":"input_text","text":"Summarize the EU AI Act in one paragraph."}]}],"has_more":false}}}},"400":{"description":"`limit` or `order` is not valid."}}}},"/responses/{response_id}/cancel":{"post":{"operationId":"cancelResponse","summary":"Cancel a background response","tags":["Responses"],"description":"Cancels an in-progress response created with `background: true`. Returns the response object with status cancelled.","parameters":[{"name":"response_id","in":"path","required":true,"description":"The background response to cancel.","schema":{"type":"string"}}],"responses":{"200":{"description":"The cancelled response object.","content":{"application/json":{"example":{"id":"resp_9f41c2d7b3a8","object":"response","status":"cancelled","model":"qwen/qwen3.8-27b","output":[]}}}}}}},"/audio/transcriptions":{"post":{"operationId":"createTranscription","summary":"Transcribe audio","tags":["Audio"],"parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}}],"description":"Turn speech into text with an audio model, in the request format of OpenAI's speech to text API. Set the OpenAI SDK base URL to https://api.munito.ai/inference/v1 and call `audio.transcriptions.create`.\n\n- Send one file of WAV, MP3, FLAC, OGG, WebM, MP4 or M4A audio, at most 25 MB and 60 minutes long.\n- Munito cuts a recording longer than 30 seconds at its quietest points, transcribes the clips, and joins their text in order.\n- `response_format` is `json` (the default) or `text`. Timestamps, word log probabilities and streaming are not available.\n\nThe answer bills input and output tokens at the chat prices of the model. One second of audio is 25 input tokens, and `usage` gives the audio tokens apart from the text tokens of the instructions.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"The audio file: WAV, MP3, FLAC, OGG, WebM, MP4 or M4A, at most 25 MB and 60 minutes."},"model":{"type":"string","description":"An audio model from GET /models, such as `google/gemma-4-12b`."},"language":{"type":"string","description":"The language of the audio as an ISO 639-1 code, such as `en` or `de`. Omit it to keep the language of the audio."},"prompt":{"type":"string","description":"Names and terms to spell correctly, at most 2,000 characters."},"response_format":{"type":"string","enum":["json","text"],"description":"`json` gives the text and the token usage. `text` gives the plain text."},"temperature":{"type":"number","description":"Sampling temperature from 0 to 1. Omit it for 0."}}},"example":{"file":"speech.mp3","model":"google/gemma-4-12b","language":"en"}}}},"responses":{"200":{"description":"The text of the recording. With `response_format: text`, the body is the plain text.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-input-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-output-tokens":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-output-tokens":{"description":"","schema":{"type":"string"}}},"content":{"application/json":{"example":{"text":"The invoice is due on 14 November, and the total is 1,250 euros.","usage":{"type":"tokens","input_tokens":412,"input_token_details":{"text_tokens":87,"audio_tokens":325},"output_tokens":19,"total_tokens":431}}},"text/plain":{"schema":{"type":"string","example":"The invoice is due on 14 November, and the total is 1,250 euros."}}}},"400":{"description":"The request is outside the contract: an unknown field, a format other than `json` or `text`, timestamps, streaming, a language that is not supported, a model without audio, or a file that does not decode."},"413":{"description":"The file is larger than 25 MB."},"504":{"description":"The transcription did not finish in time. Send a shorter recording."}}}},"/ocr":{"post":{"operationId":"createOcr","summary":"Run OCR","tags":["OCR"],"description":"Document-AI workload: send a handwritten, scanned, or printed document (PDF or image) by URL or as base64, and get clean, structured Markdown back. Billed per page.","parameters":[{"name":"munito-service-tier","in":"header","description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See [Service tiers](/reference/service-tiers).","schema":{"type":"string","enum":["priority","standard","flex"],"default":"standard"}},{"name":"prefer","in":"header","description":"`respond-async`: answer 202 at once. Then poll the `location` until the request finishes.","schema":{"type":"string","enum":["respond-async"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["document"],"additionalProperties":false,"properties":{"document":{"type":"object","required":["type"],"additionalProperties":false,"description":"The document to read, by `url` or as `base64` data.","properties":{"type":{"type":"string","enum":["url","base64"]},"url":{"type":"string","description":"The document URL, when `type` is `url`. Use a public https URL on port 443. The API follows up to 3 redirects to such URLs."},"data":{"type":"string","description":"The document as base64, when `type` is `base64`."},"filename":{"type":"string","description":"The file name. Optional. Munito AI reads the format from the bytes of the document."}}},"model":{"type":"string","description":"An OCR model id from GET /models. Omit it, or send `munito/ocr-auto`, to let Munito pick."},"pages":{"type":"array","items":{"type":"integer"},"description":"Zero-based page numbers to read, each one time, at most 1000. A negative or repeated number, or a number past the last page, answers 422. Omit it to read every page."},"tables":{"type":"object","additionalProperties":false,"description":"How to return each table.","properties":{"mode":{"type":"string","enum":["inline","extracted"],"default":"inline","description":"`inline` keeps each table in the page text. `extracted` moves it to `tables`."},"format":{"type":"string","enum":["markdown","html"],"default":"markdown"}}},"images":{"type":"object","additionalProperties":false,"description":"How to return each image on a page.","properties":{"annotate":{"type":"boolean","default":false,"description":"Read the text of each image into `alt_text`."},"include_base64":{"type":"boolean","default":false,"description":"Include each image as base64."},"limit":{"type":"integer","default":10,"description":"The maximum number of images on each page."},"min_size":{"type":"integer","default":64,"description":"Ignore an image smaller than this number of pixels on either side."}}},"confidence_scores":{"type":"boolean","default":false,"description":"Return a confidence per page."},"extract":{"type":"array","items":{"type":"string","enum":["header","footer","page_number","aside"]},"description":"Page parts to move from the page text into their own fields."},"preferred_region":{"type":"string","enum":["global","eu","us"],"description":"Where the request can run. Omit it to use the default region of the organization."}}},"example":{"document":{"type":"url","url":"https://example.com/invoice.pdf"},"model":"lightonai/lightonocr-3-4b"}}}},"responses":{"200":{"description":"The OCR result, when the request finishes within the synchronous wait.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-pages":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-pages":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-pages":{"description":"","schema":{"type":"string"}}}},"202":{"description":"Accepted. Poll the `location` until the request finishes.","headers":{"x-request-id":{"description":"The id that Munito makes for each request. Quote it to support. OpenAI sends the same header.","schema":{"type":"string"}},"munito-region":{"description":"The jurisdiction that served the request.","schema":{"type":"string"}},"munito-service-tier":{"description":"priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.","schema":{"type":"string"}},"x-ratelimit-over-limit":{"description":"yes when the request exceeded a rate limit and ran on spare capacity: a free seat of its own tier, or the flex band for background work and OCR. Fireworks sends the same header.","schema":{"type":"string"}},"location":{"description":"Where the result or the redirect target is.","schema":{"type":"string"}},"preference-applied":{"description":"RFC 7240: the preference that the server applied.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-requests":{"description":"","schema":{"type":"string"}},"x-ratelimit-limit-pages":{"description":"","schema":{"type":"string"}},"x-ratelimit-remaining-pages":{"description":"","schema":{"type":"string"}},"x-ratelimit-reset-pages":{"description":"","schema":{"type":"string"}}}}}}},"/ocr/{request_id}":{"get":{"operationId":"getOcr","summary":"Retrieve an OCR request","tags":["OCR"],"description":"Returns the state of an OCR request: `running` with the pages that are done, then `completed` with the full result, or `failed`, `cancelled` or `timed_out`.","parameters":[{"name":"request_id","in":"path","required":true,"description":"The request id from the `location` of the 202 answer.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request state, and the result when it is `completed`.","content":{"application/json":{"example":{"request_id":"5f0c2b8e-3a4d-4c61-9f27-0b8d1e6a7c42","status":"running","total":12,"completed":5,"pages":[]}}}},"404":{"description":"No OCR request with this id exists in your workspace."}}},"delete":{"operationId":"cancelOcr","summary":"Cancel an OCR request","tags":["OCR"],"description":"Cancels an OCR request that is still running.","parameters":[{"name":"request_id","in":"path","required":true,"description":"The OCR request to cancel.","schema":{"type":"string"}}],"responses":{"204":{"description":"The request is cancelled."},"404":{"description":"No OCR request with this id exists in your workspace."}}}},"/models":{"get":{"operationId":"listModels","summary":"List models","description":"List public models without a key, in the OpenAI format: `id`, `object`, `created`, and `owned_by`. A valid key also includes models available to your account. Invalid credentials return 401.","security":[{},{"BearerAuth":[]},{"ApiKeyAuth":[]}],"tags":["Models"],"parameters":[]}},"/models/{model}":{"get":{"operationId":"retrieveModel","summary":"Retrieve a model","description":"Return one model from the list, in the same format. Public models need no key. A valid key also permits account-specific models. An unavailable model returns 404 with the code `model_not_found`.","security":[{},{"BearerAuth":[]},{"ApiKeyAuth":[]}],"tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The model id, for example `qwen/qwen3.8-27b`. The slash stays in the path.","schema":{"type":"string"}}],"responses":{"200":{"description":"The model."},"404":{"description":"No model with this id is available to this request."}}}}}}