MessagesRequest
Anthropic Messages request. Anything Anthropic accepts passes through unchanged.
Properties
| Name | Type | Description |
|---|---|---|
| model | object | |
| models | object | |
| preset | string | `@preset/ |
| max_tokens | integer | Required by Anthropic unless a preset sets it. Caps the output and sizes the balance hold. |
| messages | array | |
| system | stringarray | |
| stream | boolean | Stream the answer as server-sent events. |
| auto | object | With `model: "auto"`: `tier_max` caps the tier the auto router may pick (fast < balanced < frontier). The router picks from the tiers in GET /v1/catalog `auto_router`, classifying the request locally |
| routing | object | The order this request tries the model's routes in, over the key's own setting: price (cheapest for us first, the default), latency (quickest first token lately) or throughput (most output tokens per |
| provider | object | OpenRouter-style `{"sort": "price" | "latency" | "throughput"}`, read as `routing`. Other members are ignored. |
| transforms | array | `["middle-out"]`: when the prompt plus room for the answer is longer than the model's context window, whole messages are dropped from the middle until it fits. Kept: system messages, the first user me |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/mensageiro-ai/json-schema/mensageiro-ai-messages-request-schema.json",
"title": "MessagesRequest",
"description": "Anthropic Messages request. Anything Anthropic accepts passes through unchanged.",
"x-generated": "2026-11-17",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/mensageiro-ai-openapi.json#/components/schemas/MessagesRequest",
"type": "object",
"required": [
"messages"
],
"properties": {
"model": {
"$ref": "#/$defs/ModelId"
},
"models": {
"$ref": "#/$defs/FallbackModels"
},
"preset": {
"type": "string",
"description": "`@preset/<name>`: one of your presets, merged under this request with `model` in place of the preset's."
},
"max_tokens": {
"type": "integer",
"description": "Required by Anthropic unless a preset sets it. Caps the output and sizes the balance hold."
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"system": {
"type": [
"string",
"array"
]
},
"stream": {
"type": "boolean",
"description": "Stream the answer as server-sent events."
},
"auto": {
"type": "object",
"description": "With `model: \"auto\"`: `tier_max` caps the tier the auto router may pick (fast < balanced < frontier). The router picks from the tiers in GET /v1/catalog `auto_router`, classifying the request locally (no extra model call): a reasoning ask or a high reasoning effort, or tools with code, goes to frontier; tools, code blocks, images, a json_schema answer or a prompt over 16,000 tokens to balanced; the rest to fast. The answer's `model` and x-uplink-model name the model chosen, x-uplink-auto-tier its tier, and it bills at that model's price. With an `x-session-id` header the same model answers that session for 30 minutes from its last request.",
"properties": {
"tier_max": {
"type": "string",
"enum": [
"fast",
"balanced",
"frontier"
]
}
}
},
"routing": {
"oneOf": [
{
"type": "string",
"enum": [
"price",
"latency",
"throughput",
"cheapest",
"fastest"
]
},
{
"type": "object",
"properties": {
"sort": {
"type": "string",
"enum": [
"price",
"latency",
"throughput"
]
}
}
}
],
"description": "The order this request tries the model's routes in, over the key's own setting: price (cheapest for us first, the default), latency (quickest first token lately) or throughput (most output tokens per second lately). The price you pay is the same whichever route answers."
},
"provider": {
"type": "object",
"description": "OpenRouter-style `{\"sort\": \"price\" | \"latency\" | \"throughput\"}`, read as `routing`. Other members are ignored.",
"additionalProperties": true
},
"transforms": {
"type": "array",
"items": {
"type": "string",
"enum": [
"middle-out"
]
},
"description": "`[\"middle-out\"]`: when the prompt plus room for the answer is longer than the model's context window, whole messages are dropped from the middle until it fits. Kept: system messages, the first user message and the latest turn; a tool call and its results go together. x-uplink-compressed says how many were dropped. `[]` turns a key's context_overflow default off for this request. The field is never sent on to the model."
}
},
"additionalProperties": true,
"$defs": {
"FallbackModels": {
"type": "array",
"maxItems": 5,
"items": {
"type": "string"
},
"description": "Up to 5 model ids or aliases tried in order after `model` once every route of the one before has failed before a byte was sent. Each is billed at its own price when it answers; the key's allowlist applies to each."
},
"ModelId": {
"type": "string",
"description": "A model id from GET /v1/catalog, one of your organization's aliases, `@preset/<name>` for one of its presets, or `auto` (also `uplink/auto` or `<brand>/auto`) to let the auto router pick; `auto/uncensored`, `auto/abliterated`, `auto/security` (also `auto/cyber`) and `auto/roleplay` pick only from that profile's lists in GET /v1/catalog `auto_router.profiles`. Not enumerated here."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/mensageiro-ai-messages-request"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.