Create a message
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.
- Send the conversation in messages and the system prompt in system.
- Set stream: true for Anthropic SSE events.
- Use tools and tool_choice for tool calls. Reasoning models can return thinking content blocks.
- 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.
- 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.
The 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".
Requests are stateless and billed per token. Use /messages/count_tokens to count input tokens without inference.
Request
- Base URLhttps://api.munito.ai/inference/v1
- URLhttps://api.munito.ai/inference/v1/messages
- Auth
- HTTP bearer
- or API key in header x-api-key
Headers
priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See Service tiers.
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.
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.
Request body
Example request
{
"model": "qwen/qwen3.8-27b"
}Response
An Anthropic-compatible message.
Changes
No recorded changes to this operation across all 1 revision of this API.