Input messages. Each input message must be an object with a role and content. You can specify a single user-role message, or include multiple user and assistant messages for multi-turn conversations.
The maximum number of tokens to generate before stopping. Note that the model may stop before reaching this maximum. Different models have different maximum values for this parameter; a value above a model’s own ceiling is rejected with 400 rather than reduced. See Output limits.
System prompt. A system prompt is a way of providing context and instructions to the model.Can be a string or an array of TextBlockParam objects, each containing text, type ("text"), optional cache_control, and optional citations.
Whether to incrementally stream the response using server-sent events (SSE). Streams are subject to an idle timeout and a lifetime ceiling — see Output limits and stream lifetime. A non-streaming request is terminated at the edge if the response takes too long to arrive, so any request that may generate for more than ~90 seconds must set stream: true — see the edge timeout.
Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Use temperature closer to 0.0 for analytical/multiple choice tasks, and closer to 1.0 for creative and generative tasks. Note that even with temperature of 0.0, the results will not be fully deterministic. For OpenAI reasoning models (gpt-5.x, gpt-6-*) with reasoning enabled, temperature and top_p are not supported upstream and are dropped silently by the gateway.
Use nucleus sampling. Computes the cumulative distribution over all options for each subsequent token in decreasing probability order and cuts it off once it reaches the probability specified by top_p. Recommended for advanced use cases only. You usually only need to use temperature.
Only sample from the top K options for each subsequent token. Used to remove “long tail” low probability responses. Recommended for advanced use cases only.
Custom text sequences that will cause the model to stop generating. If the model encounters one of the custom sequences, the response stop_reason value will be "stop_sequence" and the response stop_sequence value will contain the matched stop sequence.
Configuration for enabling Claude’s extended thinking. When enabled, responses include thinking content blocks showing Claude’s thinking process before the final answer. Requires a minimum budget of 1,024 tokens. For OpenAI-family reasoning models (gpt-5.x, gpt-6-*) the gateway maps this to reasoning_effort: {"type": "disabled"} becomes reasoning_effort: "none", budget_tokens still selects the effort level, and an explicit reasoning_effort always wins.
How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values: low, medium, high, max.
Unique message identifier, e.g. msg_01XFDUDYJgAACzvnptvVoYEL. Currently the upstream model provider’s own id, forwarded as-is. This is switching to a Sunra-issued value (breaking change, date to be announced): see Response identifiers and tracking. The same id is always available via the x-sunra-prediction-id response header, unaffected by that change. On streaming responses, the equivalent value is message_start.message.id.
Citations supporting the text block. Can be char_location, page_location, content_block_location, web_search_result_location, or search_result_location.
Present as anthropic.exclusive.v1 when Sunra normalized this response. Assert on this value rather than inferring the convention from the numbers. See Token usage.
{ "id": "msg_01XFDUDYJgAACzvnptvVoYEL", "type": "message", "role": "assistant", "container": null, "content": [ { "type": "text", "text": "Hello! I'm doing well, thank you for asking. How can I help you today?", "citations": null } ], "model": "anthropic/claude-sonnet-4-6", "stop_reason": "end_turn", "stop_sequence": null, "usage": { "input_tokens": 12, "output_tokens": 19, "total_tokens": 31, "cache_creation_input_tokens": null, "cache_read_input_tokens": null, "cache_creation": null, "inference_geo": null, "server_tool_use": null, "service_tier": null, "sunra_usage_semantics": "anthropic.exclusive.v1" }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Sunra.ai","colors":{"primary":"#ff632f","light":"#ff632f","dark":"#ff632f"},"logo":{"light":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/light.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=520c0afb29ad1fddc46fec66c975eb2a","dark":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/dark.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=16e2ed4856376448550627daa81544b9"},"favicon":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/favicon.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=c47b7db8e76fb19f94de55c161e2fcd1","api":{},"navbar":{"links":[{"href":"https://sunra.ai/about","label":"About"}],"primary":{"type":"button","label":"Go to sunra.ai","href":"https://sunra.ai"}},"footer":{"socials":{"x":"https://x.com/sunra_ai","discord":"https://discord.gg/897qCzvCcU","github":"https://github.com/sunra-ai"}},"integrations":{"amplitude":{"apiKey":"94a6621e5239157d3f0a392f6d5f8a21"}},"banner":{"content":"The developer site has moved to **platform.sunra.ai**. API endpoints, SDKs and keys are unchanged — you may just need to sign in again.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"X (Twitter)","icon":"x-twitter","href":"https://x.com/sunra_ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/897qCzvCcU"},{"anchor":"GitHub","icon":"github","href":"https://github.com/sunra-ai"}]},"languages":[{"language":"en","href":""},{"language":"zh-Hans","href":"zh-Hans"},{"language":"zh-Hant","href":"zh-Hant"},{"language":"fr","href":"fr"},{"language":"ja","href":"ja"},{"language":"es","href":"es"},{"language":"pt","href":"pt"},{"language":"hi","href":"hi"},{"language":"tr","href":"tr"},{"language":"de","href":"de"},{"language":"id","href":"id"},{"language":"it","href":"it"},{"language":"ko","href":"ko"},{"language":"ru","href":"ru"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sunraai","hasAudioNarration":false,"actualSubdomain":"sunraai","customDomains":["docs.sunra.ai"],"gitSource":{"type":"github","owner":"sunra-ai","repo":"sunra-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae46d92a3eed560d7e4c18a","collectionId":"4754d27b-94dc-45d7-b9f3-30dbad1abac8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae46d92a3eed560d7e4c18a"},"entitlements":{},"buildId":"6ae46d92a3eed560d7e4c18a","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"Multimodal","count":10},{"language":"en","tag":"LLM","count":9},{"language":"de","tag":"Multimodal","count":9},{"language":"es","tag":"Multimodal","count":9},{"language":"fr","tag":"Multimodal","count":9},{"language":"hi","tag":"Multimodal","count":9},{"language":"id","tag":"Multimodal","count":9},{"language":"it","tag":"Multimodal","count":9},{"language":"ja","tag":"Multimodal","count":9},{"language":"ko","tag":"Multimodal","count":9},{"language":"pt","tag":"Multimodal","count":9},{"language":"ru","tag":"Multimodal","count":9},{"language":"tr","tag":"Multimodal","count":9},{"language":"zh-Hans","tag":"Multimodal","count":9},{"language":"zh-Hant","tag":"Multimodal","count":9},{"language":"zh-Hans","tag":"LLM","count":8},{"language":"en","tag":"Platform","count":6},{"language":"de","tag":"LLM","count":6},{"language":"es","tag":"LLM","count":6},{"language":"fr","tag":"LLM","count":6},{"language":"hi","tag":"LLM","count":6},{"language":"id","tag":"LLM","count":6},{"language":"it","tag":"LLM","count":6},{"language":"ja","tag":"LLM","count":6},{"language":"ko","tag":"LLM","count":6},{"language":"pt","tag":"LLM","count":6},{"language":"ru","tag":"LLM","count":6},{"language":"tr","tag":"LLM","count":6},{"language":"zh-Hant","tag":"LLM","count":6},{"language":"zh-Hans","tag":"平台","count":5},{"language":"en","tag":"Client Libraries","count":4},{"language":"de","tag":"Client-Bibliotheken","count":4},{"language":"es","tag":"Bibliotecas de cliente","count":4},{"language":"fr","tag":"Bibliothèques clientes","count":4},{"language":"hi","tag":"क्लाइंट लाइब्रेरी","count":4},{"language":"id","tag":"Pustaka Klien","count":4},{"language":"it","tag":"Librerie client","count":4},{"language":"ja","tag":"クライアントライブラリ","count":4},{"language":"ko","tag":"클라이언트 라이브러리","count":4},{"language":"pt","tag":"Bibliotecas de cliente","count":4},{"language":"ru","tag":"Клиентские библиотеки","count":4},{"language":"tr","tag":"İstemci Kütüphaneleri","count":4},{"language":"zh-Hans","tag":"客户端 SDK","count":4},{"language":"zh-Hant","tag":"客戶端 SDK","count":4},{"language":"en","tag":"Overview","count":1},{"language":"de","tag":"Überblick","count":1},{"language":"es","tag":"Descripción general","count":1},{"language":"fr","tag":"Aperçu","count":1},{"language":"hi","tag":"अवलोकन","count":1},{"language":"id","tag":"Ikhtisar","count":1},{"language":"it","tag":"Panoramica","count":1},{"language":"ja","tag":"概要","count":1},{"language":"ko","tag":"개요","count":1},{"language":"pt","tag":"Visão geral","count":1},{"language":"ru","tag":"Обзор","count":1},{"language":"tr","tag":"Genel Bakış","count":1},{"language":"zh-Hans","tag":"概述","count":1},{"language":"zh-Hant","tag":"概述","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"llms-txt-v2","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar>div>div>div>div>div{border-bottom:0}.codeblock-light{background:#fafafa!important}.dark .codeblock-light{background:#0a0a0a!important}#search-bar-entry>span{font-weight:400!important}#assistant-entry>span{color:#000!important}.dark #assistant-entry>span{color:#fff!important}.rounded-2xl,.rounded-3xl,.rounded-\\[14px\\],.rounded-full,.rounded-lg,.rounded-md,.rounded-sm,.rounded-xl{border-radius:4px!important}"}],"page":{"pagePath":"llm/messages","slug":"/llm/messages","pageMetadata":{"title":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","description":null,"href":"/llm/messages"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Tab,Tabs}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.`}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[_jsx(_components.p,{children:`Bearer token. Use your API key as the bearer token in the Authorization header.`}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`Bearer \u003cSUNRA_KEY>`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(_components.p,{children:`This endpoint expects an object.`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`The model that will complete your prompt. Browse available models at `,_jsx(_components.a,{href:`https://sunra.ai/models`,children:`sunra.ai/models`}),`.`]})}),`\n`,_jsx(ParamField,{body:`provider`,type:`object`,id:`param-provider`,children:_jsxs(_components.p,{children:[`Optional provider routing preferences. Omit for automatic routing. See `,_jsx(_components.a,{href:`/llm/provider-routing`,children:`Provider routing`}),` for supported fields and provider discovery.`]})}),`\n`,_jsxs(ParamField,{body:`messages`,type:`object[] | null`,required:true,id:`param-messages`,children:[_jsxs(_components.p,{children:[`Input messages. Each input message must be an object with a `,_jsx(_components.code,{children:`role`}),` and `,_jsx(_components.code,{children:`content`}),`. You can specify a single `,_jsx(_components.code,{children:`user`}),`-role message, or include multiple `,_jsx(_components.code,{children:`user`}),` and `,_jsx(_components.code,{children:`assistant`}),` messages for multi-turn conversations.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`role`,type:`string`,required:true,id:`param-role`,children:_jsxs(_components.p,{children:[`The role of the message author. Supported values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`assistant`}),`.`]})}),_jsxs(ParamField,{body:`content`,type:`string | object[]`,required:true,id:`param-content`,children:[_jsx(_components.p,{children:`The content of the message. Can be a single string or an array of content blocks.`}),_jsx(Expandable,{title:`content block types`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`TextBlockParam`,id:`textblockparam`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ParamField,{body:`text`,type:`string`,required:true,id:`param-text`,children:_jsx(_components.p,{children:`The text content.`})}),_jsx(ParamField,{body:`citations`,type:`object[] | null`,id:`param-citations`,children:_jsx(_components.p,{children:`Citations for the text block.`})}),_jsxs(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control`,children:[_jsx(_components.p,{children:`Cache control breakpoint at this content block.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-1`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`ephemeral`}),`.`]})}),_jsx(ParamField,{body:`ttl`,type:`string`,id:`param-ttl`,children:_jsxs(_components.p,{children:[`Time-to-live. Values: `,_jsx(_components.code,{children:`5m`}),` (default), `,_jsx(_components.code,{children:`1h`}),`.`]})})]})]})]}),_jsxs(Tab,{title:`ImageBlockParam`,id:`imageblockparam`,\"data-child-tab-ids\":`[\"base64\",\"url\"]`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-2`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`image`}),`.`]})}),_jsxs(ParamField,{body:`source`,type:`object`,required:true,id:`param-source`,children:[_jsx(_components.p,{children:`Image source.`}),_jsx(Expandable,{title:`source variants`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`base64`,id:`base64`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-3`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`base64`}),`.`]})}),_jsx(ParamField,{body:`media_type`,type:`string`,required:true,id:`param-media-type`,children:_jsxs(_components.p,{children:[`Media type: `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/gif`}),`, or `,_jsx(_components.code,{children:`image/webp`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,required:true,id:`param-data`,children:_jsx(_components.p,{children:`Base64-encoded image data.`})})]}),_jsxs(Tab,{title:`url`,id:`url`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-4`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`url`}),`.`]})}),_jsx(ParamField,{body:`url`,type:`string`,required:true,id:`param-url`,children:_jsx(_components.p,{children:`Image URL.`})})]})]})})]}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-1`,children:_jsx(_components.p,{children:`Cache control breakpoint at this content block.`})})]}),_jsxs(Tab,{title:`DocumentBlockParam`,id:`documentblockparam`,\"data-child-tab-ids\":`[\"base64-2\",\"text\",\"content\",\"url-2\"]`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-5`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`document`}),`.`]})}),_jsxs(ParamField,{body:`source`,type:`object`,required:true,id:`param-source-1`,children:[_jsx(_components.p,{children:`Document source.`}),_jsx(Expandable,{title:`source variants`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`base64`,id:`base64-2`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-6`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`base64`}),`.`]})}),_jsx(ParamField,{body:`media_type`,type:`string`,required:true,id:`param-media-type-1`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`application/pdf`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,required:true,id:`param-data-1`,children:_jsx(_components.p,{children:`Base64-encoded PDF data.`})})]}),_jsxs(Tab,{title:`text`,id:`text`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-7`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ParamField,{body:`media_type`,type:`string`,required:true,id:`param-media-type-2`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`text/plain`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,required:true,id:`param-data-2`,children:_jsx(_components.p,{children:`Plain text data.`})})]}),_jsxs(Tab,{title:`content`,id:`content`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-8`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`content`}),`.`]})}),_jsx(ParamField,{body:`content`,type:`string | object[]`,required:true,id:`param-content-1`,children:_jsx(_components.p,{children:`Content blocks.`})})]}),_jsxs(Tab,{title:`url`,id:`url-2`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-9`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`url`}),`.`]})}),_jsx(ParamField,{body:`url`,type:`string`,required:true,id:`param-url-1`,children:_jsx(_components.p,{children:`PDF URL.`})})]})]})})]}),_jsxs(ParamField,{body:`citations`,type:`object`,id:`param-citations-1`,children:[_jsx(_components.p,{children:`Citations configuration.`}),_jsx(Expandable,{title:`properties`,children:_jsx(ParamField,{body:`enabled`,type:`boolean`,id:`param-enabled`,children:_jsx(_components.p,{children:`Whether citations are enabled for this document.`})})})]}),_jsx(ParamField,{body:`context`,type:`string`,id:`param-context`,children:_jsx(_components.p,{children:`Additional context for the document.`})}),_jsx(ParamField,{body:`title`,type:`string`,id:`param-title`,children:_jsx(_components.p,{children:`Title of the document.`})}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-2`,children:_jsx(_components.p,{children:`Cache control breakpoint at this content block.`})})]}),_jsxs(Tab,{title:`ToolUseBlockParam`,id:`tooluseblockparam`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-10`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`The ID of the tool use.`})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The name of the tool.`})}),_jsx(ParamField,{body:`input`,type:`object`,required:true,id:`param-input`,children:_jsx(_components.p,{children:`The input to the tool.`})}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-3`,children:_jsx(_components.p,{children:`Cache control breakpoint at this content block.`})})]}),_jsxs(Tab,{title:`ToolResultBlockParam`,id:`toolresultblockparam`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-11`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`tool_result`}),`.`]})}),_jsx(ParamField,{body:`tool_use_id`,type:`string`,required:true,id:`param-tool-use-id`,children:_jsx(_components.p,{children:`The ID of the tool use this result corresponds to.`})}),_jsx(ParamField,{body:`content`,type:`string | object[]`,id:`param-content-2`,children:_jsx(_components.p,{children:`The result content. Can be a string or an array of content blocks.`})}),_jsx(ParamField,{body:`is_error`,type:`boolean`,id:`param-is-error`,children:_jsx(_components.p,{children:`Whether this is an error result.`})}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-4`,children:_jsx(_components.p,{children:`Cache control breakpoint at this content block.`})})]}),_jsxs(Tab,{title:`ThinkingBlockParam`,id:`thinkingblockparam`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-12`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`thinking`}),`.`]})}),_jsx(ParamField,{body:`thinking`,type:`string`,required:true,id:`param-thinking`,children:_jsx(_components.p,{children:`The thinking content.`})}),_jsx(ParamField,{body:`signature`,type:`string`,required:true,id:`param-signature`,children:_jsx(_components.p,{children:`The signature of the thinking block.`})})]}),_jsxs(Tab,{title:`RedactedThinkingBlockParam`,id:`redactedthinkingblockparam`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-13`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`redacted_thinking`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,required:true,id:`param-data-3`,children:_jsx(_components.p,{children:`The redacted thinking data.`})})]})]})})]})]})]}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`number`,id:`param-max-tokens`,children:_jsxs(_components.p,{children:[`The maximum number of tokens to generate before stopping. Note that the model may stop before reaching this maximum. Different models have different maximum values for this parameter; a value above a model’s own ceiling is rejected with `,_jsx(_components.code,{children:`400`}),` rather than reduced. See `,_jsx(_components.a,{href:`/llm/limits`,children:`Output limits`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`system`,type:`string | object[]`,id:`param-system`,children:[_jsx(_components.p,{children:`System prompt. A system prompt is a way of providing context and instructions to the model.`}),_jsxs(_components.p,{children:[`Can be a string or an array of `,_jsx(_components.code,{children:`TextBlockParam`}),` objects, each containing `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`type`}),` (`,_jsx(_components.code,{children:`\"text\"`}),`), optional `,_jsx(_components.code,{children:`cache_control`}),`, and optional `,_jsx(_components.code,{children:`citations`}),`.`]})]}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsxs(_components.p,{children:[`Whether to incrementally stream the response using server-sent events (SSE). Streams are subject to an idle timeout and a lifetime ceiling — see `,_jsx(_components.a,{href:`/llm/limits#stream-lifetime`,children:`Output limits and stream lifetime`}),`. A non-streaming request is terminated at the edge if the response takes too long to arrive, so any request that may generate for more than ~90 seconds must set `,_jsx(_components.code,{children:`stream: true`}),` — see `,_jsx(_components.a,{href:`/llm/limits#non-streaming-requests-the-edge-timeout`,children:`the edge timeout`}),`.`]})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,default:1,id:`param-temperature`,children:_jsxs(_components.p,{children:[`Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Use `,_jsx(_components.code,{children:`temperature`}),` closer to 0.0 for analytical/multiple choice tasks, and closer to 1.0 for creative and generative tasks. Note that even with `,_jsx(_components.code,{children:`temperature`}),` of 0.0, the results will not be fully deterministic. For OpenAI reasoning models (`,_jsx(_components.code,{children:`gpt-5.x`}),`, `,_jsx(_components.code,{children:`gpt-6-*`}),`) with reasoning enabled, `,_jsx(_components.code,{children:`temperature`}),` and `,_jsx(_components.code,{children:`top_p`}),` are not supported upstream and are dropped silently by the gateway.`]})}),`\n`,_jsx(ParamField,{body:`top_p`,type:`number`,id:`param-top-p`,children:_jsxs(_components.p,{children:[`Use nucleus sampling. Computes the cumulative distribution over all options for each subsequent token in decreasing probability order and cuts it off once it reaches the probability specified by `,_jsx(_components.code,{children:`top_p`}),`. Recommended for advanced use cases only. You usually only need to use `,_jsx(_components.code,{children:`temperature`}),`.`]})}),`\n`,_jsx(ParamField,{body:`top_k`,type:`number`,id:`param-top-k`,children:_jsx(_components.p,{children:`Only sample from the top K options for each subsequent token. Used to remove “long tail” low probability responses. Recommended for advanced use cases only.`})}),`\n`,_jsx(ParamField,{body:`stop_sequences`,type:`string[]`,id:`param-stop-sequences`,children:_jsxs(_components.p,{children:[`Custom text sequences that will cause the model to stop generating. If the model encounters one of the custom sequences, the response `,_jsx(_components.code,{children:`stop_reason`}),` value will be `,_jsx(_components.code,{children:`\"stop_sequence\"`}),` and the response `,_jsx(_components.code,{children:`stop_sequence`}),` value will contain the matched stop sequence.`]})}),`\n`,_jsxs(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:[_jsx(_components.p,{children:`Definitions of tools that the model may use. Supports custom tools, Anthropic built-in tools, and server tools.`}),_jsx(Expandable,{title:`tool types`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Custom Tool`,id:`custom-tool`,children:[_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-1`,children:_jsx(_components.p,{children:`Name of the tool. This is how the tool will be called by the model.`})}),_jsx(ParamField,{body:`input_schema`,type:`object`,required:true,id:`param-input-schema`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://json-schema.org/draft/2020-12`,children:`JSON schema`}),` for the tool’s input. This defines the shape of the `,_jsx(_components.code,{children:`input`}),` that your tool accepts and that the model will produce.`]})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Description of what this tool does. Tool descriptions should be as detailed as possible.`})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type-14`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`custom`}),`.`]})}),_jsxs(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-5`,children:[_jsx(_components.p,{children:`Cache control breakpoint.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-15`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`ephemeral`}),`.`]})}),_jsx(ParamField,{body:`ttl`,type:`string`,id:`param-ttl-1`,children:_jsxs(_components.p,{children:[`Time-to-live. Values: `,_jsx(_components.code,{children:`5m`}),` (default), `,_jsx(_components.code,{children:`1h`}),`.`]})})]})]})]}),_jsxs(Tab,{title:`Bash Tool`,id:`bash-tool`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-16`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`bash_20250124`}),`.`]})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-2`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`bash`}),`.`]})}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-6`,children:_jsx(_components.p,{children:`Cache control breakpoint.`})})]}),_jsxs(Tab,{title:`Text Editor Tool`,id:`text-editor-tool`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-17`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`text_editor_20250124`}),`.`]})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-3`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`str_replace_editor`}),`.`]})}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-7`,children:_jsx(_components.p,{children:`Cache control breakpoint.`})})]}),_jsxs(Tab,{title:`Web Search Tool`,id:`web-search-tool`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-18`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`web_search_20250305`}),`.`]})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-4`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`web_search`}),`.`]})}),_jsx(ParamField,{body:`allowed_domains`,type:`string[] | null`,id:`param-allowed-domains`,children:_jsxs(_components.p,{children:[`If provided, only these domains will be included in results. Cannot be used alongside `,_jsx(_components.code,{children:`blocked_domains`}),`.`]})}),_jsx(ParamField,{body:`blocked_domains`,type:`string[] | null`,id:`param-blocked-domains`,children:_jsxs(_components.p,{children:[`If provided, these domains will never appear in results. Cannot be used alongside `,_jsx(_components.code,{children:`allowed_domains`}),`.`]})}),_jsx(ParamField,{body:`max_uses`,type:`number | null`,id:`param-max-uses`,children:_jsx(_components.p,{children:`Maximum number of times the tool can be used in the API request.`})}),_jsxs(ParamField,{body:`user_location`,type:`object | null`,id:`param-user-location`,children:[_jsx(_components.p,{children:`Parameters for the user’s location. Used to provide more relevant search results.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-19`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`approximate`}),`.`]})}),_jsx(ParamField,{body:`city`,type:`string | null`,id:`param-city`,children:_jsx(_components.p,{children:`The city of the user.`})}),_jsx(ParamField,{body:`country`,type:`string | null`,id:`param-country`,children:_jsx(_components.p,{children:`The two letter ISO country code.`})}),_jsx(ParamField,{body:`region`,type:`string | null`,id:`param-region`,children:_jsx(_components.p,{children:`The region of the user.`})}),_jsx(ParamField,{body:`timezone`,type:`string | null`,id:`param-timezone`,children:_jsx(_components.p,{children:`The IANA timezone of the user.`})})]})]}),_jsx(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-8`,children:_jsx(_components.p,{children:`Cache control breakpoint.`})})]})]})})]}),`\n`,_jsxs(ParamField,{body:`tool_choice`,type:`object`,id:`param-tool-choice`,children:[_jsx(_components.p,{children:`How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.`}),_jsx(Expandable,{title:`variants`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`auto`,id:`auto`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-20`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`auto`}),`.`]})}),_jsx(ParamField,{body:`disable_parallel_tool_use`,type:`boolean`,id:`param-disable-parallel-tool-use`,children:_jsxs(_components.p,{children:[`Whether to disable parallel tool use. Defaults to `,_jsx(_components.code,{children:`false`}),`. If `,_jsx(_components.code,{children:`true`}),`, the model will output at most one tool use.`]})})]}),_jsxs(Tab,{title:`any`,id:`any`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-21`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`any`}),`.`]})}),_jsx(ParamField,{body:`disable_parallel_tool_use`,type:`boolean`,id:`param-disable-parallel-tool-use-1`,children:_jsxs(_components.p,{children:[`Whether to disable parallel tool use. Defaults to `,_jsx(_components.code,{children:`false`}),`. If `,_jsx(_components.code,{children:`true`}),`, the model will output exactly one tool use.`]})})]}),_jsx(Tab,{title:`none`,id:`none`,children:_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-22`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`none`}),`.`]})})}),_jsxs(Tab,{title:`tool`,id:`tool`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-23`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`tool`}),`.`]})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-5`,children:_jsx(_components.p,{children:`The name of the tool to use.`})}),_jsx(ParamField,{body:`disable_parallel_tool_use`,type:`boolean`,id:`param-disable-parallel-tool-use-2`,children:_jsxs(_components.p,{children:[`Whether to disable parallel tool use. Defaults to `,_jsx(_components.code,{children:`false`}),`. If `,_jsx(_components.code,{children:`true`}),`, the model will output exactly one tool use.`]})})]})]})})]}),`\n`,_jsxs(ParamField,{body:`thinking`,type:`object`,id:`param-thinking-1`,children:[_jsxs(_components.p,{children:[`Configuration for enabling Claude’s extended thinking. When enabled, responses include `,_jsx(_components.code,{children:`thinking`}),` content blocks showing Claude’s thinking process before the final answer. Requires a minimum budget of 1,024 tokens. For OpenAI-family reasoning models (`,_jsx(_components.code,{children:`gpt-5.x`}),`, `,_jsx(_components.code,{children:`gpt-6-*`}),`) the gateway maps this to `,_jsx(_components.code,{children:`reasoning_effort`}),`: `,_jsx(_components.code,{children:`{\"type\": \"disabled\"}`}),` becomes `,_jsx(_components.code,{children:`reasoning_effort: \"none\"`}),`, `,_jsx(_components.code,{children:`budget_tokens`}),` still selects the effort level, and an explicit `,_jsx(_components.code,{children:`reasoning_effort`}),` always wins.`]}),_jsx(Expandable,{title:`variants`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`enabled`,id:`enabled`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-24`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`enabled`}),`.`]})}),_jsx(ParamField,{body:`budget_tokens`,type:`integer`,required:true,id:`param-budget-tokens`,children:_jsxs(_components.p,{children:[`Determines how many tokens Claude can use for its internal reasoning process. Must be ≥1024 and less than `,_jsx(_components.code,{children:`max_tokens`}),`.`]})})]}),_jsx(Tab,{title:`disabled`,id:`disabled`,children:_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-25`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`disabled`}),`.`]})})}),_jsx(Tab,{title:`adaptive`,id:`adaptive`,children:_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-26`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`adaptive`}),`.`]})})})]})})]}),`\n`,_jsxs(ParamField,{body:`output_config`,type:`object`,id:`param-output-config`,children:[_jsx(_components.p,{children:`Configuration for controlling output behavior. Supports the effort parameter and structured output format.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`effort`,type:`string | null`,id:`param-effort`,children:_jsxs(_components.p,{children:[`How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values: `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`max`}),`.`]})}),_jsxs(ParamField,{body:`format`,type:`object | null`,id:`param-format`,children:[_jsx(_components.p,{children:`A schema to specify Claude’s output format in responses (structured outputs).`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-27`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`json_schema`}),`.`]})}),_jsx(ParamField,{body:`schema`,type:`object`,required:true,id:`param-schema`,children:_jsx(_components.p,{children:`The JSON schema of the format.`})})]})]})]})]}),`\n`,_jsxs(ParamField,{body:`cache_control`,type:`object`,id:`param-cache-control-9`,children:[_jsx(_components.p,{children:`Top-level cache control. Automatically applies a cache_control marker to the last cacheable block in the request.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-28`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`ephemeral`}),`.`]})}),_jsx(ParamField,{body:`ttl`,type:`string`,id:`param-ttl-2`,children:_jsxs(_components.p,{children:[`Time-to-live for the cache control breakpoint. Values: `,_jsx(_components.code,{children:`5m`}),` (5 minutes, default), `,_jsx(_components.code,{children:`1h`}),` (1 hour).`]})})]})]}),`\n`,_jsx(ParamField,{body:`service_tier`,type:`string`,id:`param-service-tier`,children:_jsxs(_components.p,{children:[`Determines whether to use priority capacity or standard capacity for this request. Supported values: `,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`standard_only`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`An object describing metadata about the request.`}),_jsx(Expandable,{title:`properties`,children:_jsx(ParamField,{body:`user_id`,type:`string`,id:`param-user-id`,children:_jsx(_components.p,{children:`An external identifier for the user who is associated with the request. This should be a uuid, hash value, or other opaque identifier.`})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`Successful message response.`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-1`,children:_jsxs(_components.p,{children:[`Unique message identifier, e.g. `,_jsx(_components.code,{children:`msg_01XFDUDYJgAACzvnptvVoYEL`}),`. Currently the upstream model provider’s own id, forwarded as-is. This is switching to a Sunra-issued value (breaking change, date to be announced): see `,_jsx(_components.a,{href:`/llm/response-tracking#the-id-field-is-switching-to-a-sunra-issued-value`,children:`Response identifiers and tracking`}),`. The same id is always available via the `,_jsxs(_components.a,{href:`/llm/response-tracking#the-x-sunra-prediction-id-header`,children:[_jsx(_components.code,{children:`x-sunra-prediction-id`}),` response header`]}),`, unaffected by that change. On streaming responses, the equivalent value is `,_jsx(_components.code,{children:`message_start.message.id`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-29`,children:_jsxs(_components.p,{children:[`Object type. Always `,_jsx(_components.code,{children:`message`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`role`,type:`string`,id:`param-role-1`,children:_jsxs(_components.p,{children:[`Conversational role of the generated message. Always `,_jsx(_components.code,{children:`assistant`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`container`,type:`object | null`,id:`param-container`,children:[_jsx(_components.p,{children:`Information about the container used in the request (for the code execution tool).`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-2`,children:_jsx(_components.p,{children:`Identifier for the container used in this request.`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`The time at which the container will expire.`})})]})]}),`\n`,_jsxs(ResponseField,{name:`content`,type:`object[]`,id:`param-content-3`,children:[_jsxs(_components.p,{children:[`Content generated by the model. This is an array of content blocks, each of which has a `,_jsx(_components.code,{children:`type`}),` that determines its shape.`]}),_jsx(Expandable,{title:`content block types`,children:_jsxs(Tabs,{children:[_jsxs(Tab,{title:`TextBlock`,id:`textblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-30`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ResponseField,{name:`text`,type:`string`,id:`param-text-1`,children:_jsx(_components.p,{children:`The generated text.`})}),_jsx(ResponseField,{name:`citations`,type:`object[] | null`,id:`param-citations-2`,children:_jsxs(_components.p,{children:[`Citations supporting the text block. Can be `,_jsx(_components.code,{children:`char_location`}),`, `,_jsx(_components.code,{children:`page_location`}),`, `,_jsx(_components.code,{children:`content_block_location`}),`, `,_jsx(_components.code,{children:`web_search_result_location`}),`, or `,_jsx(_components.code,{children:`search_result_location`}),`.`]})})]}),_jsxs(Tab,{title:`ToolUseBlock`,id:`tooluseblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-31`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-3`,children:_jsx(_components.p,{children:`The ID of the tool use block.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-6`,children:_jsx(_components.p,{children:`The name of the tool.`})}),_jsx(ResponseField,{name:`input`,type:`object`,id:`param-input-1`,children:_jsx(_components.p,{children:`The input to the tool as generated by the model.`})})]}),_jsxs(Tab,{title:`ThinkingBlock`,id:`thinkingblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-32`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`thinking`}),`.`]})}),_jsx(ResponseField,{name:`thinking`,type:`string`,id:`param-thinking-2`,children:_jsx(_components.p,{children:`The thinking content.`})}),_jsx(ResponseField,{name:`signature`,type:`string`,id:`param-signature-1`,children:_jsx(_components.p,{children:`The signature of the thinking block.`})})]}),_jsxs(Tab,{title:`RedactedThinkingBlock`,id:`redactedthinkingblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-33`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`redacted_thinking`}),`.`]})}),_jsx(ResponseField,{name:`data`,type:`string`,id:`param-data-4`,children:_jsx(_components.p,{children:`The redacted data.`})})]}),_jsxs(Tab,{title:`ServerToolUseBlock`,id:`servertooluseblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-34`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`server_tool_use`}),`.`]})}),_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-4`,children:_jsx(_components.p,{children:`The ID of the tool use block.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-7`,children:_jsxs(_components.p,{children:[`The server tool name. e.g., `,_jsx(_components.code,{children:`web_search`}),`, `,_jsx(_components.code,{children:`web_fetch`}),`, `,_jsx(_components.code,{children:`code_execution`}),`.`]})}),_jsx(ResponseField,{name:`input`,type:`object`,id:`param-input-2`,children:_jsx(_components.p,{children:`The input to the server tool.`})})]}),_jsxs(Tab,{title:`WebSearchToolResultBlock`,id:`websearchtoolresultblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-35`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`web_search_tool_result`}),`.`]})}),_jsx(ResponseField,{name:`tool_use_id`,type:`string`,id:`param-tool-use-id-1`,children:_jsx(_components.p,{children:`The ID of the tool use this result corresponds to.`})}),_jsx(ResponseField,{name:`content`,type:`object | object[]`,id:`param-content-4`,children:_jsx(_components.p,{children:`Search results or error object.`})})]}),_jsxs(Tab,{title:`WebFetchToolResultBlock`,id:`webfetchtoolresultblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-36`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`web_fetch_tool_result`}),`.`]})}),_jsx(ResponseField,{name:`tool_use_id`,type:`string`,id:`param-tool-use-id-2`,children:_jsx(_components.p,{children:`The ID of the tool use this result corresponds to.`})}),_jsx(ResponseField,{name:`content`,type:`object`,id:`param-content-5`,children:_jsx(_components.p,{children:`Fetched content or error object.`})})]}),_jsxs(Tab,{title:`CodeExecutionToolResultBlock`,id:`codeexecutiontoolresultblock`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-37`,children:_jsxs(_components.p,{children:[`Value: `,_jsx(_components.code,{children:`code_execution_tool_result`}),`.`]})}),_jsx(ResponseField,{name:`tool_use_id`,type:`string`,id:`param-tool-use-id-3`,children:_jsx(_components.p,{children:`The ID of the tool use this result corresponds to.`})}),_jsx(ResponseField,{name:`content`,type:`object`,id:`param-content-6`,children:_jsx(_components.p,{children:`Execution result or error object.`})})]})]})})]}),`\n`,_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:_jsx(_components.p,{children:`The model that handled the request.`})}),`\n`,_jsxs(ResponseField,{name:`stop_reason`,type:`string | null`,id:`param-stop-reason`,children:[_jsx(_components.p,{children:`The reason that the model stopped generating. Possible values:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`end_turn`}),` — the model reached a natural stopping point`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`max_tokens`}),` — exceeded `,_jsx(_components.code,{children:`max_tokens`}),` or the model’s maximum`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`stop_sequence`}),` — one of your custom stop sequences was generated`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`tool_use`}),` — the model invoked one or more tools`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`pause_turn`}),` — a long-running turn was paused`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`refusal`}),` — streaming classifiers intervened for potential policy violations`]}),`\n`]})]}),`\n`,_jsx(ResponseField,{name:`stop_sequence`,type:`string | null`,id:`param-stop-sequence`,children:_jsx(_components.p,{children:`Which custom stop sequence was generated, if any.`})}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:[_jsxs(_components.p,{children:[`Billing and rate-limit usage. The three input buckets are mutually exclusive — see `,_jsx(_components.a,{href:`/llm/token-usage`,children:`Token usage`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`input_tokens`,type:`integer`,id:`param-input-tokens`,children:_jsx(_components.p,{children:`The number of fresh input tokens which were used. Excludes both cache buckets.`})}),_jsx(ResponseField,{name:`output_tokens`,type:`integer`,id:`param-output-tokens`,children:_jsx(_components.p,{children:`The number of output tokens which were used.`})}),_jsx(ResponseField,{name:`total_tokens`,type:`integer`,id:`param-total-tokens`,children:_jsxs(_components.p,{children:[`All input buckets plus `,_jsx(_components.code,{children:`output_tokens`}),`. Omitted on streamed responses.`]})}),_jsx(ResponseField,{name:`cache_creation_input_tokens`,type:`integer | null`,id:`param-cache-creation-input-tokens`,children:_jsx(_components.p,{children:`The number of input tokens used to create the cache entry.`})}),_jsx(ResponseField,{name:`cache_read_input_tokens`,type:`integer | null`,id:`param-cache-read-input-tokens`,children:_jsx(_components.p,{children:`The number of input tokens read from the cache.`})}),_jsx(ResponseField,{name:`sunra_usage_semantics`,type:`string | null`,id:`param-sunra-usage-semantics`,children:_jsxs(_components.p,{children:[`Present as `,_jsx(_components.code,{children:`anthropic.exclusive.v1`}),` when Sunra normalized this response. Assert on this value rather than inferring the convention from the numbers. See `,_jsx(_components.a,{href:`/llm/token-usage`,children:`Token usage`}),`.`]})}),_jsxs(ResponseField,{name:`cache_creation`,type:`object | null`,id:`param-cache-creation`,children:[_jsx(_components.p,{children:`Breakdown of cached tokens by TTL.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`ephemeral_5m_input_tokens`,type:`integer`,id:`param-ephemeral-5m-input-tokens`,children:_jsx(_components.p,{children:`The number of input tokens used to create the 5 minute cache entry.`})}),_jsx(ResponseField,{name:`ephemeral_1h_input_tokens`,type:`integer`,id:`param-ephemeral-1h-input-tokens`,children:_jsx(_components.p,{children:`The number of input tokens used to create the 1 hour cache entry.`})})]})]}),_jsx(ResponseField,{name:`inference_geo`,type:`string | null`,id:`param-inference-geo`,children:_jsx(_components.p,{children:`The geographic region where inference was performed for this request.`})}),_jsxs(ResponseField,{name:`server_tool_use`,type:`object | null`,id:`param-server-tool-use`,children:[_jsx(_components.p,{children:`The number of server tool requests.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`web_search_requests`,type:`integer`,id:`param-web-search-requests`,children:_jsx(_components.p,{children:`The number of web search tool requests.`})}),_jsx(ResponseField,{name:`web_fetch_requests`,type:`integer`,id:`param-web-fetch-requests`,children:_jsx(_components.p,{children:`The number of web fetch tool requests.`})})]})]}),_jsx(ResponseField,{name:`service_tier`,type:`string | null`,id:`param-service-tier-1`,children:_jsxs(_components.p,{children:[`If the request used the priority, standard, or batch tier. Values: `,_jsx(_components.code,{children:`standard`}),`, `,_jsx(_components.code,{children:`priority`}),`, `,_jsx(_components.code,{children:`batch`}),`.`]})})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","description":null,"href":"/llm/messages"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[213,337,"pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!"],[498,510,"questExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)"],[40836,41264,",`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api-llm.sunra.ai/v1/messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cSUNRA_KEY>\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"anthropic/claude-sonnet-4-6\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 1024,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"Hello, how are you?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-llm.sunra.ai/v1/messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \u003cSUNRA_KEY>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello, how are you?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`16`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api-llm.sunra.ai/v1/messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \u003cSUNRA_KEY>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"anthropic/claude-sonnet-4-6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` max_tokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hello, how are you?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`28`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"msg_01XFDUDYJgAACzvnptvVoYEL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"container\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello! I'm doing well, thank you for asking. How can I help you today?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"citations\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stop_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"end_turn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stop_sequence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`19`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`31`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_creation_input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_read_input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_creation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inference_geo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"server_tool_use\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"service_tier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sunra_usage_semantics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic.exclusive.v1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api-llm.sunra.ai/v1/messages\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"anthropic/claude-sonnet-4-6\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_tokens\": 1024,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"role\": \"user\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content\": \"Hello, how are you?\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api-llm.sunra.ai/v1/messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"application/json\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic/claude-sonnet-4-6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1024\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hello, how are you?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://api-llm.sunra.ai/v1/messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> model:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"anthropic/claude-sonnet-4-6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> max_tokens:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1024\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> messages:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">role:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">content:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Hello, how are you?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"28\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"msg_01XFDUDYJgAACzvnptvVoYEL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"assistant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"container\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hello! I'm doing well, thank you for asking. How can I help you today?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"citations\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic/claude-sonnet-4-6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"stop_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"end_turn\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"stop_sequence\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"input_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"output_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">19\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">31\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cache_creation_input_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cache_read_input_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cache_creation\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"inference_geo\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"server_tool_use\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"service_tier\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"sunra_usage_semantics\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic.exclusive.v1\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a message","path":"/v1/messages","servers":[{"url":"https://api-llm.sunra.ai"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer token. Use your API key as the bearer token in the Authorization header. Format: `Bearer \u003cSUNRA_KEY>`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"The model that will complete your prompt. Browse available models at sunra.ai/models .","required":true}],"provider":[{"type":"object","properties":{},"description":"Optional provider routing preferences. Omit for automatic routing. See Provider routing for supported fields and provider discovery."}],"messages":[{"type":"object","properties":{"role":[{"type":"string","description":"The role of the message author. Supported values: `user` , `assistant` .","required":true}],"content":[{"type":"array","items":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `redacted_thinking` .","required":true}],"text":[{"type":"string","description":"The text content.","required":true}],"citations":[{"type":"object","properties":{"enabled":[{"type":"boolean","description":"Whether citations are enabled for this document."}]},"description":"Citations configuration."}],"cache_control":[{"type":"object","properties":{},"description":"Cache control breakpoint at this content block."}],"source":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `url` .","required":true}],"media_type":[{"type":"string","description":"Value: `text/plain` .","required":true}],"data":[{"type":"string","description":"Plain text data.","required":true}],"content":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Content blocks.","required":true}],"url":[{"type":"string","description":"PDF URL.","required":true}]},"description":"Document source.","required":true}],"context":[{"type":"string","description":"Additional context for the document."}],"title":[{"type":"string","description":"Title of the document."}],"id":[{"type":"string","description":"The ID of the tool use.","required":true}],"name":[{"type":"string","description":"The name of the tool.","required":true}],"input":[{"type":"object","properties":{},"description":"The input to the tool.","required":true}],"tool_use_id":[{"type":"string","description":"The ID of the tool use this result corresponds to.","required":true}],"content":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"The result content. Can be a string or an array of content blocks."}],"is_error":[{"type":"boolean","description":"Whether this is an error result."}],"thinking":[{"type":"string","description":"The thinking content.","required":true}],"signature":[{"type":"string","description":"The signature of the thinking block.","required":true}],"data":[{"type":"string","description":"The redacted thinking data.","required":true}]}}],"description":"The content of the message. Can be a single string or an array of content blocks.","required":true}]},"description":"Input messages. Each input message must be an object with a `role` and `content` . You can specify a single `user` -role message, or include multiple `user` and `assistant` messages for multi-turn conversations.","required":true}],"max_tokens":[{"type":"number","description":"The maximum number of tokens to generate before stopping. Note that the model may stop before reaching this maximum. Different models have different maximum values for this parameter; a value above a model’s own ceiling is rejected with `400` rather than reduced. See Output limits ."}],"system":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"System prompt. A system prompt is a way of providing context and instructions to the model. Can be a string or an array of `TextBlockParam` objects, each containing `text` , `type` ( `\"text\"` ), optional `cache_control` , and optional `citations` ."}],"stream":[{"type":"boolean","description":"Whether to incrementally stream the response using server-sent events (SSE). Streams are subject to an idle timeout and a lifetime ceiling — see Output limits and stream lifetime . A non-streaming request is terminated at the edge if the response takes too long to arrive, so any request that may generate for more than ~90 seconds must set `stream: true` — see the edge timeout ."}],"temperature":[{"type":"number","description":"Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Use `temperature` closer to 0.0 for analytical/multiple choice tasks, and closer to 1.0 for creative and generative tasks. Note that even with `temperature` of 0.0, the results will not be fully deterministic. For OpenAI reasoning models ( `gpt-5.x` , `gpt-6-*` ) with reasoning enabled, `temperature` and `top_p` are not supported upstream and are dropped silently by the gateway."}],"top_p":[{"type":"number","description":"Use nucleus sampling. Computes the cumulative distribution over all options for each subsequent token in decreasing probability order and cuts it off once it reaches the probability specified by `top_p` . Recommended for advanced use cases only. You usually only need to use `temperature` ."}],"top_k":[{"type":"number","description":"Only sample from the top K options for each subsequent token. Used to remove “long tail” low probability responses. Recommended for advanced use cases only."}],"stop_sequences":[{"type":"array","items":[{"type":"string"}],"description":"Custom text sequences that will cause the model to stop generating. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence."}],"tools":[{"type":"array","items":[{"type":"object","properties":{"name":[{"type":"string","description":"Value: `web_search` .","required":true}],"input_schema":[{"type":"object","properties":{},"description":"JSON schema for the tool’s input. This defines the shape of the `input` that your tool accepts and that the model will produce.","required":true}],"description":[{"type":"string","description":"Description of what this tool does. Tool descriptions should be as detailed as possible."}],"type":[{"type":"string","description":"Value: `web_search_20250305` .","required":true}],"cache_control":[{"type":"object","properties":{},"description":"Cache control breakpoint."}],"allowed_domains":[{"type":"object","properties":{},"description":"If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains` ."}],"blocked_domains":[{"type":"object","properties":{},"description":"If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains` ."}],"max_uses":[{"type":"object","properties":{},"description":"Maximum number of times the tool can be used in the API request."}],"user_location":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `approximate` .","required":true}],"city":[{"type":"object","properties":{},"description":"The city of the user."}],"country":[{"type":"object","properties":{},"description":"The two letter ISO country code."}],"region":[{"type":"object","properties":{},"description":"The region of the user."}],"timezone":[{"type":"object","properties":{},"description":"The IANA timezone of the user."}]},"description":"Parameters for the user’s location. Used to provide more relevant search results."}]}}],"description":"Definitions of tools that the model may use. Supports custom tools, Anthropic built-in tools, and server tools."}],"tool_choice":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `tool` .","required":true}],"disable_parallel_tool_use":[{"type":"boolean","description":"Whether to disable parallel tool use. Defaults to `false` . If `true` , the model will output exactly one tool use."}],"name":[{"type":"string","description":"The name of the tool to use.","required":true}]},"description":"How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all."}],"thinking":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `adaptive` .","required":true}],"budget_tokens":[{"type":"integer","description":"Determines how many tokens Claude can use for its internal reasoning process. Must be ≥1024 and less than `max_tokens` .","required":true}]},"description":"Configuration for enabling Claude’s extended thinking. When enabled, responses include `thinking` content blocks showing Claude’s thinking process before the final answer. Requires a minimum budget of 1,024 tokens. For OpenAI-family reasoning models ( `gpt-5.x` , `gpt-6-*` ) the gateway maps this to `reasoning_effort` : `{\"type\": \"disabled\"}` becomes `reasoning_effort: \"none\"` , `budget_tokens` still selects the effort level, and an explicit `reasoning_effort` always wins."}],"output_config":[{"type":"object","properties":{"effort":[{"type":"object","properties":{},"description":"How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values: `low` , `medium` , `high` , `max` ."}],"format":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `json_schema` .","required":true}],"schema":[{"type":"object","properties":{},"description":"The JSON schema of the format.","required":true}]},"description":"A schema to specify Claude’s output format in responses (structured outputs)."}]},"description":"Configuration for controlling output behavior. Supports the effort parameter and structured output format."}],"cache_control":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `ephemeral` .","required":true}],"ttl":[{"type":"string","description":"Time-to-live for the cache control breakpoint. Values: `5m` (5 minutes, default), `1h` (1 hour)."}]},"description":"Top-level cache control. Automatically applies a cache_control marker to the last cacheable block in the request."}],"service_tier":[{"type":"string","description":"Determines whether to use priority capacity or standard capacity for this request. Supported values: `auto` , `standard_only` ."}],"metadata":[{"type":"object","properties":{"user_id":[{"type":"string","description":"An external identifier for the user who is associated with the request. This should be a uuid, hash value, or other opaque identifier."}]},"description":"An object describing metadata about the request."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","provider":{},"messages":{"role":"\u003cstring>","content":[{"type":"\u003cstring>","text":"\u003cstring>","citations":{"enabled":true},"cache_control":{},"source":{"type":"\u003cstring>","media_type":"\u003cstring>","data":"\u003cstring>","content":[{}],"url":"\u003cstring>"},"context":"\u003cstring>","title":"\u003cstring>","id":"\u003cstring>","name":"\u003cstring>","input":{},"tool_use_id":"\u003cstring>","content":[{}],"is_error":true,"thinking":"\u003cstring>","signature":"\u003cstring>","data":"\u003cstring>"}]},"max_tokens":123,"system":[{}],"stream":true,"temperature":123,"top_p":123,"top_k":123,"stop_sequences":["\u003cstring>"],"tools":[{"name":"\u003cstring>","input_schema":{},"description":"\u003cstring>","type":"\u003cstring>","cache_control":{},"allowed_domains":{},"blocked_domains":{},"max_uses":{},"user_location":{"type":"\u003cstring>","city":{},"country":{},"region":{},"timezone":{}}}],"tool_choice":{"type":"\u003cstring>","disable_parallel_tool_use":true,"name":"\u003cstring>"},"thinking":{"type":"\u003cstring>","budget_tokens":123},"output_config":{"effort":{},"format":{"type":"\u003cstring>","schema":{}}},"cache_control":{"type":"\u003cstring>","ttl":"\u003cstring>"},"service_tier":"\u003cstring>","metadata":{"user_id":"\u003cstring>"}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Unique message identifier, e.g. `msg_01XFDUDYJgAACzvnptvVoYEL` . Currently the upstream model provider’s own id, forwarded as-is. This is switching to a Sunra-issued value (breaking change, date to be announced): see Response identifiers and tracking . The same id is always available via the `x-sunra-prediction-id` response header , unaffected by that change. On streaming responses, the equivalent value is `message_start.message.id` ."}],"type":[{"type":"string","description":"Object type. Always `message` ."}],"role":[{"type":"string","description":"Conversational role of the generated message. Always `assistant` ."}],"container":[{"type":"object","properties":{"id":[{"type":"string","description":"Identifier for the container used in this request."}],"expires_at":[{"type":"string","description":"The time at which the container will expire."}]},"description":"Information about the container used in the request (for the code execution tool)."}],"content":[{"type":"array","items":[{"type":"object","properties":{"type":[{"type":"string","description":"Value: `code_execution_tool_result` ."}],"text":[{"type":"string","description":"The generated text."}],"citations":[{"type":"object","properties":{},"description":"Citations supporting the text block. Can be `char_location` , `page_location` , `content_block_location` , `web_search_result_location` , or `search_result_location` ."}],"id":[{"type":"string","description":"The ID of the tool use block."}],"name":[{"type":"string","description":"The server tool name. e.g., `web_search` , `web_fetch` , `code_execution` ."}],"input":[{"type":"object","properties":{},"description":"The input to the server tool."}],"thinking":[{"type":"string","description":"The thinking content."}],"signature":[{"type":"string","description":"The signature of the thinking block."}],"data":[{"type":"string","description":"The redacted data."}],"tool_use_id":[{"type":"string","description":"The ID of the tool use this result corresponds to."}],"content":[{"type":"object","properties":{},"description":"Execution result or error object."}]}}],"description":"Content generated by the model. This is an array of content blocks, each of which has a `type` that determines its shape."}],"model":[{"type":"string","description":"The model that handled the request."}],"stop_reason":[{"type":"object","properties":{},"description":"The reason that the model stopped generating. Possible values: `end_turn` — the model reached a natural stopping point `max_tokens` — exceeded `max_tokens` or the model’s maximum `stop_sequence` — one of your custom stop sequences was generated `tool_use` — the model invoked one or more tools `pause_turn` — a long-running turn was paused `refusal` — streaming classifiers intervened for potential policy violations"}],"stop_sequence":[{"type":"object","properties":{},"description":"Which custom stop sequence was generated, if any."}],"usage":[{"type":"object","properties":{"input_tokens":[{"type":"integer","description":"The number of fresh input tokens which were used. Excludes both cache buckets."}],"output_tokens":[{"type":"integer","description":"The number of output tokens which were used."}],"total_tokens":[{"type":"integer","description":"All input buckets plus `output_tokens` . Omitted on streamed responses."}],"cache_creation_input_tokens":[{"type":"object","properties":{},"description":"The number of input tokens used to create the cache entry."}],"cache_read_input_tokens":[{"type":"object","properties":{},"description":"The number of input tokens read from the cache."}],"sunra_usage_semantics":[{"type":"object","properties":{},"description":"Present as `anthropic.exclusive.v1` when Sunra normalized this response. Assert on this value rather than inferring the convention from the numbers. See Token usage ."}],"cache_creation":[{"type":"object","properties":{"ephemeral_5m_input_tokens":[{"type":"integer","description":"The number of input tokens used to create the 5 minute cache entry."}],"ephemeral_1h_input_tokens":[{"type":"integer","description":"The number of input tokens used to create the 1 hour cache entry."}]},"description":"Breakdown of cached tokens by TTL."}],"inference_geo":[{"type":"object","properties":{},"description":"The geographic region where inference was performed for this request."}],"server_tool_use":[{"type":"object","properties":{"web_search_requests":[{"type":"integer","description":"The number of web search tool requests."}],"web_fetch_requests":[{"type":"integer","description":"The number of web fetch tool requests."}]},"description":"The number of server tool requests."}],"service_tier":[{"type":"object","properties":{},"description":"If the request used the priority, standard, or batch tier. Values: `standard` , `priority` , `batch` ."}]},"description":"Billing and rate-limit usage. The three input buckets are mutually exclusive — see Token usage ."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","type":"\u003cstring>","role":"\u003cstring>","container":{"id":"\u003cstring>","expires_at":"\u003cstring>"},"content":[{"type":"\u003cstring>","text":"\u003cstring>","citations":{},"id":"\u003cstring>","name":"\u003cstring>","input":{},"thinking":"\u003cstring>","signature":"\u003cstring>","data":"\u003cstring>","tool_use_id":"\u003cstring>","content":{}}],"model":"\u003cstring>","stop_reason":{},"stop_sequence":{},"usage":{"input_tokens":123,"output_tokens":123,"total_tokens":123,"cache_creation_input_tokens":{},"cache_read_input_tokens":{},"sunra_usage_semantics":{},"cache_creation":{"ephemeral_5m_input_tokens":123,"ephemeral_1h_input_tokens":123},"inference_geo":{},"server_tool_use":{"web_search_requests":123,"web_fetch_requests":123},"service_tier":{}}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"sunraai","siteName":"Sunra.ai","title":"Create a message - Sunra.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/llm/messages","matchLevel":0},"zh-Hans":{"href":"/zh-Hans/llm/messages","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/llm/messages","matchLevel":1},"fr":{"href":"/fr/llm/messages","matchLevel":1},"ja":{"href":"/ja/llm/messages","matchLevel":1},"es":{"href":"/es/llm/messages","matchLevel":1},"pt":{"href":"/pt/llm/messages","matchLevel":1},"hi":{"href":"/hi/llm/messages","matchLevel":1},"tr":{"href":"/tr/llm/messages","matchLevel":1},"de":{"href":"/de/llm/messages","matchLevel":1},"id":{"href":"/id/llm/messages","matchLevel":1},"it":{"href":"/it/llm/messages","matchLevel":1},"ko":{"href":"/ko/llm/messages","matchLevel":1},"ru":{"href":"/ru/llm/messages","matchLevel":1}}},"lastModified":"2026-09-19T11:27:30.147Z","originalFileLocation":"llm/messages.mdx","locale":"en"},"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=\"application-name\" content=\"Sunra.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_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/sunraai/LRMCLsYjFvskNvgC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a message - Sunra.ai\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Sunra.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.sunra.ai/llm/messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sunraai.mintlify.app/_mintlify/api/og/v2?division=LLM\u0026amp;title=Create+a+message\u0026amp;theme=bd1a022ff2457f18109208ab\u0026amp;signature=544d4e819ffada71d4fbc6b3453b1d90f00818aece73d2e98361ac8e31bd50c5\">\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 - Sunra.ai\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sunraai.mintlify.app/_mintlify/api/og/v2?division=LLM\u0026amp;title=Create+a+message\u0026amp;theme=bd1a022ff2457f18109208ab\u0026amp;signature=544d4e819ffada71d4fbc6b3453b1d90f00818aece73d2e98361ac8e31bd50c5\">\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/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Sunra.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff632f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.sunra.ai/llm/messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/llm/messages.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.sunra.ai/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.sunra.ai/zh-Hans/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://docs.sunra.ai/zh-Hant/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.sunra.ai/fr/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.sunra.ai/ja/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.sunra.ai/es/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt\" href=\"https://docs.sunra.ai/pt/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://docs.sunra.ai/hi/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"tr\" href=\"https://docs.sunra.ai/tr/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.sunra.ai/de/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://docs.sunra.ai/id/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.sunra.ai/it/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.sunra.ai/ko/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.sunra.ai/ru/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.sunra.ai/llm/messages\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.sunra.ai/#organization\",\"name\":\"Sunra.ai\",\"url\":\"https://docs.sunra.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/light.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=520c0afb29ad1fddc46fec66c975eb2a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.sunra.ai#website\",\"name\":\"Sunra.ai\",\"url\":\"https://docs.sunra.ai\",\"publisher\":{\"@id\":\"https://docs.sunra.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.sunra.ai/llm/messages#webpage\",\"url\":\"https://docs.sunra.ai/llm/messages\",\"name\":\"Create a message\",\"dateModified\":\"2026-09-19T11:27:30.147Z\",\"isPartOf\":{\"@id\":\"https://docs.sunra.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.sunra.ai/llm/messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.sunra.ai/llm/messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LLM\",\"item\":\"https://docs.sunra.ai/llm/llm-quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a message\",\"item\":\"https://docs.sunra.ai/llm/messages\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.sunra.ai/llm/messages#apireference\",\"headline\":\"Create a message\",\"name\":\"Create a message\",\"url\":\"https://docs.sunra.ai/llm/messages\",\"mainEntityOfPage\":{\"@id\":\"https://docs.sunra.ai/llm/messages#webpage\"},\"dateModified\":\"2026-09-19T11:27:30.147Z\",\"publisher\":{\"@id\":\"https://docs.sunra.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.sunra.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Sunra.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Sunra.ai","nav":{"global":{"anchors":[{"anchor":"X (Twitter)","icon":"x-twitter","href":"https://x.com/sunra_ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/897qCzvCcU"},{"anchor":"GitHub","icon":"github","href":"https://github.com/sunra-ai"}]},"languages":[{"language":"en","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":""}]},{"group":"Platform","pages":[{"title":"Authentication","href":"/platform/authentication"},{"title":"Budget keys","href":"/platform/budget-keys"},{"title":"Shared budget pools","href":"/platform/budget-pools"},{"title":"File Upload","href":"/platform/file-upload"},{"title":"Pricing","href":"/platform/pricing"},{"title":"Errors","href":"/platform/errors"}]},{"group":"Multimodal","pages":[{"title":"Quickstart","href":"/multimodal/quickstart"},{"title":"Text to Image","href":"/multimodal/text-to-image"},{"title":"Text to Video","href":"/multimodal/text-to-video"},{"title":"Image to Video","href":"/multimodal/image-to-video"},{"title":"Speech to Text","href":"/multimodal/speech-to-text"},{"title":"ElevenLabs Voices","href":"/multimodal/elevenlabs-voices"},{"title":"Canonical Model Endpoints","href":"/multimodal/canonical-model-endpoints"},{"title":"MCP Server","href":"/multimodal/mcp-server-setup"},{"title":"Queue","href":"/multimodal/queue"},{"title":"Server-Side Integration","href":"/multimodal/server-side-integration"}]},{"group":"LLM","pages":[{"title":"LLM Quickstart","href":"/llm/llm-quickstart"},{"title":"Provider routing","href":"/llm/provider-routing"},{"title":"Token usage","href":"/llm/token-usage"},{"title":"Output limits and stream lifetime","href":"/llm/limits"},{"title":"Response identifiers and tracking","href":"/llm/response-tracking"},{"title":"Create a chat completion","api":"POST https://api-llm.sunra.ai/v1/chat/completions","description":null,"href":"/llm/chat"},{"title":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","href":"/llm/messages"},{"title":"Create a response","api":"POST https://api-llm.sunra.ai/v1/responses","description":null,"href":"/llm/responses"},{"title":"Create embeddings","api":"POST https://api-llm.sunra.ai/v1/embeddings","href":"/llm/embeddings"}]},{"group":"Client Libraries","pages":[{"title":"JavaScript / TypeScript","href":"/client-libraries/javascript"},{"title":"Python","href":"/client-libraries/python"},{"title":"Java","href":"/client-libraries/java"},{"title":"Request New Client","href":"/client-libraries/request-new-client"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/llm/messages"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/llm/messages"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/llm/messages"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/llm/messages"}]},{"language":"es","pages":[{"title":"es","href":"/es/llm/messages"}]},{"language":"pt","pages":[{"title":"pt","href":"/pt/llm/messages"}]},{"language":"hi","pages":[{"title":"hi","href":"/hi/llm/messages"}]},{"language":"tr","pages":[{"title":"tr","href":"/tr/llm/messages"}]},{"language":"de","pages":[{"title":"de","href":"/de/llm/messages"}]},{"language":"id","pages":[{"title":"id","href":"/id/llm/messages"}]},{"language":"it","pages":[{"title":"it","href":"/it/llm/messages"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/llm/messages"}]},{"language":"ru","pages":[{"title":"ru","href":"/ru/llm/messages"}]}]},"basePath":"","title":"Create a message - Sunra.ai","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["BannerMarkdown-DHaG7hr_.js","dist-DKZWslLH.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-BIWXJmsZ.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js"]}