Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.
POST
https://api.naga.ac
/
v1
/
messages
anthropic-python
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ["NAGA_API_KEY"],
base_url="https://api.naga.ac",
)
result = client.messages.create(
model="anthropic/claude-sonnet-5.5",
max_tokens=256,
messages=[
{
"role": "user",
"content": "Say hi."
}
],
)
print(result)
An account API key. Send it as Authorization: Bearer <key>.
Headers
x-naga-routing-strategy
enum<string>
The routing strategy when the body names none. An unknown name is ignored. A NagaAI extension.
The order in which NagaAI tries providers at the same price: reliability best recent success rate, balanced speed among near-best success, latency first token, throughput tokens per second, cache providers that read a cached prefix. A NagaAI extension.
Available options:
reliability,
balanced,
latency,
throughput,
cache
Body
application/json
The Anthropic-compatible Messages request. The gateway takes an unrecognized key and drops it.
model
string
required
The model to run, named by an id or alias from NagaAI's catalog. An entry without the chat.completions capability draws a refusal.
max_tokens
integer<int64>
required
The ceiling on generated tokens. Required, at least 1, and the gateway raises it where the reasoning budget would not fit.
Required range: x >= 1
messages
object[]
required
The conversation so far, oldest first: one to 100000 entries. A block sent under the wrong role draws a refusal.
Required array length: 1 - 100000 elements
Hide child attributes
messages.role
enum<string>
required
Whose turn this is, and what blocks it may carry.
Available options:
user,
assistant,
system
messages.content
List of content blocks · object[]string
required
What was said — one string, or at least one content block.
One entry of a message's content. The role decides which tags it admits.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Option 9
Option 10
Option 11
Option 12
Option 13
Option 14
Option 15
Option 16
Hide child attributes
messages.content.text
string
required
The text this block carries; the 20 MiB inline ceiling does not apply.
messages.content.type
enum<string>
required
The tag that selects this branch: type is text.
Available options:
text
messages.content.cache_control
object | null
A prompt-cache breakpoint: cache the prompt up to and including this block.
Hide child attributes
messages.content.cache_control.type
enum<string>
required
Always ephemeral.
Available options:
ephemeral
messages.content.cache_control.ttl
enum<string> | null
5m or 1h. Absent means 5m.
Available options:
5m,
1h
routing
object
How NagaAI picks the providers for this request: strategy reorders them, max_price removes the dearer ones and can fail the request. A NagaAI extension.
Hide child attributes
routing.strategy
enum<string>
Which provider NagaAI tries first among those at the same price. Absent: the x-naga-routing-strategy header, the key's default, the workspace's, else NagaAI's choice.
Available options:
reliability,
balanced,
latency,
throughput,
cache
routing.max_price
object
The most one unit of each named meter may cost. Absent: no price limit.
Hide child attributes
routing.max_price.token
stringnumber
Credits per token, either direction, without a meter of its own. A non-negative decimal, as a string or a number.
routing.max_price.input_token
stringnumber
Credits per prompt token without a meter of its own. A non-negative decimal, as a string or a number.
routing.max_price.output_token
stringnumber
Credits per output token without a meter of its own. A non-negative decimal, as a string or a number.
routing.max_price.cached_input_token
stringnumber
Credits per prompt token read from cache. A non-negative decimal, as a string or a number.
routing.max_price.cache_write_input_token
stringnumber
Credits per prompt token written to cache. A non-negative decimal, as a string or a number.
routing.max_price.cache_write_1h_input_token
stringnumber
Credits per prompt token cached for one hour. A non-negative decimal, as a string or a number.
routing.max_price.input_text_token
stringnumber
Credits per prompt text token. A non-negative decimal, as a string or a number.
routing.max_price.output_text_token
stringnumber
Credits per output text token. A non-negative decimal, as a string or a number.
routing.max_price.input_audio_token
stringnumber
Credits per input audio token. A non-negative decimal, as a string or a number.
routing.max_price.output_audio_token
stringnumber
Credits per output audio token. A non-negative decimal, as a string or a number.
routing.max_price.input_image_token
stringnumber
Credits per input image token. A non-negative decimal, as a string or a number.
routing.max_price.output_image_token
stringnumber
Credits per output image token. A non-negative decimal, as a string or a number.
routing.max_price.input_audio_hour
stringnumber
Credits per hour of input audio. A non-negative decimal, as a string or a number.
routing.max_price.output_audio_hour
stringnumber
Credits per hour of output audio. A non-negative decimal, as a string or a number.
routing.max_price.input_text_character
stringnumber
Credits per input text character. A non-negative decimal, as a string or a number.
routing.max_price.output_text_character
stringnumber
Credits per output text character. A non-negative decimal, as a string or a number.
routing.max_price.input_text_search
stringnumber
Credits per rerank search. A non-negative decimal, as a string or a number.
routing.max_price.output_image_image
stringnumber
Credits per delivered picture. A non-negative decimal, as a string or a number.
routing.max_price.request
stringnumber
Credits per request: the fee a request pays once. A non-negative decimal, as a string or a number.
routing.max_price.output_video_second
stringnumber
Credits per second of video. A non-negative decimal, as a string or a number.
routing.max_price.output_video_megapixel_second
stringnumber
Credits per megapixel-second of upscaled video. A non-negative decimal, as a string or a number.
Example:
{ "output_token": "0.000005" }
routing.precision
enum<string>[]
The weight precisions the model may be served in. Absent: any.
Minimum array length: 1
A weight precision a provider serves a model in, as it publishes it.
Available options:
int4,
int8,
fp4,
mxfp4,
nvfp4,
fp6,
fp8,
mxfp8,
fp16,
bf16,
fp32
fallbacks
object[] | null
Fallback models, tried in order when model cannot answer: none of its providers served it, or the request does not fit it. At most 3; the answer's model names the one that answered, and only that one is billed. A NagaAI extension in the shape of Anthropic's fallbacks.
Maximum array length: 3
Hide child attributes
fallbacks.model
string
required
The model to try, named by an id or alias from NagaAI's catalog.
system
List of text blocks · object[]string
The system prompt, as one string or as text blocks joined in order.
Hide child attributes
system.text
string
required
The text this block carries; the 20 MiB inline ceiling does not apply.
system.type
enum<string>
required
The tag that selects this branch: type is text.
Available options:
text
system.cache_control
object | null
A prompt-cache breakpoint: cache the prompt up to and including this block.
Hide child attributes
system.cache_control.type
enum<string>
required
Always ephemeral.
Available options:
ephemeral
system.cache_control.ttl
enum<string> | null
5m or 1h. Absent means 5m.
Available options:
5m,
1h
stream
boolean
default:false
Whether the reply arrives incrementally as the model writes it. An explicit null draws a refusal.
temperature
number<double> | null
How much randomness goes into the reply, between 0 and 2. A provider may still refuse a value this range allows.
Required range: 0 <= x <= 2
top_p
number<double> | null
The sampling cut-off, between 0 and 1, and an alternative to temperature.
Required range: 0 <= x <= 1
top_k
integer<int64> | null
How many top candidates each token is drawn from. It reaches only some providers.
stop_sequences
string[] | null
Strings that end generation the moment the model produces one. The reply never names which matched.
metadata
object | null
An object describing the request. Only user_id counts, and it reaches only some providers.
The tools the model may call. Two dated web-search stamps are the only hosted ones the gateway serves; the other eight families travel no further.
One entry of tools[], in one of the three shapes this dialect accepts.
Client tool
Web search tool
Hosted tool
Hide child attributes
tools.name
string
required
What the model calls the tool by, never empty.
tools.input_schema
object
required
A JSON Schema for the arguments the model must produce. Required, compiled at intake. A keyword the far side refuses travels no further.
Hide child attributes
tools.input_schema.{key}
any
tools.description
string | null
What the tool does, written for the model to choose by.
tools.strict
boolean | null
Whether the model's arguments follow input_schema exactly.
tools.cache_control
object | null
A prompt-cache breakpoint: cache the prompt up to and including this tool definition.
Hide child attributes
tools.cache_control.type
enum<string>
required
Always ephemeral.
Available options:
ephemeral
tools.cache_control.ttl
enum<string> | null
5m or 1h. Absent means 5m.
Available options:
5m,
1h
tool_choice
object
Which tool, if any, the model is to call.
Option 1
Option 2
Option 3
Option 4
Hide child attributes
tool_choice.type
enum<string>
required
The tag that selects this branch: type is auto.
Available options:
auto
tool_choice.disable_parallel_tool_use
boolean | null
Whether the model may ask for only one tool per turn. Absent leaves the question open.
thinking
object
How much reasoning the model does before answering. The budget becomes a tier: under 1024 draws a refusal, and output_config.effort wins over it.
Option 1
Option 2
Option 3
Hide child attributes
thinking.type
enum<string>
required
The tag that selects this branch: type is enabled.
Available options:
enabled
thinking.budget_tokens
integer<int64> | null
How many tokens the model may spend reasoning, and the value the tier follows from. Below 1024 draws a 400.
Required range: x >= 0
output_config
object | null
Configuration for the output: the reasoning tier, and a schema the reply must satisfy.
Hide child attributes
output_config.effort
enum<string> | null
The effort tier to ask the provider for. It overrides whatever thinking asked for.
Available options:
low,
medium,
high,
xhigh,
max
output_config.format
object | null
The JSON shape the answer must satisfy. Only json_schema passes, and its schema may be null.
Hide child attributes
output_config.format.{key}
any
truncation
enum<string> | null
auto lets NagaAI drop whole turns from the middle of a conversation that does not fit the model's context window, keeping the system prompt, the first and the latest turn; disabled, the default, refuses it with context_length_exceeded. A NagaAI extension, the same key as in the Responses API.
Available options:
auto,
disabled
cache_control
object | null
Automatic prompt caching: one breakpoint on the last block that can be cached, moving forward as the conversation grows. It takes one of the four breakpoint slots.
Hide child attributes
cache_control.type
enum<string>
required
Always ephemeral.
Available options:
ephemeral
cache_control.ttl
enum<string> | null
5m or 1h. Absent means 5m.
Available options:
5m,
1h
Response
The message. application/json carries one message object; text/event-stream carries the event-typed frames of the stream.
Option 1
Option 2
The message. The gateway answers a request it does not forward with the second shape, which omits container and stop_details and adds created.
id
string
required
This answer's identifier.
type
string
required
What kind of object this is. Always message.
role
string
required
Who wrote it. Always assistant.
content
object[]
required
The answer itself, block by block.
One block of the answer's content, in the order the model produced it.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Hide child attributes
content.thinking
string
required
The reasoning, as text meant to be read.
content.signature
string
required
An opaque token vouching for the reasoning it accompanies, replayed unchanged.
content.type
enum<string>
required
The tag that selects this branch: type is thinking.
Available options:
thinking
model
string
required
The model that answered, by its id in the NagaAI catalog.
stop_reason
string | null
required
Why the model stopped, in one of four values.
stop_sequence
null
required
Always null. Stop sequences are not reported back, which is why stop_reason is never stop_sequence either.
stop_details
null
required
Always null. stop_reason carries the whole of what is known about why the turn ended.
container
null
required
Always null. Code-execution containers are not served.
usage
object
required
What the request cost in tokens.
Hide child attributes
usage.input_tokens
integer<int64>
required
Tokens of the prompt read fresh, cache reads excluded.
usage.output_tokens
integer<int64>
required
Tokens the model generated, its reasoning included.
usage.cache_creation
object | null
required
The cache write split by lifetime, or null when the request wrote nothing to the cache.
Hide child attributes
usage.cache_creation.ephemeral_5m_input_tokens
integer<int64>
required
Tokens written with the default five-minute lifetime.
usage.cache_creation.ephemeral_1h_input_tokens
integer<int64>
required
Tokens written with the one-hour lifetime (cache_control.ttl: "1h"), billed at their own rate.
usage.cache_creation_input_tokens
integer<int64> | null
required
Tokens written into the prompt cache by this request, or null.
usage.cache_read_input_tokens
integer<int64> | null
required
Tokens served to this request out of the prompt cache, or null.
usage.server_tool_use
object | null
required
How many times server-side tools ran, or null when none did.
Hide child attributes
usage.server_tool_use.web_search_requests
integer<int64>
required
How many web searches the model ran.
usage.server_tool_use.web_fetch_requests
integer<int64>
required
Always 0. The gateway serves no web fetch.
usage.service_tier
null
required
Always null. This gateway routes by its own catalog, so the Anthropic service tier does not apply to an answer served through it.
usage.inference_geo
null
required
Always null. Where the inference ran is not reported.
usage.output_tokens_details
null
required
Always null. The breakdown of output_tokens into thinking tokens and the rest is not surfaced. output_tokens is the total that counts.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NagaAI Documentation","colors":{"primary":"#5a5ae5","light":"#8893fa","dark":"#5351da"},"logo":{"light":"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-light.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=18d579338bd90baa596e41e2e2322393","dark":"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-dark.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=f4927df5611f5a22c6984a3e7b91b6a0"},"favicon":"https://mintcdn.com/nagaai-60f8697b/nbl1KDrtw3_cqedh/static/img/favicon.ico?fit=max\u0026auto=format\u0026n=nbl1KDrtw3_cqedh\u0026q=85\u0026s=a8361945277b5cce4de483745aa5c21c","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["python","javascript","curl","go"],"prefill":true},"url":"full"},"appearance":{"default":"system"},"background":{"color":{"light":"#ffffff","dark":"#09090b"}},"navbar":{"links":[{"href":"https://naga.ac/models","label":"Models"},{"href":"https://naga.ac/pricing","label":"Pricing"},{"href":"https://naga.ac/playground","label":"Playground"}],"primary":{"type":"button","label":"Dashboard","href":"https://naga.ac/dashboard"}},"footer":{"socials":{"discord":"https://discord.naga.ac","github":"https://github.com/naga-ai-hub","x":"https://x.com/NagaAIProject","reddit":"https://www.reddit.com/r/NagaAI"},"links":[{"header":"Community","items":[{"label":"Status","href":"https://status.naga.ac"},{"label":"Blog","href":"https://naga.ac/blog"},{"label":"Support","href":"https://discord.naga.ac"}]},{"header":"Resources","items":[{"label":"Models","href":"https://naga.ac/models"},{"label":"Playground","href":"https://naga.ac/playground"},{"label":"Chat","href":"https://chat.naga.ac"}]},{"header":"Legal","items":[{"label":"Privacy","href":"https://naga.ac/legal/privacy"},{"label":"Terms","href":"https://naga.ac/legal/terms"}]}]},"fonts":{"family":"Geist"},"styling":{"codeblocks":{"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}},"latex":true},"contextual":{"options":["copy","view","download-spec","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nagaai-60f8697b","hasAudioNarration":false,"actualSubdomain":"nagaai-60f8697b","customDomains":["docs.naga.ac"],"gitSource":{"type":"github","owner":"naga-ai-hub","repo":"naga-ai","deployBranch":"master","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6afff8e862a3bc10271d2724","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"default","tag":"Docs","count":35},{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"Endpoints","count":24},{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"Integrations","count":13},{"language":"default","tag":"Account","count":11},{"language":"default","tag":"Coding agents","count":8},{"language":"default","tag":"How NagaAI works","count":5},{"language":"default","tag":"API Keys","count":5},{"language":"default","tag":"Get started","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"api-reference/messages/create-a-message","slug":"/api-reference/messages/create-a-message","pageMetadata":{"title":"Create a message","description":"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. `/v1/chat/completions` and `/v1/responses` serve the same models in the other two dialects.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/messages","href":"/api-reference/messages/create-a-message","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. \", _jsx(_components.code, {\n children: \"/v1/chat/completions\"\n }), \" and \", _jsx(_components.code, {\n children: \"/v1/responses\"\n }), \" serve the same models in the other two dialects.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}},"config":{},"pageMetadata":{"title":"Create a message","description":"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. `/v1/chat/completions` and `/v1/responses` serve the same models in the other two dialects.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/messages","href":"/api-reference/messages/create-a-message","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Messages"],"summary":"Create a message","description":"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. `/v1/chat/completions` and `/v1/responses` serve the same models in the other two dialects.","operationId":"create_message","externalDocs":{"url":"https://docs.anthropic.com/en/api/messages","description":"The Anthropic reference for this dialect."},"parameters":["b59f629b-0ca3-463c-aa04-7e616d93d11a"],"requestBody":"a3911496-5966-4391-bc09-afd63bd1387b","responses":{"200":"de4e34fc-4bb7-4279-81ed-1e3cbcc919ac","400":"58e5c4f3-2ce7-4bfe-b5a0-ba6aeddb07d6","401":"ed7a3a01-c0ee-4b6b-b220-5c776c177d9d","402":"03ef17b2-b86f-4d79-9c64-862f906e248b","403":"71752ea9-ab00-461c-9642-036e0fdc3576","404":"fa2fdf8c-dfc3-4de9-9e69-8866015ae6d2","408":"2830876e-0cb1-4853-9132-2964f3d5718f","410":"7dfbf226-62c5-4bc1-b58b-573d1611715b","413":"58450a3f-f285-4bb3-b781-bcd82277be5b","422":"02c453e9-8afb-49e4-9638-3f345f3619c0","429":"c8c30f76-3724-494f-a0bd-83964a81e43a","500":"022ecb5e-fedf-4300-aa66-7491c2375ef4","503":"08f5d42a-a474-4362-9471-a69ec7141525"},"security":["b6e678f9-f19c-4c49-a772-759ebba54f9e","fe39e5ef-e7b9-474f-83f2-a31b76e69d0f"],"x-codeSamples":[{"lang":"bash","label":"curl","source":"curl https://api.naga.ac/v1/messages \\\n -H \"Authorization: Bearer $NAGA_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"max_tokens\": 256,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Say hi.\"\n }\n ]\n}'"},{"lang":"python","label":"anthropic-python","source":"import os\nfrom anthropic import Anthropic\n\nclient = Anthropic(\n api_key=os.environ[\"NAGA_API_KEY\"],\n base_url=\"https://api.naga.ac\",\n)\n\nresult = client.messages.create(\n model=\"anthropic/claude-sonnet-5.5\",\n max_tokens=256,\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"Say hi.\"\n }\n ],\n)\nprint(result)\n"}],"x-mcp":{"name":"naga_create_message","annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},"method":"post","type":"path","servers":["ddee1100-762b-4028-ac39-d54cdb9aa21e"],"path":"/v1/messages","baseUrlOptions":["https://api.naga.ac"],"title":"Create a message","codeSamples":[{"label":"curl","lang":"bash","source":"curl https://api.naga.ac/v1/messages \\\n -H \"Authorization: Bearer $NAGA_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"max_tokens\": 256,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Say hi.\"\n }\n ]\n}'"},{"label":"anthropic-python","lang":"python","source":"import os\nfrom anthropic import Anthropic\n\nclient = Anthropic(\n api_key=os.environ[\"NAGA_API_KEY\"],\n base_url=\"https://api.naga.ac\",\n)\n\nresult = client.messages.create(\n model=\"anthropic/claude-sonnet-5.5\",\n max_tokens=256,\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"Say hi.\"\n }\n ],\n)\nprint(result)\n"}],"requestExampleLanguages":["python","javascript","bash","go"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"anthropic/claude-sonnet-5.5","body.max_tokens":256,"body.messages.items.0.role":"user","body.messages.items.0.content.oneOf.1":"Say hi."},{"body.model":"anthropic/claude-opus-5.5","body.max_tokens":8192,"body.messages.items.0.role":"user","body.messages.items.0.content.oneOf.1":"Plan a 3-step refactor.","body.thinking.oneOf.0.type":"enabled","body.thinking.oneOf.0.budget_tokens.oneOf.0":4096},{"body.model":"anthropic/claude-sonnet-5.5","body.max_tokens":256,"body.messages.items.0.role":"user","body.messages.items.0.content.oneOf.1":"Say hi.","body.stream":true},{"body.model":"anthropic/claude-sonnet-5.5","body.max_tokens":512,"body.messages.items.0.role":"user","body.messages.items.0.content.oneOf.1":"What's the weather in Paris?","body.tools.oneOf.0.items.0.oneOf.0.name":"get_weather","body.tools.oneOf.0.items.0.oneOf.0.input_schema.type":"object","body.tools.oneOf.0.items.0.oneOf.0.input_schema.properties":{"city":{"type":"string"}},"body.tools.oneOf.0.items.0.oneOf.0.input_schema.required":["city"],"body.tools.oneOf.0.items.0.oneOf.0.description.oneOf.0":"Look up live weather for a city.","body.tool_choice.oneOf.0.type":"auto"}],"urlDisplay":"full"},"dependencies":{"parameters":{"b59f629b-0ca3-463c-aa04-7e616d93d11a":{"name":"x-naga-routing-strategy","in":"header","description":"The routing strategy when the body names none. An unknown name is ignored. A NagaAI extension.","required":false,"schema":{"type":"string","description":"The routing strategy when the body names none. An unknown name is ignored. A NagaAI extension.\nThe order in which NagaAI tries providers at the same price: `reliability` best recent success rate, `balanced` speed among near-best success, `latency` first token, `throughput` tokens per second, `cache` providers that read a cached prefix. A NagaAI extension.","enum":["reliability","balanced","latency","throughput","cache"],"isRequired":false,"uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The Anthropic-compatible Messages request. The gateway takes an unrecognized key and drops it.","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"The model to run, named by an id or alias from NagaAI's catalog. An entry without the `chat.completions` capability draws a refusal.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"max_tokens":{"type":"integer","format":"int64","description":"The ceiling on generated tokens. Required, at least 1, and the gateway raises it where the reasoning budget would not fit.","minimum":1,"isRequired":true,"uniqueKey":"max_tokens","typeLabel":"integer\u003cint64>"},"messages":{"type":"array","items":{"type":"object","description":"One turn of the conversation: who was speaking, and what they said.","required":["role","content"],"properties":{"role":{"type":"string","description":"Whose turn this is, and what blocks it may carry.","enum":["user","assistant","system"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"array","items":{"oneOf":[{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text this block carries; the 20 MiB inline ceiling does not apply.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0.cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","source"],"properties":{"source":{"oneOf":[{"type":"object","description":"Where the picture comes from.","required":["type","media_type","data"],"properties":{"media_type":{"type":"string","description":"The format of the bytes in `data`. Required, with no default.","enum":["image/jpeg","image/png","image/gif","image/webp"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"The image bytes as bare base64, under 20 MiB.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `base64`.","enum":["base64"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where the picture comes from.","required":["type","url"],"properties":{"url":{"type":"string","description":"Where the image lives: an `http(s)` URL, or a `data:` URI.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `url`.","enum":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1.cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","source"],"properties":{"source":{"oneOf":[{"type":"object","description":"Where the document comes from.","required":["type","data"],"properties":{"data":{"type":"string","description":"The PDF bytes as bare base64, under 20 MiB.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `base64`.","enum":["base64"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","description":"The document's media type. Absent means `application/pdf`.","enum":["application/pdf"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where the document comes from.","required":["type","url"],"properties":{"url":{"type":"string","description":"Where the document lives: an `http(s)` URL, or a `data:` URI.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.1.url","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `url`.","enum":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"Where the document comes from.","required":["type","data"],"properties":{"data":{"type":"string","description":"The document text itself, under 20 MiB in UTF-8.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.2.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","description":"The document's media type. Absent means `text/plain`.","enum":["text/plain"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.2.media_type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"Where the document comes from.","required":["type","content"],"properties":{"content":{"oneOf":[{"type":"array","items":{"type":"any","description":"One entry of a document assembled from content blocks.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3.content.oneOf.0.items.[INDEX]","typeLabel":"any"},"title":"List of content blocks","description":"The document body, as one string or a list of blocks.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3.content.oneOf.0","typeLabel":"any[]"},{"type":"string","title":"Plain text","description":"The document body, as one string or a list of blocks.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3.content.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3.content","typeLabel":"any[] | string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `content`.","enum":["content"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `document`.","enum":["document"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"title":{"oneOf":[{"type":"string","description":"A name for the document, passed on as its filename.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"A name for the document, passed on as its filename.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.title","typeLabel":"string | null"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2.cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"title":{"oneOf":[{"type":"string","description":"What the result is called. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the result is called. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.title","typeLabel":"string | null"},"source":{"oneOf":[{"type":"string","description":"Where the result came from. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.source.oneOf.0","typeLabel":"string"},{"type":"null","description":"Where the result came from. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.source","typeLabel":"string | null"},"content":{"type":"array","items":{"type":"object","description":"A `text` block where a bare list of them is expected, with its tag restored.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text this block carries; the 20 MiB inline ceiling does not apply.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX].cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"The text that was found, as `text` blocks. Absent means an empty list.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"citations":{"oneOf":[{"type":"object","description":"Whether the model may cite this result.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.citations.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.citations.oneOf.0","typeLabel":"object"},{"type":"null","description":"Whether the model may cite this result.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.citations.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.citations.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3.citations","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","thinking"],"properties":{"thinking":{"type":"string","description":"The reasoning text, as the model wrote it.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4.thinking","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking`.","enum":["thinking"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"signature":{"oneOf":[{"type":"string","description":"The opaque signature issued with that reasoning. Its absence draws a refusal.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4.signature.oneOf.0","typeLabel":"string"},{"type":"null","description":"The opaque signature issued with that reasoning. Its absence draws a refusal.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4.signature.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4.signature","typeLabel":"string | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","data"],"properties":{"data":{"type":"string","description":"The opaque redacted payload, replayed unchanged.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.5.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `redacted_thinking`.","enum":["redacted_thinking"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","id","name"],"properties":{"id":{"type":"string","description":"The identifier a matching `tool_result` names back. It must not be empty.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.id","typeLabel":"string"},"name":{"type":"string","description":"The name of the tool that was called, never empty.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.name","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_use`.","enum":["tool_use"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","description":"The arguments the call was made with. Absent means none.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.input.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.input","typeLabel":"object"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6.cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.6","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type","tool_use_id"],"properties":{"tool_use_id":{"type":"string","description":"The `id` of the `tool_use` this answers, never empty.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.tool_use_id","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_result`.","enum":["tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"array","items":{"oneOf":[{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text this block carries; the 20 MiB inline ceiling does not apply.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"cache_control":{"type":"any","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.0.cache_control","typeLabel":"any"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type","source"],"properties":{"source":{"type":"any","description":"Where the picture comes from.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.1.source","typeLabel":"any"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"cache_control":{"type":"any","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.1.cache_control","typeLabel":"any"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"title":{"oneOf":[{"type":"string","description":"What the result is called. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the result is called. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.title","typeLabel":"string | null"},"source":{"oneOf":[{"type":"string","description":"Where the result came from. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"string"},{"type":"null","description":"Where the result came from. Its absence draws a refusal a step later.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.source","typeLabel":"string | null"},"content":{"type":"array","items":{"type":"any","description":"A `text` block where a bare list of them is expected, with its tag restored.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.content.items.[INDEX]","typeLabel":"any"},"description":"The text that was found, as `text` blocks. Absent means an empty list.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.content","typeLabel":"any[]"},"citations":{"oneOf":[{"type":"object","description":"Whether the model may cite this result.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.citations.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.citations.oneOf.0","typeLabel":"object"},{"type":"null","description":"Whether the model may cite this result.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.citations.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.citations.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2.citations","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type","source"],"properties":{"source":{"type":"any","description":"Where the document comes from.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.source","typeLabel":"any"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `document`.","enum":["document"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"title":{"oneOf":[{"type":"string","description":"A name for the document, passed on as its filename.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"A name for the document, passed on as its filename.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.title","typeLabel":"string | null"},"cache_control":{"type":"any","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3.cache_control","typeLabel":"any"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_reference`.","enum":["tool_reference"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"tool_name":{"oneOf":[{"type":"string","description":"The name of the tool being referenced, never read.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.4.tool_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The name of the tool being referenced, never read.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.4.tool_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.4.tool_name","typeLabel":"string | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_fetch_tool_result`.","enum":["web_fetch_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `code_execution_tool_result`.","enum":["code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.6","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `bash_code_execution_tool_result`.","enum":["bash_code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.7","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `text_editor_code_execution_tool_result`.","enum":["text_editor_code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.8.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.8","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_search_tool_result`.","enum":["tool_search_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.9.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.9","typeLabel":"object"},{"type":"object","description":"One entry of a `tool_result` block's content. Four of eleven members reach the model.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `container_upload`.","enum":["container_upload"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.10.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX].oneOf.10","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"List of result blocks","description":"What the tool produced. Absent means the empty string.","default":"","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.0","typeLabel":"List of result blocks · object[]"},{"type":"string","title":"Plain text","description":"What the tool produced. Absent means the empty string.","default":"","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content.oneOf.1","typeLabel":"string"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.content","typeLabel":"List of result blocks · object[] | string"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7.cache_control","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.7","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `server_tool_use`.","enum":["server_tool_use"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.type","typeLabel":"enum\u003cstring>"},"id":{"oneOf":[{"type":"string","description":"The identifier that pairs this call with the block reporting its outcome.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The identifier that pairs this call with the block reporting its outcome.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.id","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","description":"Which server tool was called. Only `web_search` goes further.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Which server tool was called. Only `web_search` goes further.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.name","typeLabel":"string | null"},"input":{"oneOf":[{"type":"object","description":"The arguments the model passed to the tool; only `query` counts.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.input.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.input.oneOf.0","typeLabel":"object"},{"type":"null","description":"The arguments the model passed to the tool; only `query` counts.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.input.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.input.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8.input","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.8","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_search_tool_result`.","enum":["web_search_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.type","typeLabel":"enum\u003cstring>"},"tool_use_id":{"oneOf":[{"type":"string","description":"The `id` of the `server_tool_use` this closes.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.tool_use_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The `id` of the `server_tool_use` this closes.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.tool_use_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.tool_use_id","typeLabel":"string | null"},"content":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.0.items.[INDEX].additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"List of result objects","description":"The results, or the error object standing in for them.","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.0","typeLabel":"List of result objects · object[]"},{"type":"object","description":"The results, or the error object standing in for them.","additionalProperties":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.1.additionalProperties","typeLabel":"any"},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.1","typeLabel":"object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9.content","typeLabel":"List of result objects · object[] | object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.9","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_fetch_tool_result`.","enum":["web_fetch_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.10.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.10","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `code_execution_tool_result`.","enum":["code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.11.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.11","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `bash_code_execution_tool_result`.","enum":["bash_code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.12.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.12","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `text_editor_code_execution_tool_result`.","enum":["text_editor_code_execution_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.13.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.13","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_search_tool_result`.","enum":["tool_search_tool_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.14.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.14","typeLabel":"object"},{"type":"object","description":"One entry of a message's `content`. The role decides which tags it admits.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `container_upload`.","enum":["container_upload"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.15.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX].oneOf.15","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"List of content blocks","description":"What was said — one string, or at least one content block.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"List of content blocks · object[]"},{"type":"string","title":"Plain text","description":"What was said — one string, or at least one content block.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"List of content blocks · object[] | string"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"description":"The conversation so far, oldest first: one to 100000 entries. A block sent under the wrong role draws a refusal.","maxItems":100000,"minItems":1,"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"routing":{"type":"object","description":"How NagaAI picks the providers for this request: `strategy` reorders them, `max_price` removes the dearer ones and can fail the request. A NagaAI extension.","properties":{"strategy":{"type":"string","description":"Which provider NagaAI tries first among those at the same price. Absent: the `x-naga-routing-strategy` header, the key's default, the workspace's, else NagaAI's choice.","enum":["reliability","balanced","latency","throughput","cache"],"uniqueKey":"routing.strategy","typeLabel":"enum\u003cstring>"},"max_price":{"type":"object","description":"The most one unit of each named meter may cost. Absent: no price limit.","example":{"output_token":"0.000005"},"properties":{"token":{"oneOf":[{"type":"string","description":"Credits per token, either direction, without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per token, either direction, without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.token","typeLabel":"string | number"},"input_token":{"oneOf":[{"type":"string","description":"Credits per prompt token without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per prompt token without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_token","typeLabel":"string | number"},"output_token":{"oneOf":[{"type":"string","description":"Credits per output token without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per output token without a meter of its own. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_token","typeLabel":"string | number"},"cached_input_token":{"oneOf":[{"type":"string","description":"Credits per prompt token read from cache. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cached_input_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per prompt token read from cache. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cached_input_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.cached_input_token","typeLabel":"string | number"},"cache_write_input_token":{"oneOf":[{"type":"string","description":"Credits per prompt token written to cache. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cache_write_input_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per prompt token written to cache. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cache_write_input_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.cache_write_input_token","typeLabel":"string | number"},"cache_write_1h_input_token":{"oneOf":[{"type":"string","description":"Credits per prompt token cached for one hour. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cache_write_1h_input_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per prompt token cached for one hour. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.cache_write_1h_input_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.cache_write_1h_input_token","typeLabel":"string | number"},"input_text_token":{"oneOf":[{"type":"string","description":"Credits per prompt text token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per prompt text token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_text_token","typeLabel":"string | number"},"output_text_token":{"oneOf":[{"type":"string","description":"Credits per output text token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_text_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per output text token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_text_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_text_token","typeLabel":"string | number"},"input_audio_token":{"oneOf":[{"type":"string","description":"Credits per input audio token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_audio_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per input audio token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_audio_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_audio_token","typeLabel":"string | number"},"output_audio_token":{"oneOf":[{"type":"string","description":"Credits per output audio token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_audio_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per output audio token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_audio_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_audio_token","typeLabel":"string | number"},"input_image_token":{"oneOf":[{"type":"string","description":"Credits per input image token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_image_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per input image token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_image_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_image_token","typeLabel":"string | number"},"output_image_token":{"oneOf":[{"type":"string","description":"Credits per output image token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_image_token.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per output image token. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_image_token.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_image_token","typeLabel":"string | number"},"input_audio_hour":{"oneOf":[{"type":"string","description":"Credits per hour of input audio. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_audio_hour.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per hour of input audio. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_audio_hour.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_audio_hour","typeLabel":"string | number"},"output_audio_hour":{"oneOf":[{"type":"string","description":"Credits per hour of output audio. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_audio_hour.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per hour of output audio. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_audio_hour.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_audio_hour","typeLabel":"string | number"},"input_text_character":{"oneOf":[{"type":"string","description":"Credits per input text character. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_character.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per input text character. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_character.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_text_character","typeLabel":"string | number"},"output_text_character":{"oneOf":[{"type":"string","description":"Credits per output text character. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_text_character.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per output text character. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_text_character.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_text_character","typeLabel":"string | number"},"input_text_search":{"oneOf":[{"type":"string","description":"Credits per rerank search. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_search.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per rerank search. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.input_text_search.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.input_text_search","typeLabel":"string | number"},"output_image_image":{"oneOf":[{"type":"string","description":"Credits per delivered picture. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_image_image.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per delivered picture. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_image_image.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_image_image","typeLabel":"string | number"},"request":{"oneOf":[{"type":"string","description":"Credits per request: the fee a request pays once. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.request.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per request: the fee a request pays once. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.request.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.request","typeLabel":"string | number"},"output_video_second":{"oneOf":[{"type":"string","description":"Credits per second of video. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_video_second.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per second of video. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_video_second.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_video_second","typeLabel":"string | number"},"output_video_megapixel_second":{"oneOf":[{"type":"string","description":"Credits per megapixel-second of upscaled video. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_video_megapixel_second.oneOf.0","typeLabel":"string"},{"type":"number","description":"Credits per megapixel-second of upscaled video. A non-negative decimal, as a string or a number.","minimum":0,"uniqueKey":"routing.max_price.output_video_megapixel_second.oneOf.1","typeLabel":"number"}],"uniqueKey":"routing.max_price.output_video_megapixel_second","typeLabel":"string | number"}},"additionalProperties":false,"uniqueKey":"routing.max_price","typeLabel":"object"},"precision":{"type":"array","items":{"type":"string","description":"A weight precision a provider serves a model in, as it publishes it.","enum":["int4","int8","fp4","mxfp4","nvfp4","fp6","fp8","mxfp8","fp16","bf16","fp32"],"uniqueKey":"routing.precision.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"The weight precisions the model may be served in. Absent: any.","minItems":1,"uniqueKey":"routing.precision","typeLabel":"enum\u003cstring>[]"}},"additionalProperties":false,"uniqueKey":"routing","typeLabel":"object"},"fallbacks":{"oneOf":[{"type":"array","items":{"type":"object","description":"One fallback model of a Messages request, in Anthropic's shape. A key other than `model` draws a 400.","required":["model"],"properties":{"model":{"type":"string","description":"The model to try, named by an id or alias from NagaAI's catalog.","isRequired":true,"uniqueKey":"fallbacks.oneOf.0.items.[INDEX].model","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"fallbacks.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Fallback models, tried in order when `model` cannot answer: none of its providers served it, or the request does not fit it. At most 3; the answer's `model` names the one that answered, and only that one is billed. A NagaAI extension in the shape of Anthropic's `fallbacks`.","maxItems":3,"uniqueKey":"fallbacks.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","description":"One fallback model of a Messages request, in Anthropic's shape. A key other than `model` draws a 400.","required":["model"],"properties":{"model":{"type":"string","description":"The model to try, named by an id or alias from NagaAI's catalog."}},"additionalProperties":false},"description":"Fallback models, tried in order when `model` cannot answer: none of its providers served it, or the request does not fit it. At most 3; the answer's `model` names the one that answered, and only that one is billed. A NagaAI extension in the shape of Anthropic's `fallbacks`.","maxItems":3,"uniqueKey":"fallbacks.oneOf.1","typeLabel":"null"}],"uniqueKey":"fallbacks","typeLabel":"object[] | null"},"system":{"oneOf":[{"type":"array","items":{"type":"object","description":"A `text` block where a bare list of them is expected, with its tag restored.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text this block carries; the 20 MiB inline ceiling does not apply.","isRequired":true,"uniqueKey":"system.oneOf.0.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"system.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"system.oneOf.0.items.[INDEX].cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"system.oneOf.0.items.[INDEX].cache_control","typeLabel":"object | null"}},"uniqueKey":"system.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"List of text blocks","description":"The system prompt, as one string or as `text` blocks joined in order.","uniqueKey":"system.oneOf.0","typeLabel":"List of text blocks · object[]"},{"type":"string","title":"Plain text","description":"The system prompt, as one string or as `text` blocks joined in order.","uniqueKey":"system.oneOf.1","typeLabel":"string"},{"type":"null","uniqueKey":"system.oneOf.2","typeLabel":"null"}],"uniqueKey":"system","typeLabel":"List of text blocks · object[] | string | null"},"stream":{"type":"boolean","description":"Whether the reply arrives incrementally as the model writes it. An explicit `null` draws a refusal.","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"temperature":{"oneOf":[{"type":"number","format":"double","description":"How much randomness goes into the reply, between 0 and 2. A provider may still refuse a value this range allows.","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.0","typeLabel":"number\u003cdouble>"},{"type":"null","format":"double","description":"How much randomness goes into the reply, between 0 and 2. A provider may still refuse a value this range allows.","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number\u003cdouble> | null"},"top_p":{"oneOf":[{"type":"number","format":"double","description":"The sampling cut-off, between 0 and 1, and an alternative to `temperature`.","maximum":1,"minimum":0,"uniqueKey":"top_p.oneOf.0","typeLabel":"number\u003cdouble>"},{"type":"null","format":"double","description":"The sampling cut-off, between 0 and 1, and an alternative to `temperature`.","maximum":1,"minimum":0,"uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number\u003cdouble> | null"},"top_k":{"oneOf":[{"type":"integer","format":"int64","description":"How many top candidates each token is drawn from. It reaches only some providers.","uniqueKey":"top_k.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"How many top candidates each token is drawn from. It reaches only some providers.","uniqueKey":"top_k.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_k","typeLabel":"integer\u003cint64> | null"},"stop_sequences":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"stop_sequences.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Strings that end generation the moment the model produces one. The reply never names which matched.","uniqueKey":"stop_sequences.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"Strings that end generation the moment the model produces one. The reply never names which matched.","uniqueKey":"stop_sequences.oneOf.1","typeLabel":"null"}],"uniqueKey":"stop_sequences","typeLabel":"string[] | null"},"metadata":{"oneOf":[{"type":"object","description":"An object describing the request. Only `user_id` counts, and it reaches only some providers.","additionalProperties":{"oneOf":[{}],"uniqueKey":"metadata.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"An object describing the request. Only `user_id` counts, and it reaches only some providers.","additionalProperties":{"oneOf":[{}],"uniqueKey":"metadata.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"object | null"},"tools":{"oneOf":[{"type":"array","items":{"oneOf":[{"type":"object","title":"Client tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["name","input_schema"],"properties":{"name":{"type":"string","description":"What the model calls the tool by, never empty.","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.name","typeLabel":"string"},"input_schema":{"type":"object","description":"A JSON Schema for the arguments the model must produce. Required, compiled at intake. A keyword the far side refuses travels no further.","additionalProperties":{"oneOf":[{}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.input_schema.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.input_schema","typeLabel":"object"},"description":{"oneOf":[{"type":"string","description":"What the tool does, written for the model to choose by.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the tool does, written for the model to choose by.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.description","typeLabel":"string | null"},"strict":{"oneOf":[{"type":"boolean","description":"Whether the model's arguments follow `input_schema` exactly.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the model's arguments follow `input_schema` exactly.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.strict","typeLabel":"boolean | null"},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this tool definition.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.cache_control","typeLabel":"object | null"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"Client tool · object"},{"type":"object","title":"Web search tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["type","name"],"properties":{"type":{"type":"string","description":"Which dated revision of the tool this asks for. Required.","enum":["web_search_20250305","web_search_20260209"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"The literal `web_search`. Required, even though only one value is legal.","enum":["web_search"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.name","typeLabel":"enum\u003cstring>"},"user_location":{"oneOf":[{"type":"object","description":"Roughly where the caller is, so results can favor that place.","additionalProperties":{"oneOf":[{}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.user_location.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.user_location.oneOf.0","typeLabel":"object"},{"type":"null","description":"Roughly where the caller is, so results can favor that place.","additionalProperties":{"oneOf":[{}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.user_location.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.user_location.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.user_location","typeLabel":"object | null"},"search_context_size":{"oneOf":[{"type":"string","description":"How much search context goes in front of the model. A NagaAI extension.","enum":["low","medium","high"],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.search_context_size.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.search_context_size.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.search_context_size","typeLabel":"enum\u003cstring> | null"},"external_web_access":{"oneOf":[{"type":"boolean","description":"Whether the search may reach the live web. A NagaAI extension.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.external_web_access.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the search may reach the live web. A NagaAI extension.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.external_web_access.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.external_web_access","typeLabel":"boolean | null"},"max_uses":{"oneOf":[{"type":"integer","format":"int64","description":"How many searches one request may run.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.max_uses.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"How many searches one request may run.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.max_uses.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.max_uses","typeLabel":"integer\u003cint64> | null"},"allowed_domains":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_domains.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Which domains results may come from. Exclusive with `blocked_domains`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_domains.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"Which domains results may come from. Exclusive with `blocked_domains`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_domains.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_domains","typeLabel":"string[] | null"},"blocked_domains":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.blocked_domains.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Which domains results may not come from. Exclusive with `allowed_domains`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.blocked_domains.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"Which domains results may not come from. Exclusive with `allowed_domains`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.blocked_domains.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.blocked_domains","typeLabel":"string[] | null"},"allowed_callers":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_callers.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Who may invoke the tool.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_callers.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"Who may invoke the tool.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_callers.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.allowed_callers","typeLabel":"string[] | null"},"defer_loading":{"oneOf":[{"type":"boolean","description":"Whether the tool stays out of the opening instructions.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.defer_loading.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool stays out of the opening instructions.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.defer_loading.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.defer_loading","typeLabel":"boolean | null"},"strict":{"oneOf":[{"type":"boolean","description":"Whether the tool's inputs follow their schema exactly.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool's inputs follow their schema exactly.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.strict","typeLabel":"boolean | null"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"Web search tool · object"},{"type":"object","title":"Hosted tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["type"],"properties":{"type":{"type":"string","description":"The tag deciding which of the three outcomes this entry meets. Required.","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.type","typeLabel":"string"},"name":{"oneOf":[{"type":"string","description":"The name of the tool. Required for `\"type\": \"custom\"`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The name of the tool. Required for `\"type\": \"custom\"`.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.name","typeLabel":"string | null"}},"additionalProperties":{"description":"Every other key of the entry, kept as it arrived.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.additionalProperties","typeLabel":"any"},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2","typeLabel":"Hosted tool · object"}],"uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"Client tool · object | Web search tool · object | Hosted tool · object"},"description":"The tools the model may call. Two dated web-search stamps are the only hosted ones the gateway serves; the other eight families travel no further.","uniqueKey":"tools.oneOf.0","typeLabel":"(Client tool · object | Web search tool · object | Hosted tool · object)[]"},{"type":"null","items":{"oneOf":[{"type":"object","title":"Client tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["name","input_schema"],"properties":{"name":{"type":"string","description":"What the model calls the tool by, never empty."},"description":{"oneOf":[{"type":"string","description":"What the tool does, written for the model to choose by."},{"type":"null","description":"What the tool does, written for the model to choose by."}]},"input_schema":{"type":"object","description":"A JSON Schema for the arguments the model must produce. Required, compiled at intake. A keyword the far side refuses travels no further.","additionalProperties":{"oneOf":[{}]},"propertyNames":{"type":"string"}},"strict":{"oneOf":[{"type":"boolean","description":"Whether the model's arguments follow `input_schema` exactly."},{"type":"null","description":"Whether the model's arguments follow `input_schema` exactly."}]},"cache_control":{"oneOf":[{"type":"object","description":"A prompt-cache breakpoint: cache the prompt up to and including this tool definition.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"]},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"]},{"type":"null"}]}}},{"type":"null"}]}}},{"type":"object","title":"Web search tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["type","name"],"properties":{"type":{"type":"string","description":"Which dated revision of the tool this asks for. Required.","enum":["web_search_20250305","web_search_20260209"]},"name":{"type":"string","description":"The literal `web_search`. Required, even though only one value is legal.","enum":["web_search"]},"user_location":{"oneOf":[{"type":"object","description":"Roughly where the caller is, so results can favor that place.","additionalProperties":{"oneOf":[{}]},"propertyNames":{"type":"string"}},{"type":"null","description":"Roughly where the caller is, so results can favor that place.","additionalProperties":{"oneOf":[{}]},"propertyNames":{"type":"string"}}]},"search_context_size":{"oneOf":[{"type":"string","description":"How much search context goes in front of the model. A NagaAI extension.","enum":["low","medium","high"]},{"type":"null"}]},"external_web_access":{"oneOf":[{"type":"boolean","description":"Whether the search may reach the live web. A NagaAI extension."},{"type":"null","description":"Whether the search may reach the live web. A NagaAI extension."}]},"max_uses":{"oneOf":[{"type":"integer","format":"int64","description":"How many searches one request may run."},{"type":"null","format":"int64","description":"How many searches one request may run."}]},"allowed_domains":{"oneOf":[{"type":"array","items":{"type":"string"},"description":"Which domains results may come from. Exclusive with `blocked_domains`."},{"type":"null","items":{"type":"string"},"description":"Which domains results may come from. Exclusive with `blocked_domains`."}]},"blocked_domains":{"oneOf":[{"type":"array","items":{"type":"string"},"description":"Which domains results may not come from. Exclusive with `allowed_domains`."},{"type":"null","items":{"type":"string"},"description":"Which domains results may not come from. Exclusive with `allowed_domains`."}]},"allowed_callers":{"oneOf":[{"type":"array","items":{"type":"string"},"description":"Who may invoke the tool."},{"type":"null","items":{"type":"string"},"description":"Who may invoke the tool."}]},"defer_loading":{"oneOf":[{"type":"boolean","description":"Whether the tool stays out of the opening instructions."},{"type":"null","description":"Whether the tool stays out of the opening instructions."}]},"strict":{"oneOf":[{"type":"boolean","description":"Whether the tool's inputs follow their schema exactly."},{"type":"null","description":"Whether the tool's inputs follow their schema exactly."}]}}},{"type":"object","title":"Hosted tool","description":"One entry of `tools[]`, in one of the three shapes this dialect accepts.","required":["type"],"properties":{"type":{"type":"string","description":"The tag deciding which of the three outcomes this entry meets. Required."},"name":{"oneOf":[{"type":"string","description":"The name of the tool. Required for `\"type\": \"custom\"`."},{"type":"null","description":"The name of the tool. Required for `\"type\": \"custom\"`."}]}},"additionalProperties":{"description":"Every other key of the entry, kept as it arrived."}}]},"description":"The tools the model may call. Two dated web-search stamps are the only hosted ones the gateway serves; the other eight families travel no further.","uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"(Client tool · object | Web search tool · object | Hosted tool · object)[] | null"},"tool_choice":{"oneOf":[{"type":"object","description":"Which tool, if any, the model is to call.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `auto`.","enum":["auto"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.0.type","typeLabel":"enum\u003cstring>"},"disable_parallel_tool_use":{"oneOf":[{"type":"boolean","description":"Whether the model may ask for only one tool per turn. Absent leaves the question open.","uniqueKey":"tool_choice.oneOf.0.disable_parallel_tool_use.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the model may ask for only one tool per turn. Absent leaves the question open.","uniqueKey":"tool_choice.oneOf.0.disable_parallel_tool_use.oneOf.1","typeLabel":"null"}],"uniqueKey":"tool_choice.oneOf.0.disable_parallel_tool_use","typeLabel":"boolean | null"}},"uniqueKey":"tool_choice.oneOf.0","typeLabel":"object"},{"type":"object","description":"Which tool, if any, the model is to call.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `any`.","enum":["any"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"disable_parallel_tool_use":{"oneOf":[{"type":"boolean","description":"Whether the model may ask for only one tool per turn. Absent leaves the question open.","uniqueKey":"tool_choice.oneOf.1.disable_parallel_tool_use.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the model may ask for only one tool per turn. Absent leaves the question open.","uniqueKey":"tool_choice.oneOf.1.disable_parallel_tool_use.oneOf.1","typeLabel":"null"}],"uniqueKey":"tool_choice.oneOf.1.disable_parallel_tool_use","typeLabel":"boolean | null"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"},{"type":"object","description":"Which tool, if any, the model is to call.","required":["type","name"],"properties":{"name":{"type":"string","description":"Name of the tool the model has to call. An empty string draws a 400 a step later.","isRequired":true,"uniqueKey":"tool_choice.oneOf.2.name","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool`.","enum":["tool"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"},"disable_parallel_tool_use":{"oneOf":[{"type":"boolean","description":"Whether the model may ask for only one tool per turn, once the named tool has been called.","uniqueKey":"tool_choice.oneOf.2.disable_parallel_tool_use.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the model may ask for only one tool per turn, once the named tool has been called.","uniqueKey":"tool_choice.oneOf.2.disable_parallel_tool_use.oneOf.1","typeLabel":"null"}],"uniqueKey":"tool_choice.oneOf.2.disable_parallel_tool_use","typeLabel":"boolean | null"}},"uniqueKey":"tool_choice.oneOf.2","typeLabel":"object"},{"type":"object","description":"Which tool, if any, the model is to call.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `none`.","enum":["none"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.3.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tool_choice.oneOf.3","typeLabel":"object"},{"type":"null","uniqueKey":"tool_choice.oneOf.4","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"object · object · object · object · null"},"thinking":{"oneOf":[{"type":"object","description":"How much reasoning the model does before answering. The budget becomes a tier: under 1024 draws a refusal, and `output_config.effort` wins over it.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `enabled`.","enum":["enabled"],"isRequired":true,"uniqueKey":"thinking.oneOf.0.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"How many tokens the model may spend reasoning, and the value the tier follows from. Below 1024 draws a 400.","minimum":0,"uniqueKey":"thinking.oneOf.0.budget_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"How many tokens the model may spend reasoning, and the value the tier follows from. Below 1024 draws a 400.","minimum":0,"uniqueKey":"thinking.oneOf.0.budget_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"thinking.oneOf.0.budget_tokens","typeLabel":"integer\u003cint64> | null"}},"uniqueKey":"thinking.oneOf.0","typeLabel":"object"},{"type":"object","description":"How much reasoning the model does before answering. The budget becomes a tier: under 1024 draws a refusal, and `output_config.effort` wins over it.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `disabled`.","enum":["disabled"],"isRequired":true,"uniqueKey":"thinking.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"thinking.oneOf.1","typeLabel":"object"},{"type":"object","description":"How much reasoning the model does before answering. The budget becomes a tier: under 1024 draws a refusal, and `output_config.effort` wins over it.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `adaptive`.","enum":["adaptive"],"isRequired":true,"uniqueKey":"thinking.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"thinking.oneOf.2","typeLabel":"object"},{"type":"null","uniqueKey":"thinking.oneOf.3","typeLabel":"null"}],"uniqueKey":"thinking","typeLabel":"object · object · object · null"},"output_config":{"oneOf":[{"type":"object","description":"Configuration for the output: the reasoning tier, and a schema the reply must satisfy.","properties":{"effort":{"oneOf":[{"type":"string","description":"The effort tier to ask the provider for. It overrides whatever `thinking` asked for.","enum":["low","medium","high","xhigh","max"],"uniqueKey":"output_config.oneOf.0.effort.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"output_config.oneOf.0.effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"output_config.oneOf.0.effort","typeLabel":"enum\u003cstring> | null"},"format":{"oneOf":[{"type":"object","description":"The JSON shape the answer must satisfy. Only `json_schema` passes, and its `schema` may be `null`.","additionalProperties":{"oneOf":[{}],"uniqueKey":"output_config.oneOf.0.format.oneOf.0.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"output_config.oneOf.0.format.oneOf.0","typeLabel":"object"},{"type":"null","description":"The JSON shape the answer must satisfy. Only `json_schema` passes, and its `schema` may be `null`.","additionalProperties":{"oneOf":[{}],"uniqueKey":"output_config.oneOf.0.format.oneOf.1.additionalProperties","typeLabel":"any"},"propertyNames":{"type":"string"},"uniqueKey":"output_config.oneOf.0.format.oneOf.1","typeLabel":"null"}],"uniqueKey":"output_config.oneOf.0.format","typeLabel":"object | null"}},"uniqueKey":"output_config.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"output_config.oneOf.1","typeLabel":"null"}],"uniqueKey":"output_config","typeLabel":"object | null"},"truncation":{"oneOf":[{"type":"string","description":"`auto` lets NagaAI drop whole turns from the middle of a conversation that does not fit the model's context window, keeping the system prompt, the first and the latest turn; `disabled`, the default, refuses it with `context_length_exceeded`. A NagaAI extension, the same key as in the Responses API.","enum":["auto","disabled"],"uniqueKey":"truncation.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"truncation.oneOf.1","typeLabel":"null"}],"uniqueKey":"truncation","typeLabel":"enum\u003cstring> | null"},"cache_control":{"oneOf":[{"type":"object","description":"Automatic prompt caching: one breakpoint on the last block that can be cached, moving forward as the conversation grows. It takes one of the four breakpoint slots.","required":["type"],"properties":{"type":{"type":"string","description":"Always `ephemeral`.","enum":["ephemeral"],"isRequired":true,"uniqueKey":"cache_control.oneOf.0.type","typeLabel":"enum\u003cstring>"},"ttl":{"oneOf":[{"type":"string","description":"`5m` or `1h`. Absent means `5m`.","enum":["5m","1h"],"uniqueKey":"cache_control.oneOf.0.ttl.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"cache_control.oneOf.0.ttl.oneOf.1","typeLabel":"null"}],"uniqueKey":"cache_control.oneOf.0.ttl","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"cache_control.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"cache_control.oneOf.1","typeLabel":"null"}],"uniqueKey":"cache_control","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","summary":"A plain message","value":{"model":"anthropic/claude-sonnet-5.5","max_tokens":256,"messages":[{"role":"user","content":"Say hi."}]}},"reasoning":{"title":"reasoning","summary":"Give the model a thinking budget","value":{"model":"anthropic/claude-opus-5.5","max_tokens":8192,"messages":[{"role":"user","content":"Plan a 3-step refactor."}],"thinking":{"type":"enabled","budget_tokens":4096}}},"streaming":{"title":"streaming","summary":"Stream the answer as content blocks","value":{"model":"anthropic/claude-sonnet-5.5","max_tokens":256,"messages":[{"role":"user","content":"Say hi."}],"stream":true}},"tool-call":{"title":"tool-call","summary":"Offer the model a tool to use","value":{"model":"anthropic/claude-sonnet-5.5","max_tokens":512,"messages":[{"role":"user","content":"What's the weather in Paris?"}],"tools":[{"name":"get_weather","description":"Look up live weather for a city.","input_schema":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}],"tool_choice":{"type":"auto"}}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"de4e34fc-4bb7-4279-81ed-1e3cbcc919ac":{"description":"The message. `application/json` carries one `message` object; `text/event-stream` carries the event-typed frames of the stream.","headers":{"x-naga-dropped-tools":{"schema":{"type":"string"},"description":"Hosted tools from the request that did not run because no provider of the model could serve them right now, comma-separated: `web_search`. Absent when every requested tool was available. A NagaAI extension."},"x-naga-routing-strategy":{"schema":{"type":"string"},"description":"The routing strategy NagaAI applied to this request."}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"The message. The gateway answers a request it does not forward with the second shape, which omits `container` and `stop_details` and adds `created`.","required":["id","type","role","content","model","stop_reason","stop_sequence","stop_details","container","usage"],"properties":{"id":{"type":"string","description":"This answer's identifier.","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"},"type":{"type":"string","description":"What kind of object this is. Always `message`.","isRequired":true,"uniqueKey":"oneOf.0.type","typeLabel":"string"},"role":{"type":"string","description":"Who wrote it. Always `assistant`.","isRequired":true,"uniqueKey":"oneOf.0.role","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["thinking","signature","type"],"properties":{"thinking":{"type":"string","description":"The reasoning, as text meant to be read.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.0.thinking","typeLabel":"string"},"signature":{"type":"string","description":"An opaque token vouching for the reasoning it accompanies, replayed unchanged.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.0.signature","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking`.","enum":["thinking"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["data","type"],"properties":{"data":{"type":"string","description":"The reasoning in opaque form, replayed unchanged on a later turn.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.1.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `redacted_thinking`.","enum":["redacted_thinking"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["text","citations","type"],"properties":{"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.2.text","typeLabel":"string"},"citations":{"type":"null","description":"Always `null`. Citations are not attached to text on this gateway, and the key stays because the Anthropic block carries it.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.2.citations","typeLabel":"null"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, repeated as `tool_use_id` on the block carrying the result.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.id","typeLabel":"string"},"name":{"type":"string","description":"Which of your tools to call, by the name you declared it under.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.name","typeLabel":"string"},"input":{"description":"The arguments to call it with, as an object. They are never checked against the tool's own schema, so a model can produce arguments the schema does not declare.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.input","typeLabel":"any"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_use`.","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, which the matching result block quotes.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.id","typeLabel":"string"},"name":{"type":"string","description":"Which server-side tool ran. Always `web_search` — it is the only one this gateway serves.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.name","typeLabel":"string"},"input":{"type":"object","description":"What the tool was called with.","properties":{"query":{"oneOf":[{"type":"string","description":"What the model searched for.","uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.input.query.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the model searched for.","uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.input.query.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.input.query","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.input","typeLabel":"object"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `server_tool_use`.","enum":["server_tool_use"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["tool_use_id","content","caller","type"],"properties":{"tool_use_id":{"type":"string","description":"The id of the `server_tool_use` block this answers.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.tool_use_id","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"One page the model's web search returned.","required":["type","url","title","encrypted_content","page_age"],"properties":{"type":{"type":"string","description":"What kind of result this is. Always `web_search_result`.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].type","typeLabel":"string"},"url":{"type":"string","description":"The page's address.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].url","typeLabel":"string"},"title":{"oneOf":[{"type":"string","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].title","typeLabel":"string | null"},"encrypted_content":{"oneOf":[{"type":"string","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content","typeLabel":"string | null"},"page_age":{"oneOf":[{"type":"string","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age.oneOf.0","typeLabel":"string"},{"type":"null","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age","typeLabel":"string | null"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content.items.[INDEX]","typeLabel":"object"},"description":"The pages the search returned.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.content","typeLabel":"object[]"},"caller":{"type":"object","description":"Who made the call being answered.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_search_tool_result`.","enum":["web_search_tool_result"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"Where to read the image.","required":["media_type","data","type"],"properties":{"media_type":{"type":"string","description":"The image's media type, `image/png` when the provider named none.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.0.media_type","typeLabel":"string"},"data":{"type":"string","description":"The image's bytes, base64-encoded.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.0.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `base64`.","enum":["base64"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where to read the image.","required":["url","type"],"properties":{"url":{"type":"string","description":"Where the image is served from.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.1.url","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `url`.","enum":["url"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.6","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["source","title","content","citations","type"],"properties":{"source":{"type":"string","description":"Where the document came from.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.source","typeLabel":"string"},"title":{"type":"string","description":"The document's title.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.title","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"A piece of text inside a search-result block.","required":["type","text"],"properties":{"type":{"type":"string","description":"What kind of piece this is. Always `text`.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.content.items.[INDEX].type","typeLabel":"string"},"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.content.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.content.items.[INDEX]","typeLabel":"object"},"description":"The document's text.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.content","typeLabel":"object[]"},"citations":{"description":"The citation settings that came with the document, or `null` when it carried none.","isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.citations","typeLabel":"any"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.content.items.[INDEX].oneOf.7","typeLabel":"object"}],"uniqueKey":"oneOf.0.content.items.[INDEX]","typeLabel":"object"},"description":"The answer itself, block by block.","isRequired":true,"uniqueKey":"oneOf.0.content","typeLabel":"object[]"},"model":{"type":"string","description":"The model that answered, by its id in the NagaAI catalog.","isRequired":true,"uniqueKey":"oneOf.0.model","typeLabel":"string"},"stop_reason":{"oneOf":[{"type":"string","description":"Why the model stopped, in one of four values.","isRequired":true,"uniqueKey":"oneOf.0.stop_reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why the model stopped, in one of four values.","isRequired":true,"uniqueKey":"oneOf.0.stop_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.stop_reason","typeLabel":"string | null"},"stop_sequence":{"type":"null","description":"Always `null`. Stop sequences are not reported back, which is why `stop_reason` is never `stop_sequence` either.","isRequired":true,"uniqueKey":"oneOf.0.stop_sequence","typeLabel":"null"},"stop_details":{"type":"null","description":"Always `null`. `stop_reason` carries the whole of what is known about why the turn ended.","isRequired":true,"uniqueKey":"oneOf.0.stop_details","typeLabel":"null"},"container":{"type":"null","description":"Always `null`. Code-execution containers are not served.","isRequired":true,"uniqueKey":"oneOf.0.container","typeLabel":"null"},"usage":{"type":"object","description":"What the request cost in tokens.","required":["input_tokens","output_tokens","cache_creation","cache_creation_input_tokens","cache_read_input_tokens","server_tool_use","service_tier","inference_geo","output_tokens_details"],"properties":{"input_tokens":{"type":"integer","format":"int64","description":"Tokens of the prompt read fresh, cache reads excluded.","isRequired":true,"uniqueKey":"oneOf.0.usage.input_tokens","typeLabel":"integer\u003cint64>"},"output_tokens":{"type":"integer","format":"int64","description":"Tokens the model generated, its reasoning included.","isRequired":true,"uniqueKey":"oneOf.0.usage.output_tokens","typeLabel":"integer\u003cint64>"},"cache_creation":{"oneOf":[{"type":"object","description":"The cache write split by lifetime, or `null` when the request wrote nothing to the cache.","required":["ephemeral_5m_input_tokens","ephemeral_1h_input_tokens"],"properties":{"ephemeral_5m_input_tokens":{"type":"integer","format":"int64","description":"Tokens written with the default five-minute lifetime.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation.oneOf.0.ephemeral_5m_input_tokens","typeLabel":"integer\u003cint64>"},"ephemeral_1h_input_tokens":{"type":"integer","format":"int64","description":"Tokens written with the one-hour lifetime (`cache_control.ttl: \"1h\"`), billed at their own rate.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation.oneOf.0.ephemeral_1h_input_tokens","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation","typeLabel":"object | null"},"cache_creation_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens written into the prompt cache by this request, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens written into the prompt cache by this request, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.usage.cache_creation_input_tokens","typeLabel":"integer\u003cint64> | null"},"cache_read_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens served to this request out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_read_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens served to this request out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.usage.cache_read_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.usage.cache_read_input_tokens","typeLabel":"integer\u003cint64> | null"},"server_tool_use":{"oneOf":[{"type":"object","description":"How many times server-side tools ran, or `null` when none did.","required":["web_search_requests","web_fetch_requests"],"properties":{"web_search_requests":{"type":"integer","format":"int64","description":"How many web searches the model ran.","isRequired":true,"uniqueKey":"oneOf.0.usage.server_tool_use.oneOf.0.web_search_requests","typeLabel":"integer\u003cint64>"},"web_fetch_requests":{"type":"integer","format":"int64","description":"Always `0`. The gateway serves no web fetch.","isRequired":true,"uniqueKey":"oneOf.0.usage.server_tool_use.oneOf.0.web_fetch_requests","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.0.usage.server_tool_use.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.usage.server_tool_use.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.usage.server_tool_use","typeLabel":"object | null"},"service_tier":{"type":"null","description":"Always `null`. This gateway routes by its own catalog, so the Anthropic service tier does not apply to an answer served through it.","isRequired":true,"uniqueKey":"oneOf.0.usage.service_tier","typeLabel":"null"},"inference_geo":{"type":"null","description":"Always `null`. Where the inference ran is not reported.","isRequired":true,"uniqueKey":"oneOf.0.usage.inference_geo","typeLabel":"null"},"output_tokens_details":{"type":"null","description":"Always `null`. The breakdown of `output_tokens` into thinking tokens and the rest is not surfaced. `output_tokens` is the total that counts.","isRequired":true,"uniqueKey":"oneOf.0.usage.output_tokens_details","typeLabel":"null"}},"isRequired":true,"uniqueKey":"oneOf.0.usage","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"The message. The gateway answers a request it does not forward with the second shape, which omits `container` and `stop_details` and adds `created`.","required":["id","model","content","stop_sequence","created"],"properties":{"id":{"type":"string","description":"This answer's identifier: `msg_` followed by 28 random alphanumerics.","isRequired":true,"uniqueKey":"oneOf.1.id","typeLabel":"string"},"model":{"type":"string","description":"The model that answered, after alias resolution.","isRequired":true,"uniqueKey":"oneOf.1.model","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"One block of the answer's content, tagged by `type`.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, tagged by `type`.","required":["type","thinking"],"properties":{"thinking":{"type":"string","description":"The reasoning, as text meant to be read.","isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1.thinking","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking`.","enum":["thinking"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"signature":{"oneOf":[{"type":"string","description":"An opaque token vouching for the reasoning it accompanies, replayed unchanged.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1.signature.oneOf.0","typeLabel":"string"},{"type":"null","description":"An opaque token vouching for the reasoning it accompanies, replayed unchanged.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1.signature.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1.signature","typeLabel":"string | null"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, tagged by `type`.","required":["type","source"],"properties":{"source":{"type":"object","description":"Where to read the image.","required":["type","url"],"properties":{"type":{"type":"string","description":"Which form the source takes. Always `url`.","enum":["url"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.2.source.type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","description":"Where the image is served from.","isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.2.source.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, tagged by `type`.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"title":{"oneOf":[{"type":"string","description":"The document's title. Left out when it carried none.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The document's title. Left out when it carried none.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.title","typeLabel":"string | null"},"source":{"oneOf":[{"type":"string","description":"Where the document came from. Left out when nothing recorded it.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.source.oneOf.0","typeLabel":"string"},{"type":"null","description":"Where the document came from. Left out when nothing recorded it.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.source","typeLabel":"string | null"},"content":{"type":"array","items":{"type":"object","description":"A piece of text inside a search-result block.","required":["type","text"],"properties":{"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"The document's text, piece by piece.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3.content","typeLabel":"object[]"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, tagged by `type`.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_use`.","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"id":{"oneOf":[{"type":"string","description":"The call's id, repeated as `tool_use_id` on the block carrying the result.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The call's id, repeated as `tool_use_id` on the block carrying the result.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.id","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","description":"Which of your tools to call, by the name you declared it under.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Which of your tools to call, by the name you declared it under.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.name","typeLabel":"string | null"},"input":{"oneOf":[{"type":"object","description":"The arguments to call it with, never checked against the tool's schema.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.input.oneOf.0","typeLabel":"object"},{"type":"string","title":"Raw JSON string","description":"The arguments to call it with, never checked against the tool's schema.","uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.input.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4.input","typeLabel":"object | string"}},"uniqueKey":"oneOf.1.content.items.[INDEX].oneOf.4","typeLabel":"object"}],"uniqueKey":"oneOf.1.content.items.[INDEX]","typeLabel":"object"},"description":"The answer itself, block by block.","isRequired":true,"uniqueKey":"oneOf.1.content","typeLabel":"object[]"},"stop_sequence":{"oneOf":[{"type":"string","description":"Always `null` on this body, and the key is always present.","isRequired":true,"uniqueKey":"oneOf.1.stop_sequence.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always `null` on this body, and the key is always present.","isRequired":true,"uniqueKey":"oneOf.1.stop_sequence.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.stop_sequence","typeLabel":"string | null"},"created":{"type":"integer","format":"int64","description":"When the answer was made, in seconds since the Unix epoch. A NagaAI extension.","isRequired":true,"uniqueKey":"oneOf.1.created","typeLabel":"integer\u003cint64>"},"type":{"type":"string","description":"What kind of object this is. Always `message`.","enum":["message"],"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"role":{"type":"string","description":"Who wrote it. Always `assistant`.","enum":["assistant"],"uniqueKey":"oneOf.1.role","typeLabel":"enum\u003cstring>"},"stop_reason":{"oneOf":[{"type":"string","description":"Why the model stopped, left out when nothing set it.","uniqueKey":"oneOf.1.stop_reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why the model stopped, left out when nothing set it.","uniqueKey":"oneOf.1.stop_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.stop_reason","typeLabel":"string | null"},"usage":{"oneOf":[{"type":"object","description":"What the request cost in tokens, every counter zero on this body.","required":["input_tokens","output_tokens"],"properties":{"input_tokens":{"type":"integer","format":"int64","description":"Tokens of the prompt read fresh, cache reads excluded.","isRequired":true,"uniqueKey":"oneOf.1.usage.oneOf.0.input_tokens","typeLabel":"integer\u003cint64>"},"output_tokens":{"type":"integer","format":"int64","description":"Tokens the model generated, its reasoning included.","isRequired":true,"uniqueKey":"oneOf.1.usage.oneOf.0.output_tokens","typeLabel":"integer\u003cint64>"},"cache_read_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens served to this request out of the prompt cache.","uniqueKey":"oneOf.1.usage.oneOf.0.cache_read_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens served to this request out of the prompt cache.","uniqueKey":"oneOf.1.usage.oneOf.0.cache_read_input_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.cache_read_input_tokens","typeLabel":"integer\u003cint64> | null"}},"uniqueKey":"oneOf.1.usage.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"oneOf.1.usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage","typeLabel":"object | null"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","summary":"One `message` object","value":{"id":"msg_01UvWq7Kt3xZbN9","type":"message","role":"assistant","content":[{"type":"text","text":"Hi!","citations":null}],"model":"anthropic/claude-sonnet-5.5","stop_reason":"end_turn","stop_sequence":null,"stop_details":null,"container":null,"usage":{"input_tokens":5,"output_tokens":4,"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"server_tool_use":null,"service_tier":null,"inference_geo":null,"output_tokens_details":null}}},"reasoning":{"title":"reasoning","summary":"A thinking block, then the answer","value":{"id":"msg_01Rq4Zt8Nb2xVk1","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"plan: identify hot files; split by responsibility; ","signature":"sig_alpha"},{"type":"text","text":"Here is the plan.","citations":null}],"model":"anthropic/claude-opus-5.5","stop_reason":"end_turn","stop_sequence":null,"stop_details":null,"container":null,"usage":{"input_tokens":12,"output_tokens":80,"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"server_tool_use":null,"service_tier":null,"inference_geo":null,"output_tokens_details":null}}},"tool-call":{"title":"tool-call","summary":"The turn stopped to use a tool","value":{"id":"msg_01Hn6Yc2Wp5tQz8","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01A09q90qw90lq917835lq9","name":"get_weather","input":{"city":"Paris"},"caller":{"type":"assistant"}}],"model":"anthropic/claude-sonnet-5.5","stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"container":null,"usage":{"input_tokens":5,"output_tokens":4,"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"server_tool_use":null,"service_tier":null,"inference_geo":null,"output_tokens_details":null}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"oneOf":[{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["message","type"],"properties":{"message":{"type":"object","description":"The skeleton — `content` empty, `usage` zeroed, `stop_reason` null.","required":["id","type","role","content","model","stop_reason","stop_sequence","stop_details","container","usage"],"properties":{"id":{"type":"string","description":"This answer's identifier.","isRequired":true,"uniqueKey":"oneOf.0.message.id","typeLabel":"string"},"type":{"type":"string","description":"What kind of object this is. Always `message`.","isRequired":true,"uniqueKey":"oneOf.0.message.type","typeLabel":"string"},"role":{"type":"string","description":"Who wrote it. Always `assistant`.","isRequired":true,"uniqueKey":"oneOf.0.message.role","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["thinking","signature","type"],"properties":{"thinking":{"type":"string","description":"The reasoning, as text meant to be read.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.0.thinking","typeLabel":"string"},"signature":{"type":"string","description":"An opaque token vouching for the reasoning it accompanies, replayed unchanged.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.0.signature","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking`.","enum":["thinking"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["data","type"],"properties":{"data":{"type":"string","description":"The reasoning in opaque form, replayed unchanged on a later turn.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.1.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `redacted_thinking`.","enum":["redacted_thinking"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["text","citations","type"],"properties":{"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.2.text","typeLabel":"string"},"citations":{"type":"null","description":"Always `null`. Citations are not attached to text on this gateway, and the key stays because the Anthropic block carries it.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.2.citations","typeLabel":"null"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, repeated as `tool_use_id` on the block carrying the result.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.id","typeLabel":"string"},"name":{"type":"string","description":"Which of your tools to call, by the name you declared it under.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.name","typeLabel":"string"},"input":{"description":"The arguments to call it with, as an object. They are never checked against the tool's own schema, so a model can produce arguments the schema does not declare.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.input","typeLabel":"any"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_use`.","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, which the matching result block quotes.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.id","typeLabel":"string"},"name":{"type":"string","description":"Which server-side tool ran. Always `web_search` — it is the only one this gateway serves.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.name","typeLabel":"string"},"input":{"type":"object","description":"What the tool was called with.","properties":{"query":{"oneOf":[{"type":"string","description":"What the model searched for.","uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.input.query.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the model searched for.","uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.input.query.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.input.query","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.input","typeLabel":"object"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `server_tool_use`.","enum":["server_tool_use"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["tool_use_id","content","caller","type"],"properties":{"tool_use_id":{"type":"string","description":"The id of the `server_tool_use` block this answers.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.tool_use_id","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"One page the model's web search returned.","required":["type","url","title","encrypted_content","page_age"],"properties":{"type":{"type":"string","description":"What kind of result this is. Always `web_search_result`.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].type","typeLabel":"string"},"url":{"type":"string","description":"The page's address.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].url","typeLabel":"string"},"title":{"oneOf":[{"type":"string","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].title","typeLabel":"string | null"},"encrypted_content":{"oneOf":[{"type":"string","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].encrypted_content","typeLabel":"string | null"},"page_age":{"oneOf":[{"type":"string","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age.oneOf.0","typeLabel":"string"},{"type":"null","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX].page_age","typeLabel":"string | null"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content.items.[INDEX]","typeLabel":"object"},"description":"The pages the search returned.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.content","typeLabel":"object[]"},"caller":{"type":"object","description":"Who made the call being answered.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_search_tool_result`.","enum":["web_search_tool_result"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"Where to read the image.","required":["media_type","data","type"],"properties":{"media_type":{"type":"string","description":"The image's media type, `image/png` when the provider named none.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.0.media_type","typeLabel":"string"},"data":{"type":"string","description":"The image's bytes, base64-encoded.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.0.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `base64`.","enum":["base64"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where to read the image.","required":["url","type"],"properties":{"url":{"type":"string","description":"Where the image is served from.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.1.url","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `url`.","enum":["url"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.6","typeLabel":"object"},{"type":"object","description":"One block of the answer's content, in the order the model produced it.","required":["source","title","content","citations","type"],"properties":{"source":{"type":"string","description":"Where the document came from.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.source","typeLabel":"string"},"title":{"type":"string","description":"The document's title.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.title","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"A piece of text inside a search-result block.","required":["type","text"],"properties":{"type":{"type":"string","description":"What kind of piece this is. Always `text`.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.content.items.[INDEX].type","typeLabel":"string"},"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.content.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.content.items.[INDEX]","typeLabel":"object"},"description":"The document's text.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.content","typeLabel":"object[]"},"citations":{"description":"The citation settings that came with the document, or `null` when it carried none.","isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.citations","typeLabel":"any"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.message.content.items.[INDEX].oneOf.7","typeLabel":"object"}],"uniqueKey":"oneOf.0.message.content.items.[INDEX]","typeLabel":"object"},"description":"The answer itself, block by block.","isRequired":true,"uniqueKey":"oneOf.0.message.content","typeLabel":"object[]"},"model":{"type":"string","description":"The model that answered, by its id in the NagaAI catalog.","isRequired":true,"uniqueKey":"oneOf.0.message.model","typeLabel":"string"},"stop_reason":{"oneOf":[{"type":"string","description":"Why the model stopped, in one of four values.","isRequired":true,"uniqueKey":"oneOf.0.message.stop_reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why the model stopped, in one of four values.","isRequired":true,"uniqueKey":"oneOf.0.message.stop_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.stop_reason","typeLabel":"string | null"},"stop_sequence":{"type":"null","description":"Always `null`. Stop sequences are not reported back, which is why `stop_reason` is never `stop_sequence` either.","isRequired":true,"uniqueKey":"oneOf.0.message.stop_sequence","typeLabel":"null"},"stop_details":{"type":"null","description":"Always `null`. `stop_reason` carries the whole of what is known about why the turn ended.","isRequired":true,"uniqueKey":"oneOf.0.message.stop_details","typeLabel":"null"},"container":{"type":"null","description":"Always `null`. Code-execution containers are not served.","isRequired":true,"uniqueKey":"oneOf.0.message.container","typeLabel":"null"},"usage":{"type":"object","description":"What the request cost in tokens.","required":["input_tokens","output_tokens","cache_creation","cache_creation_input_tokens","cache_read_input_tokens","server_tool_use","service_tier","inference_geo","output_tokens_details"],"properties":{"input_tokens":{"type":"integer","format":"int64","description":"Tokens of the prompt read fresh, cache reads excluded.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.input_tokens","typeLabel":"integer\u003cint64>"},"output_tokens":{"type":"integer","format":"int64","description":"Tokens the model generated, its reasoning included.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.output_tokens","typeLabel":"integer\u003cint64>"},"cache_creation":{"oneOf":[{"type":"object","description":"The cache write split by lifetime, or `null` when the request wrote nothing to the cache.","required":["ephemeral_5m_input_tokens","ephemeral_1h_input_tokens"],"properties":{"ephemeral_5m_input_tokens":{"type":"integer","format":"int64","description":"Tokens written with the default five-minute lifetime.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation.oneOf.0.ephemeral_5m_input_tokens","typeLabel":"integer\u003cint64>"},"ephemeral_1h_input_tokens":{"type":"integer","format":"int64","description":"Tokens written with the one-hour lifetime (`cache_control.ttl: \"1h\"`), billed at their own rate.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation.oneOf.0.ephemeral_1h_input_tokens","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation","typeLabel":"object | null"},"cache_creation_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens written into the prompt cache by this request, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens written into the prompt cache by this request, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_creation_input_tokens","typeLabel":"integer\u003cint64> | null"},"cache_read_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens served to this request out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_read_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens served to this request out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_read_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.usage.cache_read_input_tokens","typeLabel":"integer\u003cint64> | null"},"server_tool_use":{"oneOf":[{"type":"object","description":"How many times server-side tools ran, or `null` when none did.","required":["web_search_requests","web_fetch_requests"],"properties":{"web_search_requests":{"type":"integer","format":"int64","description":"How many web searches the model ran.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.server_tool_use.oneOf.0.web_search_requests","typeLabel":"integer\u003cint64>"},"web_fetch_requests":{"type":"integer","format":"int64","description":"Always `0`. The gateway serves no web fetch.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.server_tool_use.oneOf.0.web_fetch_requests","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.0.message.usage.server_tool_use.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.message.usage.server_tool_use.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.message.usage.server_tool_use","typeLabel":"object | null"},"service_tier":{"type":"null","description":"Always `null`. This gateway routes by its own catalog, so the Anthropic service tier does not apply to an answer served through it.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.service_tier","typeLabel":"null"},"inference_geo":{"type":"null","description":"Always `null`. Where the inference ran is not reported.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.inference_geo","typeLabel":"null"},"output_tokens_details":{"type":"null","description":"Always `null`. The breakdown of `output_tokens` into thinking tokens and the rest is not surfaced. `output_tokens` is the total that counts.","isRequired":true,"uniqueKey":"oneOf.0.message.usage.output_tokens_details","typeLabel":"null"}},"isRequired":true,"uniqueKey":"oneOf.0.message.usage","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `message_start`.","enum":["message_start"],"isRequired":true,"uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["index","content_block","type"],"properties":{"index":{"type":"integer","format":"int64","description":"Which block of the answer this is, counted from `0` in the order the blocks open. Every later frame about this block quotes the number.","isRequired":true,"uniqueKey":"oneOf.1.index","typeLabel":"integer\u003cint64>"},"content_block":{"oneOf":[{"type":"object","description":"The block as it opens, empty for one that streams.","required":["thinking","signature","type"],"properties":{"thinking":{"type":"string","description":"The reasoning, as text meant to be read.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.0.thinking","typeLabel":"string"},"signature":{"type":"string","description":"An opaque token vouching for the reasoning it accompanies, replayed unchanged.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.0.signature","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking`.","enum":["thinking"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.0","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["data","type"],"properties":{"data":{"type":"string","description":"The reasoning in opaque form, replayed unchanged on a later turn.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.1.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `redacted_thinking`.","enum":["redacted_thinking"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.1","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["text","citations","type"],"properties":{"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.2.text","typeLabel":"string"},"citations":{"type":"null","description":"Always `null`. Citations are not attached to text on this gateway, and the key stays because the Anthropic block carries it.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.2.citations","typeLabel":"null"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text`.","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.2","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, repeated as `tool_use_id` on the block carrying the result.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.id","typeLabel":"string"},"name":{"type":"string","description":"Which of your tools to call, by the name you declared it under.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.name","typeLabel":"string"},"input":{"description":"The arguments to call it with, as an object. They are never checked against the tool's own schema, so a model can produce arguments the schema does not declare.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.input","typeLabel":"any"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `tool_use`.","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.3","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["id","name","input","caller","type"],"properties":{"id":{"type":"string","description":"The call's id, which the matching result block quotes.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.id","typeLabel":"string"},"name":{"type":"string","description":"Which server-side tool ran. Always `web_search` — it is the only one this gateway serves.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.name","typeLabel":"string"},"input":{"type":"object","description":"What the tool was called with.","properties":{"query":{"oneOf":[{"type":"string","description":"What the model searched for.","uniqueKey":"oneOf.1.content_block.oneOf.4.input.query.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the model searched for.","uniqueKey":"oneOf.1.content_block.oneOf.4.input.query.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.content_block.oneOf.4.input.query","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.input","typeLabel":"object"},"caller":{"type":"object","description":"Who made the call.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `server_tool_use`.","enum":["server_tool_use"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.4","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["tool_use_id","content","caller","type"],"properties":{"tool_use_id":{"type":"string","description":"The id of the `server_tool_use` block this answers.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.tool_use_id","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"One page the model's web search returned.","required":["type","url","title","encrypted_content","page_age"],"properties":{"type":{"type":"string","description":"What kind of result this is. Always `web_search_result`.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].type","typeLabel":"string"},"url":{"type":"string","description":"The page's address.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].url","typeLabel":"string"},"title":{"oneOf":[{"type":"string","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's title, or `null` when the search backend gave none.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].title","typeLabel":"string | null"},"encrypted_content":{"oneOf":[{"type":"string","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].encrypted_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The page's contents in opaque form, replayed unchanged rather than read.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].encrypted_content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].encrypted_content","typeLabel":"string | null"},"page_age":{"oneOf":[{"type":"string","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].page_age.oneOf.0","typeLabel":"string"},{"type":"null","description":"How old the page is, in the search backend's own words.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].page_age.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX].page_age","typeLabel":"string | null"}},"uniqueKey":"oneOf.1.content_block.oneOf.5.content.items.[INDEX]","typeLabel":"object"},"description":"The pages the search returned.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.content","typeLabel":"object[]"},"caller":{"type":"object","description":"Who made the call being answered.","required":["type"],"properties":{"type":{"type":"string","description":"How the call was reached. Always `direct`.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.caller.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.caller","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `web_search_tool_result`.","enum":["web_search_tool_result"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.5","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"Where to read the image.","required":["media_type","data","type"],"properties":{"media_type":{"type":"string","description":"The image's media type, `image/png` when the provider named none.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.0.media_type","typeLabel":"string"},"data":{"type":"string","description":"The image's bytes, base64-encoded.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.0.data","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `base64`.","enum":["base64"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where to read the image.","required":["url","type"],"properties":{"url":{"type":"string","description":"Where the image is served from.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.1.url","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `url`.","enum":["url"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.source","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `image`.","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.6","typeLabel":"object"},{"type":"object","description":"The block as it opens, empty for one that streams.","required":["source","title","content","citations","type"],"properties":{"source":{"type":"string","description":"Where the document came from.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.source","typeLabel":"string"},"title":{"type":"string","description":"The document's title.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.title","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","description":"A piece of text inside a search-result block.","required":["type","text"],"properties":{"type":{"type":"string","description":"What kind of piece this is. Always `text`.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.content.items.[INDEX].type","typeLabel":"string"},"text":{"type":"string","description":"The text itself.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.content.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"oneOf.1.content_block.oneOf.7.content.items.[INDEX]","typeLabel":"object"},"description":"The document's text.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.content","typeLabel":"object[]"},"citations":{"description":"The citation settings that came with the document, or `null` when it carried none.","isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.citations","typeLabel":"any"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `search_result`.","enum":["search_result"],"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.content_block.oneOf.7","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.content_block","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `content_block_start`.","enum":["content_block_start"],"isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["index","delta","type"],"properties":{"index":{"type":"integer","format":"int64","description":"Which block this adds to.","isRequired":true,"uniqueKey":"oneOf.2.index","typeLabel":"integer\u003cint64>"},"delta":{"oneOf":[{"type":"object","description":"What to append to it.","required":["thinking","type"],"properties":{"thinking":{"type":"string","description":"The text to append.","isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.0.thinking","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `thinking_delta`.","enum":["thinking_delta"],"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.0","typeLabel":"object"},{"type":"object","description":"What to append to it.","required":["signature","type"],"properties":{"signature":{"type":"string","description":"The signature. Not a slice: it replaces nothing and is appended to nothing.","isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.1.signature","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `signature_delta`.","enum":["signature_delta"],"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.1","typeLabel":"object"},{"type":"object","description":"What to append to it.","required":["partial_json","type"],"properties":{"partial_json":{"type":"string","description":"The next piece of the argument JSON; no piece is valid JSON alone.","isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.2.partial_json","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `input_json_delta`.","enum":["input_json_delta"],"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.2","typeLabel":"object"},{"type":"object","description":"What to append to it.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text to append. It can be a fragment of a word.","isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.3.text","typeLabel":"string"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `text_delta`.","enum":["text_delta"],"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.3.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.2.delta.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.2.delta","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `content_block_delta`.","enum":["content_block_delta"],"isRequired":true,"uniqueKey":"oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.2","typeLabel":"object"},{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["index","type"],"properties":{"index":{"type":"integer","format":"int64","description":"Which block finished.","isRequired":true,"uniqueKey":"oneOf.3.index","typeLabel":"integer\u003cint64>"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `content_block_stop`.","enum":["content_block_stop"],"isRequired":true,"uniqueKey":"oneOf.3.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.3","typeLabel":"object"},{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["delta","usage","type"],"properties":{"delta":{"type":"object","description":"Why the model stopped.","required":["stop_reason","stop_sequence","stop_details","container"],"properties":{"stop_reason":{"type":"string","description":"Why the model stopped, and never `null` on this frame.","isRequired":true,"uniqueKey":"oneOf.4.delta.stop_reason","typeLabel":"string"},"stop_sequence":{"type":"null","description":"Always `null`. Stop sequences are not reported back, which is why `stop_reason` is never `stop_sequence` either.","isRequired":true,"uniqueKey":"oneOf.4.delta.stop_sequence","typeLabel":"null"},"stop_details":{"type":"null","description":"Always `null`. `stop_reason` carries the whole of what is known about why the turn ended.","isRequired":true,"uniqueKey":"oneOf.4.delta.stop_details","typeLabel":"null"},"container":{"type":"null","description":"Always `null`. Code-execution containers are not served.","isRequired":true,"uniqueKey":"oneOf.4.delta.container","typeLabel":"null"}},"isRequired":true,"uniqueKey":"oneOf.4.delta","typeLabel":"object"},"usage":{"type":"object","description":"What the whole turn cost in tokens — the authoritative figures, which the zeroed usage on `message_start` was not.","required":["output_tokens","input_tokens","cache_creation_input_tokens","cache_read_input_tokens","server_tool_use","output_tokens_details"],"properties":{"output_tokens":{"type":"integer","format":"int64","description":"Tokens the model generated over the whole turn.","isRequired":true,"uniqueKey":"oneOf.4.usage.output_tokens","typeLabel":"integer\u003cint64>"},"input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens of the prompt read fresh, cache reads excluded, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens of the prompt read fresh, cache reads excluded, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.4.usage.input_tokens","typeLabel":"integer\u003cint64> | null"},"cache_creation_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens written into the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.cache_creation_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens written into the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.cache_creation_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.4.usage.cache_creation_input_tokens","typeLabel":"integer\u003cint64> | null"},"cache_read_input_tokens":{"oneOf":[{"type":"integer","format":"int64","description":"Tokens served out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.cache_read_input_tokens.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Tokens served out of the prompt cache, or `null`.","isRequired":true,"uniqueKey":"oneOf.4.usage.cache_read_input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.4.usage.cache_read_input_tokens","typeLabel":"integer\u003cint64> | null"},"server_tool_use":{"oneOf":[{"type":"object","description":"How many times server-side tools ran, or `null` when none did.","required":["web_search_requests","web_fetch_requests"],"properties":{"web_search_requests":{"type":"integer","format":"int64","description":"How many web searches the model ran.","isRequired":true,"uniqueKey":"oneOf.4.usage.server_tool_use.oneOf.0.web_search_requests","typeLabel":"integer\u003cint64>"},"web_fetch_requests":{"type":"integer","format":"int64","description":"Always `0`. The gateway serves no web fetch.","isRequired":true,"uniqueKey":"oneOf.4.usage.server_tool_use.oneOf.0.web_fetch_requests","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.4.usage.server_tool_use.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.4.usage.server_tool_use.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.4.usage.server_tool_use","typeLabel":"object | null"},"output_tokens_details":{"type":"null","description":"Always `null`. The breakdown of `output_tokens` into thinking tokens and the rest is not surfaced. `output_tokens` is the total that counts.","isRequired":true,"uniqueKey":"oneOf.4.usage.output_tokens_details","typeLabel":"null"}},"isRequired":true,"uniqueKey":"oneOf.4.usage","typeLabel":"object"},"type":{"type":"string","description":"The tag that selects this branch: `type` is `message_delta`.","enum":["message_delta"],"isRequired":true,"uniqueKey":"oneOf.4.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.4","typeLabel":"object"},{"type":"object","description":"One frame of a streamed answer. There is no `[DONE]` sentinel and no keep-alive ping.","required":["type"],"properties":{"type":{"type":"string","description":"The tag that selects this branch: `type` is `message_stop`.","enum":["message_stop"],"isRequired":true,"uniqueKey":"oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.5","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","summary":"A text delta of a streamed answer","value":{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hi!"}}},"reasoning":{"title":"reasoning","summary":"A thinking delta, before any text block opens","value":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"plan: identify hot files; "}}},"tool-call":{"title":"tool-call","summary":"The tool input arrives as partial JSON","value":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"{\"city\":"}}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"58e5c4f3-2ce7-4bfe-b5a0-ba6aeddb07d6":{"description":"The request is malformed: a field failed its constraint, the body is not valid JSON, the model name is unknown, or no provider serves it within its price limit.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"ed7a3a01-c0ee-4b6b-b220-5c776c177d9d":{"description":"The API key is missing, malformed, disabled, or does not belong to an account that may call this route.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid-api-key":{"title":"invalid-api-key","summary":"401 — the key is not one this gateway serves","value":{"type":"error","error":{"type":"authentication_error","message":"The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."}}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"03ef17b2-b86f-4d79-9c64-862f906e248b":{"description":"The account has run out of credits. Top up the balance and retry.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient-credits":{"title":"insufficient-credits","summary":"402 — the account has no credits left","value":{"type":"error","error":{"type":"billing_error","message":"More credits required to process this request. Visit https://naga.ac/dashboard/credits to add credits."}}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"71752ea9-ab00-461c-9642-036e0fdc3576":{"description":"The model policy of the organization or of the key's workspace does not allow this model, a spending limit is reached, or the content was blocked by the moderation policy.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"fa2fdf8c-dfc3-4de9-9e69-8866015ae6d2":{"description":"The upstream provider reports that the addressed resource does not exist.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"2830876e-0cb1-4853-9132-2964f3d5718f":{"description":"The request body did not finish arriving within 15 minutes, or stalled for 60 seconds.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":true,"exampleType":"generated"},"7dfbf226-62c5-4bc1-b58b-573d1611715b":{"description":"The model is deprecated and no longer served. Pick a current one.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"58450a3f-f285-4bb3-b781-bcd82277be5b":{"description":"The request body is larger than the 32 MiB this gateway accepts.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"02c453e9-8afb-49e4-9638-3f345f3619c0":{"description":"The request was understood but its usage could not be metered, so it was not served.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"c8c30f76-3724-494f-a0bd-83964a81e43a":{"description":"The account exceeded its rate limit. `Retry-After` carries the wait in seconds.","headers":{"Retry-After":{"schema":{"type":"string"},"description":"How long to wait before retrying, in seconds."}},"content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rate-limited":{"title":"rate-limited","summary":"429 — too many requests; `Retry-After` carries the wait","value":{"type":"error","error":{"type":"rate_limit_error","message":"Free model limit reached (100 requests per day and 10 per minute). Try again in 3s, or add credits at https://naga.ac/dashboard/credits to use paid models, which have no request limit."}}}},"exampleType":"examples"}},"x-retry-safe":true,"exampleType":"examples"},"022ecb5e-fedf-4300-aa66-7491c2375ef4":{"description":"The gateway failed for a reason of its own. Report it — this status marks NagaAI's own bugs, never an upstream verdict.","content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":true,"exampleType":"generated"},"08f5d42a-a474-4362-9471-a69ec7141525":{"description":"No upstream is available, or the gateway is shedding load. `Retry-After` carries the suggested wait.","headers":{"Retry-After":{"schema":{"type":"string"},"description":"How long to wait before retrying, in seconds."}},"content":{"application/json":{"schema":{"type":"object","description":"A failure, in the Anthropic envelope, carrying no `code` and no `param`.","required":["type","error"],"properties":{"type":{"type":"string","description":"What kind of object this is. Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; anything the gateway cannot place is `api_error`.","examples":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","request_too_large","overloaded_error","billing_error","timeout_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"What went wrong, in prose meant to be read.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","error":{"type":"invalid_request_error","message":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":true,"exampleType":"generated"}},"security":{"b6e678f9-f19c-4c49-a772-759ebba54f9e":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"bearerAuth"}},"fe39e5ef-e7b9-474f-83f2-a31b76e69d0f":{"xApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","scopes":[],"schemeName":"xApiKeyAuth"}}},"servers":{"ddee1100-762b-4028-ac39-d54cdb9aa21e":{"url":"https://api.naga.ac","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","scopes":[],"schemeName":"xApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"xApiKeyAuth","name":"x-api-key"}],"title":"xApiKeyAuth"}]},"originalFileLocation":"openapi/naga-api.json"},"subdomain":"nagaai-60f8697b","siteName":"NagaAI Documentation","title":"Create a message - NagaAI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T16:54:45.242Z","originalFileLocation":"api-reference/messages/create-a-message.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.\">\u003cmeta data-mint-head name=\"application-name\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a message - NagaAI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.naga.ac/api-reference/messages/create-a-message\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nagaai-60f8697b.mintlify.site/_mintlify/api/og/v2?division=Messages\u0026amp;title=Create+a+message\u0026amp;description=Creates+a+model+response+in+the+Anthropic+Messages+dialect+and+charges+the+account+for+the+tokens+it+used.+Requires+an+API+key.+%60%2Fv1%2Fchat%2Fcompletions%60+and+%60%2Fv1%2F\u0026amp;theme=53b53c58c5b757ba80c9164d\u0026amp;signature=9b7d91d8099d64f5663b87ba973c98c822f7d4099db3a281638a2314e8ae1056\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a message - NagaAI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nagaai-60f8697b.mintlify.site/_mintlify/api/og/v2?division=Messages\u0026amp;title=Create+a+message\u0026amp;description=Creates+a+model+response+in+the+Anthropic+Messages+dialect+and+charges+the+account+for+the+tokens+it+used.+Requires+an+API+key.+%60%2Fv1%2Fchat%2Fcompletions%60+and+%60%2Fv1%2F\u0026amp;theme=53b53c58c5b757ba80c9164d\u0026amp;signature=9b7d91d8099d64f5663b87ba973c98c822f7d4099db3a281638a2314e8ae1056\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5a5ae5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.naga.ac/api-reference/messages/create-a-message\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/messages/create-a-message.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.naga.ac/#organization\",\"name\":\"NagaAI Documentation\",\"url\":\"https://docs.naga.ac\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-light.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=18d579338bd90baa596e41e2e2322393\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.naga.ac#website\",\"name\":\"NagaAI Documentation\",\"url\":\"https://docs.naga.ac\",\"publisher\":{\"@id\":\"https://docs.naga.ac/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.naga.ac/api-reference/messages/create-a-message#webpage\",\"url\":\"https://docs.naga.ac/api-reference/messages/create-a-message\",\"name\":\"Create a message\",\"description\":\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.\",\"dateModified\":\"2026-11-19T16:54:45.242Z\",\"isPartOf\":{\"@id\":\"https://docs.naga.ac#website\"},\"breadcrumb\":{\"@id\":\"https://docs.naga.ac/api-reference/messages/create-a-message#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.naga.ac/api-reference/messages/create-a-message#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.naga.ac/api-reference/responses/create-a-response\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a message\",\"item\":\"https://docs.naga.ac/api-reference/messages/create-a-message\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.naga.ac/api-reference/messages/create-a-message#apireference\",\"headline\":\"Create a message\",\"name\":\"Create a message\",\"description\":\"Creates a model response in the Anthropic Messages dialect and charges the account for the tokens it used. Requires an API key. /v1/chat/completions and /v1/responses serve the same models in the other two dialects.\",\"url\":\"https://docs.naga.ac/api-reference/messages/create-a-message\",\"mainEntityOfPage\":{\"@id\":\"https://docs.naga.ac/api-reference/messages/create-a-message#webpage\"},\"dateModified\":\"2026-11-19T16:54:45.242Z\",\"publisher\":{\"@id\":\"https://docs.naga.ac/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.naga.ac#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NagaAI Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"NagaAI Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/messages/create-a-message.md","siteName":"NagaAI Documentation","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/get-started/quickstart"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API reference","sidebarTitle":"Overview","icon":"book","href":"/api-reference/overview"}]},{"group":"Endpoints","pages":[{"group":"Responses","expanded":false,"pages":[{"title":"Create a response","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/responses","href":"/api-reference/responses/create-a-response"}]},{"group":"Chat Completions","expanded":false,"pages":[{"title":"Create a chat completion","description":"Creates a model response in the OpenAI Chat Completions dialect and charges the account for the tokens it used. Requires an API key. `/v1/responses` and `/v1/messages` serve the same models in the other two dialects.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/chat/completions","href":"/api-reference/chat-completions/create-a-chat-completion"}]},{"group":"Messages","expanded":false,"pages":[{"title":"Create a message","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/messages","href":"/api-reference/messages/create-a-message"}]},{"group":"Models","expanded":false,"pages":[{"title":"List models","description":"Returns the models NagaAI serves, whole and unpaged. Requires no key, and the list is the same at any balance: a call to a paid model at zero balance answers `402`. A key whose organization or workspace allows only some models sees only those.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/models","href":"/api-reference/models/list-models"}]},{"group":"Startups","expanded":false,"pages":[{"title":"List startups","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/startups","href":"/api-reference/startups/list-startups"}]},{"group":"Embeddings","expanded":false,"pages":[{"title":"Create embeddings","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/embeddings","href":"/api-reference/embeddings/create-embeddings"}]},{"group":"Moderations","expanded":false,"pages":[{"title":"Classify content","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/moderations","href":"/api-reference/moderations/classify-content"}]},{"group":"Rerank","expanded":false,"pages":[{"title":"Rerank documents","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/rerank","href":"/api-reference/rerank/rerank-documents"}]},{"group":"Audio","expanded":false,"pages":[{"title":"Create speech","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/speech","href":"/api-reference/audio/create-speech"},{"title":"Create a transcription","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/transcriptions","href":"/api-reference/audio/create-a-transcription"},{"title":"Create a translation","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/translations","href":"/api-reference/audio/create-a-translation"}]},{"group":"Images","expanded":false,"pages":[{"title":"Create an image","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/images/generations","href":"/api-reference/images/create-an-image"},{"title":"Edit an image","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/images/edits","href":"/api-reference/images/edit-an-image"}]},{"group":"Videos","expanded":false,"pages":[{"title":"Create a video","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/videos","href":"/api-reference/videos/create-a-video"},{"title":"Get a video job","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/videos/{id}","href":"/api-reference/videos/get-a-video-job"},{"title":"Download a video","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/videos/{id}/content","href":"/api-reference/videos/download-a-video"}]},{"group":"Requests","expanded":false,"pages":[{"title":"Get a request","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/requests/{id}","href":"/api-reference/requests/get-a-request"}]},{"group":"Account","expanded":false,"pages":[{"title":"Get the account balance","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/balance","href":"/api-reference/account/get-the-account-balance"},{"title":"Get account activity","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/activity","href":"/api-reference/account/get-account-activity"},{"group":"API Keys","expanded":false,"pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/account/keys","href":"/api-reference/api-keys/create-an-api-key"},{"title":"Get an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/keys/{key_id}","href":"/api-reference/api-keys/get-an-api-key"},{"title":"Update an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json patch /v1/account/keys/{key_id}","href":"/api-reference/api-keys/update-an-api-key"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json delete /v1/account/keys/{key_id}","href":"/api-reference/api-keys/delete-an-api-key"}]}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/agents/claude-code"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Create a message - NagaAI Documentation","deploymentId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","buildId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BtG4DSkw.js","snippetPresets-C1k1xDhp.js","utils-PMJoEt4Y.js","style-to-object-BY3JEAdk.js","utils-DW3Pr7Jq.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DIISLO2w.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BErNCZCm.js","_Uint8Array-f0PCu9f_.js","isObject-FP1Yky1u.js","ApiExamples-OjY-8mqu.js","usePlaygroundInputsStore-B2HS2hUb.js","shallow-DVFuuIDQ.js","isEqual-DG0UKiQC.js","CodeSnippets-Cy6FBgwN.js","CodeSnippet-D1PtG8ed.js","getApiPlaygroundDisplay-Dkx2eNtL.js","Page-C8Cg25if.js","DynamicMarkdown-BvJIe00T.js","SectionHeading-B0rKYV8d.js","icon-yclzBff4.js","MethodPill-DxA11cCF.js","getPastedJson-CpkIDpMk.js","DuplicateIcon-CFCQNJ-D.js","axios-CsQoIw0U.js","Markdown-CK5C-fmV.js","AssistantPageLink-Cw134Dd-.js","dist-3xM3Qrc7.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}