(Developer message · object | System message · object | User message · object | Assistant message · object | Tool message · object | Function message · object)[]
required
A list of messages comprising the conversation so far. Depending on the
model you use, different message types (modalities) are
supported, like text,
images, and audio.
Minimum array length: 1
Developer-provided instructions that the model should follow, regardless of
messages sent by the user. With o1 models and newer, developer messages
replace the previous system messages.
Model ID used to generate the response, like qwen3-max or gpt-5. Mulerouter
offers a wide range of models with different capabilities, performance
characteristics, and price points.
to browse and compare available models.
Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings
with a maximum length of 512 characters.
An integer between 0 and 20 specifying the number of most likely tokens to
return at each token position, each with an associated log probability.
logprobs must be set to true if this parameter is used.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability
mass. So 0.1 means only the tokens comprising the top 10% probability mass
are considered.
We generally recommend altering this or temperature but not both.
This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations.
A stable identifier for your end-users.
Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. information.
Specifies the processing type used for serving the request.
If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.
When not set, the default behavior is 'auto'.
When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
Constrains the verbosity of the model's response. Lower values will result in
more concise responses, while higher values will result in more verbose responses.
Currently supported values are low, medium, and high.
Constrains effort on reasoning for
reasoning models.
Currently supported values are minimal, low, medium, and high. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
Number between -2.0 and 2.0. Positive values penalize new tokens based on
their existing frequency in the text so far, decreasing the model's
likelihood to repeat the same line verbatim.
Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood
to talk about new topics.
An object specifying the format that the model must output.
Setting to { "type": "json_schema", "json_schema": {...} } enables
Structured Outputs which ensures the model will match your supplied JSON
schema.
Setting to { "type": "json_object" } enables the older JSON mode, which
ensures the message the model generates is valid JSON. Using json_schema
is preferred for models that support it.
Modify the likelihood of specified tokens appearing in the completion.
Accepts a JSON object that maps tokens (specified by their token ID in the
tokenizer) to an associated bias value from -100 to 100. Mathematically,
the bias is added to the logits generated by the model prior to sampling.
The exact effect will vary per model, but values between -1 and 1 should
decrease or increase likelihood of selection; values like -100 or 100
should result in a ban or exclusive selection of the relevant token.
Whether to return log probabilities of the output tokens or not. If true,
returns the log probabilities of each output token returned in the
content of message.
How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
Configuration for a Predicted Output
which can greatly improve response times when large parts of the model
response are known ahead of time. This is most common when you are
regenerating a file with only minor changes to most of the content.
This feature is in Beta.
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
Required range: -9223372036854776000 <= x <= 9223372036854776000
Controls which (if any) tool is called by the model.
none means the model will not call any tool and instead generates a message.
auto means the model can pick between generating a message or calling one or more tools.
required means the model must call one or more tools.
Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
none is the default when no tools are present. auto is the default if tools are present.
Specifies the processing type used for serving the request.
If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.
When not set, the default behavior is 'auto'.
When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MuleRouter Docs","colors":{"primary":"#594BF6","light":"#7E7DFF","dark":"#594BF6"},"logo":{"light":"https://mintcdn.com/mulerouter/w_eptSTc-1yZxAo4/logo/logo-black.png?fit=max\u0026auto=format\u0026n=w_eptSTc-1yZxAo4\u0026q=85\u0026s=999db716e829193466c7e1f5634e0cd6","dark":"https://mintcdn.com/mulerouter/w_eptSTc-1yZxAo4/logo/logo-white.png?fit=max\u0026auto=format\u0026n=w_eptSTc-1yZxAo4\u0026q=85\u0026s=fcdc6b30ee1ed937ae509f24337d70a9"},"favicon":"https://mintcdn.com/mulerouter/qjoWRjVMcugsGrYt/logo/favicon.svg?fit=max\u0026auto=format\u0026n=qjoWRjVMcugsGrYt\u0026q=85\u0026s=36bb7994e26042019c16a17b003cbb8e","navbar":{"links":[{"href":"mailto:contact@mulerouter.ai","label":"Contact"}],"primary":{"type":"button","label":"MuleRouter","href":"https://mulerouter.ai"}},"footer":{"socials":{"discord":"https://discord.gg/pdRwFDsc9z"}},"seo":{"metatags":{"canonical":"https://www.mulerouter.ai/docs","title":"MuleRouter Documentation - AI API Gateway \u0026 Routing Platform","description":"Complete API documentation for MuleRouter AI platform. Learn to integrate LLM, image generation, and video generation APIs including OpenAI, Qwen, Wan 2, Midjourney, and more.","keywords":"MuleRouter, AI API, API gateway, LLM, OpenAI, image generation, video generation, Qwen, Wan 2, Midjourney, AI integration, API documentation","og:title":"MuleRouter Documentation - AI API Gateway \u0026 Routing Platform","og:description":"Complete API documentation for MuleRouter AI platform. Learn to integrate LLM, image generation, and video generation APIs including OpenAI, Qwen, Wan 2, Midjourney, and more.","og:image":"https://www.mulerouter.ai/logo/logo-black.png","og:url":"https://www.mulerouter.ai/docs","og:type":"website","twitter:card":"summary_large_image","twitter:title":"MuleRouter Documentation - AI API Gateway \u0026 Routing Platform","twitter:description":"Complete API documentation for MuleRouter AI platform. Learn to integrate LLM, image generation, and video generation APIs including OpenAI, Qwen, Wan 2, Midjourney, and more.","twitter:image":"https://www.mulerouter.ai/logo/logo-black.png","robots":"index, follow","author":"MuleRouter","language":"en"}},"contextual":{"options":["copy","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/pdRwFDsc9z"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mulerouter","hasAudioNarration":false,"actualSubdomain":"mulerouter","customDomains":["mulerouter.ai"],"gitSource":{"type":"github","owner":"openmule","repo":"mulerouter-website","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae213d1f8179dd8087b26a7","collectionId":"4296a510-d817-4ef8-85a3-4be9d5f89488","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae213d1f8179dd8087b26a7"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae213d1f8179dd8087b26a7","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"API Reference","count":108},{"language":"default","tag":"Video Generation","count":61},{"language":"default","tag":"Wan 2","count":39},{"language":"default","tag":"Image Generation","count":35},{"language":"default","tag":"CLI","count":15},{"language":"default","tag":"Kling","count":14},{"language":"default","tag":"Wan 2 Spark","count":12},{"language":"default","tag":"Get Started","count":9},{"language":"default","tag":"MiniMax","count":8},{"language":"default","tag":"Wan 3","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/openai/chat","slug":"/api-reference/endpoint/openai/chat","pageMetadata":{"title":"Create Chat Completion","openapi":"api-reference/endpoint/openai/openai.yaml POST /vendors/openai/v1/chat/completions","description":"Creates a new chat completion for the given model and prompt.","href":"/api-reference/endpoint/openai/chat"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Creates a new chat completion for the given model and prompt.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,p:`p`,..._provideComponents(),...props.components},{Note}=_components;if(!Note)_missingMdxReference(`Note`,true);return _jsxs(Note,{children:[_jsx(_components.p,{children:`This API is compatible with OpenAI’s format.`}),_jsxs(_components.p,{children:[`For more details, please refer to OpenAI’s `,_jsx(_components.a,{href:`https://platform.openai.com/docs/api-reference/chat`,children:`official documentation`}),`.`]}),_jsx(_components.p,{children:`Not all models support all parameters.`})]})}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 Chat Completion","openapi":"api-reference/endpoint/openai/openai.yaml POST /vendors/openai/v1/chat/completions","description":"Creates a new chat completion for the given model and prompt.","href":"/api-reference/endpoint/openai/chat"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Creates a new chat completion for the given model and prompt.","operationId":"createChatCompletion","tags":["Chat"],"summary":"Create chat completion","requestBody":"02ff4ce5-e1f8-4def-88c0-1b0dcad3bc8b","responses":{"200":"d4b2c424-5bf1-447d-b7da-13d7df15f75b"},"method":"post","type":"path","servers":["6de9fd0a-4837-4b4a-ba8c-533051f7f2c6"],"security":["18763e08-9d4e-4750-a445-9179b4afcbd7"],"path":"/vendors/openai/v1/chat/completions","baseUrlOptions":["https://api.mulerouter.ai/"],"title":"Create chat completion","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"messages":{"description":"A list of messages comprising the conversation so far. Depending on the\nmodel you use, different message types (modalities) are\nsupported, like text,\nimages, and audio.\n","type":"array","minItems":1,"items":{"oneOf":[{"type":"object","title":"Developer message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n","required":["content","role"],"x-stainless-naming":{"go":{"variant_constructor":"DeveloperMessage"}},"properties":{"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the developer message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX].text","typeLabel":"string"}},"required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object"},"title":"Array of content parts","description":"The contents of the developer message.","minItems":1,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1","typeLabel":"Text content part · object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content","typeLabel":"string | Text content part · object[]"},"role":{"type":"string","enum":["developer"],"description":"The role of the messages author, in this case `developer`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.0.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.0","typeLabel":"Developer message · object"},{"type":"object","title":"System message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, use `developer` messages\nfor this purpose instead.\n","required":["content","role"],"x-stainless-naming":{"go":{"variant_constructor":"SystemMessage"}},"properties":{"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the system message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object"},"title":"Array of content parts","description":"The contents of the system message.","minItems":1,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1","typeLabel":"Text content part · object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content","typeLabel":"string | Text content part · object[]"},"role":{"type":"string","enum":["system"],"description":"The role of the messages author, in this case `system`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.1","typeLabel":"System message · object"},{"type":"object","title":"User message","description":"Messages sent by an end user, containing prompts or additional context\ninformation.\n","required":["content","role"],"x-stainless-naming":{"go":{"variant_constructor":"UserMessage"}},"properties":{"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the user message.\n","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Text content part · object"},{"type":"object","title":"Image content part","description":"Learn about image inputs.\n","required":["type","image_url"],"x-stainless-naming":{"go":{"variant_constructor":"ImageContentPart"}},"properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.","format":"uri","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string\u003curi>"},"detail":{"type":"string","description":"Specifies the detail level of the image. ","enum":["auto","low","high"],"default":"auto","uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Image content part · object"},{"type":"object","title":"Audio content part","description":"Learn about audio inputs.\n","required":["type","input_audio"],"x-stainless-naming":{"go":{"variant_constructor":"InputAudioContentPart"}},"properties":{"type":{"type":"string","enum":["input_audio"],"description":"The type of the content part. Always `input_audio`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"input_audio":{"type":"object","properties":{"data":{"type":"string","description":"Base64 encoded audio data.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.input_audio.data","typeLabel":"string"},"format":{"type":"string","enum":["wav","mp3"],"description":"The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.input_audio.format","typeLabel":"enum\u003cstring>"}},"required":["data","format"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.input_audio","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"Audio content part · object"},{"type":"object","title":"File content part","description":"Learn about file inputs for text generation.\n","required":["type","file"],"x-stainless-naming":{"go":{"variant_constructor":"FileContentPart"}},"properties":{"type":{"type":"string","enum":["file"],"description":"The type of the content part. Always `file`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"file":{"type":"object","properties":{"filename":{"type":"string","description":"The name of the file, used when passing the file to the model as a \nstring.\n","uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.file.filename","typeLabel":"string"},"file_data":{"type":"string","description":"The base64 encoded file data, used when passing the file to the model \nas a string.\n","uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.file.file_data","typeLabel":"string"},"file_id":{"type":"string","description":"The ID of an uploaded file to use as input.\n","uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.file.file_id","typeLabel":"string"}},"x-stainless-naming":{"java":{"type_name":"FileObject"},"kotlin":{"type_name":"FileObject"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.file","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3","typeLabel":"File content part · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object | Image content part · object | Audio content part · object | File content part · object"},"title":"Array of content parts","description":"The contents of the user message.\n","minItems":1,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1","typeLabel":"(Text content part · object | Image content part · object | Audio content part · object | File content part · object)[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content","typeLabel":"string | (Text content part · object | Image content part · object | Audio content part · object | File content part · object)[]"},"role":{"type":"string","enum":["user"],"description":"The role of the messages author, in this case `user`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.2.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.2","typeLabel":"User message · object"},{"type":"object","title":"Assistant message","description":"Messages sent by the model in response to user messages.\n","required":["role"],"x-stainless-soft-required":["content"],"properties":{"role":{"type":"string","enum":["assistant"],"description":"The role of the messages author, in this case `assistant`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Text content part · object"},{"type":"object","title":"Refusal content part","required":["type","refusal"],"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"refusal":{"type":"string","description":"The refusal message generated by the model.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.1.refusal","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Refusal content part · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object | Refusal content part · object"},"title":"Array of content parts","description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n","minItems":1,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1","typeLabel":"(Text content part · object | Refusal content part · object)[]"},{"type":"null","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.content","typeLabel":"string | (Text content part · object | Refusal content part · object)[] | null"},"refusal":{"oneOf":[{"type":"string","description":"The refusal message by the assistant.","uniqueKey":"messages.items.[INDEX].oneOf.3.refusal.oneOf.0","typeLabel":"string"},{"type":"null","description":"The refusal message by the assistant.","uniqueKey":"messages.items.[INDEX].oneOf.3.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.refusal","typeLabel":"string | null"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.3.name","typeLabel":"string"},"audio":{"oneOf":[{"type":"object","description":"Data about a previous audio response from the model. \n","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier for a previous audio response from the model.\n","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.audio.oneOf.0.id","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.audio.oneOf.0","typeLabel":"object"},{"type":"null","description":"Data about a previous audio response from the model. \n","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier for a previous audio response from the model.\n"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.audio","typeLabel":"object | null"},"tool_calls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"oneOf":[{"type":"object","title":"Function tool call","description":"A call to a function tool created by the model.\n","required":["id","type","function"],"x-stainless-naming":{"python":{"model_name":"chat_completion_message_tool_call_union","param_model_name":"chat_completion_message_tool_call_union_param"}},"x-stainless-go-variant-constructor":"skip","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0.id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0.function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0.function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0.function","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.0","typeLabel":"Function tool call · object"},{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","required":["id","type","custom"],"x-stainless-naming":{"python":{"model_name":"chat_completion_message_tool_call_union","param_model_name":"chat_completion_message_tool_call_union_param"}},"x-stainless-go-variant-constructor":"skip","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1.id","typeLabel":"string"},"type":{"type":"string","enum":["custom"],"description":"The type of the tool. Always `custom`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"custom":{"type":"object","description":"The custom tool that the model called.","properties":{"name":{"type":"string","description":"The name of the custom tool to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1.custom.name","typeLabel":"string"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1.custom.input","typeLabel":"string"}},"required":["name","input"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1.custom","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].oneOf.1","typeLabel":"Custom tool call · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX]","typeLabel":"Function tool call · object | Custom tool call · object"},"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls","typeLabel":"(Function tool call · object | Custom tool call · object)[]"},"function_call":{"oneOf":[{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0.arguments","typeLabel":"string"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0.name","typeLabel":"string"}},"required":["arguments","name"],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0","typeLabel":"object"},{"type":"null","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["arguments","name"],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].oneOf.3","typeLabel":"Assistant message · object"},{"type":"object","title":"Tool message","required":["role","content","tool_call_id"],"x-stainless-naming":{"go":{"variant_constructor":"ToolMessage"}},"properties":{"role":{"type":"string","enum":["tool"],"description":"The role of the messages author, in this case `tool`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the tool message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object"},"title":"Array of content parts","description":"The contents of the tool message.","minItems":1,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1","typeLabel":"Text content part · object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content","typeLabel":"string | Text content part · object[]"},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.tool_call_id","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.4","typeLabel":"Tool message · object"},{"type":"object","title":"Function message","required":["role","content","name"],"deprecated":true,"properties":{"role":{"type":"string","enum":["function"],"description":"The role of the messages author, in this case `function`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The contents of the function message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the function message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content","typeLabel":"string | null"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.5","typeLabel":"Function message · object"}],"uniqueKey":"messages.items.[INDEX]","typeLabel":"Developer message · object | System message · object | User message · object | Assistant message · object | Tool message · object | Function message · object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"(Developer message · object | System message · object | User message · object | Assistant message · object | Tool message · object | Function message · object)[]"},"model":{"type":"string","description":"Model ID used to generate the response, like `qwen3-max` or `gpt-5`. Mulerouter\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. \nto browse and compare available models.\n","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"metadata":{"oneOf":[{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. \n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string","uniqueKey":"metadata.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. \n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string","uniqueKey":"metadata.oneOf.1.additionalProperties","typeLabel":"string"},"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"object | null"},"top_logprobs":{"type":"integer","description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n`logprobs` must be set to `true` if this parameter is used.\n","maximum":20,"minimum":0,"uniqueKey":"top_logprobs","typeLabel":"integer"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":2,"default":1,"example":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":2,"default":1,"example":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"default":1,"example":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"default":1,"example":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"user":{"type":"string","example":"user-1234","deprecated":true,"description":"This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users. \nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. information. \n","uniqueKey":"user","typeLabel":"string"},"service_tier":{"oneOf":[{"type":"string","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"enum\u003cstring> | null"},"modalities":{"oneOf":[{"type":"array","description":"Output types that you would like the model to generate.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nThe `gpt-4o-audio-preview` model can also be used to \ngenerate audio. To request that this model generate \nboth text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n","items":{"type":"string","enum":["text","audio"],"uniqueKey":"modalities.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"modalities.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"type":"null","description":"Output types that you would like the model to generate.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nThe `gpt-4o-audio-preview` model can also be used to \ngenerate audio. To request that this model generate \nboth text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n","items":{"type":"string","enum":["text","audio"]},"uniqueKey":"modalities.oneOf.1","typeLabel":"null"}],"uniqueKey":"modalities","typeLabel":"enum\u003cstring>[] | null"},"verbosity":{"oneOf":[{"type":"string","enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n","uniqueKey":"verbosity.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n","uniqueKey":"verbosity.oneOf.1","typeLabel":"null"}],"uniqueKey":"verbosity","typeLabel":"enum\u003cstring> | null"},"reasoning_effort":{"oneOf":[{"type":"string","enum":["minimal","low","medium","high"],"default":"medium","description":"Constrains effort on reasoning for \nreasoning models.\nCurrently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n","uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["minimal","low","medium","high"],"default":"medium","description":"Constrains effort on reasoning for \nreasoning models.\nCurrently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n","uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring> | null"},"max_completion_tokens":{"oneOf":[{"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.\n","type":"integer","uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.\n","type":"null","uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"frequency_penalty":{"oneOf":[{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n","uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n","uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"presence_penalty":{"oneOf":[{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n","uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n","uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"web_search_options":{"type":"object","title":"Web search","description":"This tool searches the web for relevant results to use in a response.\n","properties":{"user_location":{"oneOf":[{"type":"object","required":["type","approximate"],"description":"Approximate location parameters for the search.\n","properties":{"type":{"type":"string","description":"The type of location approximation. Always `approximate`.\n","enum":["approximate"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"web_search_options.user_location.oneOf.0.type","typeLabel":"enum\u003cstring>"},"approximate":{"type":"object","title":"Web search location","description":"Approximate location parameters for the search.","properties":{"country":{"type":"string","description":"The two-letter \nISO country code of the user,\ne.g. `US`.\n","uniqueKey":"web_search_options.user_location.oneOf.0.approximate.country","typeLabel":"string"},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.\n","uniqueKey":"web_search_options.user_location.oneOf.0.approximate.region","typeLabel":"string"},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.\n","uniqueKey":"web_search_options.user_location.oneOf.0.approximate.city","typeLabel":"string"},"timezone":{"type":"string","description":"The IANA timezone \nof the user, e.g. `America/Los_Angeles`.\n","uniqueKey":"web_search_options.user_location.oneOf.0.approximate.timezone","typeLabel":"string"}},"isRequired":true,"uniqueKey":"web_search_options.user_location.oneOf.0.approximate","typeLabel":"Web search location · object"}},"uniqueKey":"web_search_options.user_location.oneOf.0","typeLabel":"object"},{"type":"null","required":["type","approximate"],"description":"Approximate location parameters for the search.\n","properties":{"type":{"type":"string","description":"The type of location approximation. Always `approximate`.\n","enum":["approximate"],"x-stainless-const":true},"approximate":{"type":"object","title":"Web search location","description":"Approximate location parameters for the search.","properties":{"country":{"type":"string","description":"The two-letter \nISO country code of the user,\ne.g. `US`.\n"},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.\n"},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.\n"},"timezone":{"type":"string","description":"The IANA timezone \nof the user, e.g. `America/Los_Angeles`.\n"}}}},"uniqueKey":"web_search_options.user_location.oneOf.1","typeLabel":"null"}],"uniqueKey":"web_search_options.user_location","typeLabel":"object | null"},"search_context_size":{"type":"string","description":"High level guidance for the amount of context window space to use for the \nsearch. One of `low`, `medium`, or `high`. `medium` is the default.\n","enum":["low","medium","high"],"default":"medium","uniqueKey":"web_search_options.search_context_size","typeLabel":"enum\u003cstring>"}},"uniqueKey":"web_search_options","typeLabel":"Web search · object"},"response_format":{"oneOf":[{"type":"object","title":"Text","description":"An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. \n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n","required":["type"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"response_format.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"JSON schema","description":"An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. \n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n","required":["type","json_schema"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"response_format.oneOf.1.type","typeLabel":"enum\u003cstring>"},"json_schema":{"type":"object","title":"JSON schema","description":"Structured Outputs configuration options, including a JSON Schema.\n","properties":{"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n","isRequired":true,"uniqueKey":"response_format.oneOf.1.json_schema.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n","uniqueKey":"response_format.oneOf.1.json_schema.description","typeLabel":"string"},"schema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\n","additionalProperties":true,"uniqueKey":"response_format.oneOf.1.json_schema.schema","typeLabel":"JSON schema · object"},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. \n","uniqueKey":"response_format.oneOf.1.json_schema.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. \n","uniqueKey":"response_format.oneOf.1.json_schema.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.1.json_schema.strict","typeLabel":"boolean | null"}},"required":["name"],"isRequired":true,"uniqueKey":"response_format.oneOf.1.json_schema","typeLabel":"JSON schema · object"}},"uniqueKey":"response_format.oneOf.1","typeLabel":"JSON schema · object"},{"type":"object","title":"JSON object","description":"An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. \n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n","required":["type"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"response_format.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.2","typeLabel":"JSON object · object"}],"uniqueKey":"response_format","typeLabel":"Text · object | JSON schema · object | JSON object · object"},"audio":{"oneOf":[{"type":"object","description":"Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. \n","required":["voice","format"],"properties":{"voice":{"oneOf":[{"type":"string","description":"The voice the model uses to respond. Supported voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n","example":"ash","isRequired":true,"uniqueKey":"audio.oneOf.0.voice.oneOf.0","typeLabel":"string"},{"type":"string","description":"The voice the model uses to respond. Supported voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n","enum":["alloy","ash","ballad","coral","echo","sage","shimmer","verse","marin","cedar"],"example":"ash","isRequired":true,"uniqueKey":"audio.oneOf.0.voice.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"audio.oneOf.0.voice","typeLabel":"string | enum\u003cstring>"},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"],"description":"Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n","isRequired":true,"uniqueKey":"audio.oneOf.0.format","typeLabel":"enum\u003cstring>"}},"uniqueKey":"audio.oneOf.0","typeLabel":"object"},{"type":"null","description":"Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. \n","required":["voice","format"],"properties":{"voice":{"oneOf":[{"type":"string","description":"The voice the model uses to respond. Supported voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n","example":"ash"},{"type":"string","description":"The voice the model uses to respond. Supported voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n","enum":["alloy","ash","ballad","coral","echo","sage","shimmer","verse","marin","cedar"],"example":"ash"}]},"format":{"type":"string","enum":["wav","aac","mp3","flac","opus","pcm16"],"description":"Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n"}},"uniqueKey":"audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"audio","typeLabel":"object | null"},"store":{"oneOf":[{"type":"boolean","default":false,"description":"Whether or not to store the output of this chat completion request for\nuse in our model distillation or\nevals products.\n\nSupports text and image inputs. Note: image inputs over 8MB will be dropped.\n","uniqueKey":"store.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether or not to store the output of this chat completion request for\nuse in our model distillation or\nevals products.\n\nSupports text and image inputs. Note: image inputs over 8MB will be dropped.\n","uniqueKey":"store.oneOf.1","typeLabel":"null"}],"uniqueKey":"store","typeLabel":"boolean | null"},"stream":{"oneOf":[{"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n","type":"boolean","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n","type":"null","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stop":{"oneOf":[{"type":"string","description":"Not supported with latest reasoning models `o3` and `o4-mini`.\n\nUp to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n","default":"\u003c|endoftext|>","example":"\n","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"null","description":"Not supported with latest reasoning models `o3` and `o4-mini`.\n\nUp to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n","default":"\u003c|endoftext|>","example":"\n","uniqueKey":"stop.oneOf.1","typeLabel":"null"},{"type":"array","items":{"type":"string","example":"[\"\\n\"]","uniqueKey":"stop.oneOf.2.items.[INDEX]","typeLabel":"string"},"description":"Not supported with latest reasoning models `o3` and `o4-mini`.\n\nUp to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n","maxItems":4,"minItems":1,"uniqueKey":"stop.oneOf.2","typeLabel":"string[]"},{"type":"null","uniqueKey":"stop.oneOf.3","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string · null · string[] · null"},"logit_bias":{"oneOf":[{"type":"object","x-oaiTypeLabel":"map","default":null,"additionalProperties":{"type":"integer","uniqueKey":"logit_bias.oneOf.0.additionalProperties","typeLabel":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the\ntokenizer) to an associated bias value from -100 to 100. Mathematically,\nthe bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should\ndecrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.\n","uniqueKey":"logit_bias.oneOf.0","typeLabel":"object"},{"type":"null","x-oaiTypeLabel":"map","default":null,"additionalProperties":{"type":"integer","uniqueKey":"logit_bias.oneOf.1.additionalProperties","typeLabel":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the\ntokenizer) to an associated bias value from -100 to 100. Mathematically,\nthe bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should\ndecrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.\n","uniqueKey":"logit_bias.oneOf.1","typeLabel":"null"}],"uniqueKey":"logit_bias","typeLabel":"object | null"},"logprobs":{"oneOf":[{"description":"Whether to return log probabilities of the output tokens or not. If true,\nreturns the log probabilities of each output token returned in the\n`content` of `message`.\n","type":"boolean","default":false,"uniqueKey":"logprobs.oneOf.0","typeLabel":"boolean"},{"description":"Whether to return log probabilities of the output tokens or not. If true,\nreturns the log probabilities of each output token returned in the\n`content` of `message`.\n","type":"null","default":false,"uniqueKey":"logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"logprobs","typeLabel":"boolean | null"},"max_tokens":{"oneOf":[{"description":"The maximum number of tokens that can be generated in the\nchat completion. This value can be used to control\ncosts for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with o-series models.\n","type":"integer","deprecated":true,"uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"description":"The maximum number of tokens that can be generated in the\nchat completion. This value can be used to control\ncosts for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with o-series models.\n","type":"null","deprecated":true,"uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"n":{"oneOf":[{"type":"integer","minimum":1,"maximum":128,"default":1,"example":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.","uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"maximum":128,"default":1,"example":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.","uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"prediction":{"oneOf":[{"type":"object","title":"Static Content","description":"Configuration for a Predicted Output\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n","required":["type","content"],"properties":{"type":{"type":"string","enum":["content"],"description":"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n","x-stainless-const":true,"isRequired":true,"uniqueKey":"prediction.oneOf.0.type","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"Text content","description":"The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n","isRequired":true,"uniqueKey":"prediction.oneOf.0.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text content part","description":"Learn about text inputs.\n","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","x-stainless-const":true,"isRequired":true,"uniqueKey":"prediction.oneOf.0.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"prediction.oneOf.0.content.oneOf.1.items.[INDEX].text","typeLabel":"string"}},"required":["type","text"],"x-stainless-naming":{"go":{"variant_constructor":"TextContentPart"}},"uniqueKey":"prediction.oneOf.0.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object"},"title":"Array of content parts","description":"The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n","minItems":1,"isRequired":true,"uniqueKey":"prediction.oneOf.0.content.oneOf.1","typeLabel":"Text content part · object[]"}],"isRequired":true,"uniqueKey":"prediction.oneOf.0.content","typeLabel":"string | Text content part · object[]"}},"uniqueKey":"prediction.oneOf.0","typeLabel":"Static Content · object"},{"type":"null","uniqueKey":"prediction.oneOf.1","typeLabel":"null"}],"uniqueKey":"prediction","typeLabel":"Static Content · object | null"},"seed":{"oneOf":[{"type":"integer","minimum":-9223372036854776000,"maximum":9223372036854776000,"deprecated":true,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n","x-oaiMeta":{"beta":true},"uniqueKey":"seed.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":-9223372036854776000,"maximum":9223372036854776000,"deprecated":true,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n","x-oaiMeta":{"beta":true},"uniqueKey":"seed.oneOf.1","typeLabel":"null"}],"uniqueKey":"seed","typeLabel":"integer | null"},"stream_options":{"oneOf":[{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"object","default":null,"properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]`\nmessage. The `usage` field on this chunk shows the token usage statistics\nfor the entire request, and the `choices` field will always be an empty\narray.\n\nAll other chunks will also include a `usage` field, but with a null\nvalue. **NOTE:** If the stream is interrupted, you may not receive the\nfinal usage chunk which contains the total token usage for the request.\n","uniqueKey":"stream_options.oneOf.0.include_usage","typeLabel":"boolean"},"include_obfuscation":{"type":"boolean","description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n","uniqueKey":"stream_options.oneOf.0.include_obfuscation","typeLabel":"boolean"}},"uniqueKey":"stream_options.oneOf.0","typeLabel":"object"},{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"null","default":null,"properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]`\nmessage. The `usage` field on this chunk shows the token usage statistics\nfor the entire request, and the `choices` field will always be an empty\narray.\n\nAll other chunks will also include a `usage` field, but with a null\nvalue. **NOTE:** If the stream is interrupted, you may not receive the\nfinal usage chunk which contains the total token usage for the request.\n"},"include_obfuscation":{"type":"boolean","description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n"}},"uniqueKey":"stream_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options","typeLabel":"object | null"},"tools":{"type":"array","description":"A list of tools the model may call. You can provide either\ncustom tools or\nfunction tools.\n","items":{"oneOf":[{"type":"object","title":"Function tool","description":"A function tool that can be used to generate a response.\n","required":["type","function"],"x-stainless-naming":{"python":{"model_name":"chat_completion_tool_union","param_model_name":"chat_completion_tool_union_param"}},"x-stainless-go-variant-constructor":{"naming":"chat_completion_{variant}_tool"},"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.function.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"tools.items.[INDEX].oneOf.0.function.description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.function.parameters","typeLabel":"object"},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. ","uniqueKey":"tools.items.[INDEX].oneOf.0.function.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. ","uniqueKey":"tools.items.[INDEX].oneOf.0.function.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.items.[INDEX].oneOf.0.function.strict","typeLabel":"boolean | null"}},"required":["name"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX].oneOf.0","typeLabel":"Function tool · object"},{"type":"object","title":"Custom tool","description":"A custom tool that processes input using a specified format.\n","required":["type","custom"],"x-stainless-naming":{"python":{"model_name":"chat_completion_tool_union","param_model_name":"chat_completion_tool_union_param"}},"x-stainless-go-variant-constructor":{"naming":"chat_completion_{variant}_tool"},"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"custom":{"type":"object","title":"Custom tool properties","description":"Properties of the custom tool.\n","properties":{"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls.","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.name","typeLabel":"string"},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context.\n","uniqueKey":"tools.items.[INDEX].oneOf.1.custom.description","typeLabel":"string"},"format":{"oneOf":[{"type":"object","title":"Text format","description":"The input format for the custom tool. Default is unconstrained text.\n","required":["type"],"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.0","typeLabel":"Text format · object"},{"type":"object","title":"Grammar format","description":"The input format for the custom tool. Default is unconstrained text.\n","required":["type","grammar"],"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.1.type","typeLabel":"enum\u003cstring>"},"grammar":{"type":"object","title":"Grammar format","description":"Your chosen grammar.","properties":{"definition":{"type":"string","description":"The grammar definition.","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.1.grammar.definition","typeLabel":"string"},"syntax":{"type":"string","description":"The syntax of the grammar definition. One of `lark` or `regex`.","enum":["lark","regex"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.1.grammar.syntax","typeLabel":"enum\u003cstring>"}},"required":["definition","syntax"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.1.grammar","typeLabel":"Grammar format · object"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format.oneOf.1","typeLabel":"Grammar format · object"}],"uniqueKey":"tools.items.[INDEX].oneOf.1.custom.format","typeLabel":"Text format · object | Grammar format · object"}},"required":["name"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.custom","typeLabel":"Custom tool properties · object"}},"uniqueKey":"tools.items.[INDEX].oneOf.1","typeLabel":"Custom tool · object"}],"uniqueKey":"tools.items.[INDEX]","typeLabel":"Function tool · object | Custom tool · object"},"uniqueKey":"tools","typeLabel":"(Function tool · object | Custom tool · object)[]"},"tool_choice":{"oneOf":[{"type":"string","title":"Auto","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","enum":["none","auto","required"],"x-stainless-go-variant-constructor":{"naming":"tool_choice_option_{variant}"},"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","title":"Allowed tools","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","required":["type","allowed_tools"],"x-stainless-go-variant-constructor":{"naming":"tool_choice_option_{variant}"},"properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"allowed_tools":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.allowed_tools.mode","typeLabel":"enum\u003cstring>"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Chat Completions API, the list of tool definitions might look like:\n```json\n[\n { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n]\n```\n","items":{"type":"object","x-oaiExpandable":false,"description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true,"uniqueKey":"tool_choice.oneOf.1.allowed_tools.tools.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.allowed_tools.tools","typeLabel":"object[]"}},"required":["mode","tools"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.allowed_tools","typeLabel":"Allowed tools · object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"Allowed tools · object"},{"type":"object","title":"Function tool choice","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","required":["type","function"],"x-stainless-go-variant-constructor":{"naming":"tool_choice_option_{variant}"},"properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.2","typeLabel":"Function tool choice · object"},{"type":"object","title":"Custom tool choice","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","required":["type","custom"],"x-stainless-go-variant-constructor":{"naming":"tool_choice_option_{variant}"},"properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"tool_choice.oneOf.3.type","typeLabel":"enum\u003cstring>"},"custom":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom tool to call.","isRequired":true,"uniqueKey":"tool_choice.oneOf.3.custom.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.3.custom","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.3","typeLabel":"Custom tool choice · object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | Allowed tools · object | Function tool choice · object | Custom tool choice · object"},"parallel_tool_calls":{"description":"Whether to enable parallel function calling during tool use.","type":"boolean","default":true,"uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"function_call":{"oneOf":[{"type":"string","title":"function call mode","description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n\n`none` means the model will not call a function and instead generates a\nmessage.\n\n`auto` means the model can pick between generating a message or calling a\nfunction.\n\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the\nmodel to call that function.\n\n`none` is the default when no functions are present. `auto` is the default\nif functions are present.\n","enum":["none","auto"],"deprecated":true,"uniqueKey":"function_call.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n\n`none` means the model will not call a function and instead generates a\nmessage.\n\n`auto` means the model can pick between generating a message or calling a\nfunction.\n\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the\nmodel to call that function.\n\n`none` is the default when no functions are present. `auto` is the default\nif functions are present.\n","required":["name"],"deprecated":true,"x-stainless-variantName":"function_call_option","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"function_call.oneOf.1.name","typeLabel":"string"}},"uniqueKey":"function_call.oneOf.1","typeLabel":"object"}],"uniqueKey":"function_call","typeLabel":"enum\u003cstring> | object"},"functions":{"deprecated":true,"description":"Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n","type":"array","minItems":1,"maxItems":128,"items":{"type":"object","deprecated":true,"properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"functions.items.[INDEX].parameters","typeLabel":"object"}},"required":["name"],"uniqueKey":"functions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"functions","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"model":"qwen3-max","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Hello! How are you?"}]},"examples":{"Example":{"title":"Example","value":{"model":"qwen3-max","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Hello! How are you?"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d4b2c424-5bf1-447d-b7da-13d7df15f75b":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"Represents a chat completion response returned by model, based on the provided input.","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"choices":{"type":"array","description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.","items":{"type":"object","required":["finish_reason","index","message","logprobs"],"properties":{"finish_reason":{"type":"string","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"},"index":{"type":"integer","description":"The index of the choice in the list of choices.","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","description":"A chat completion message generated by the model.","properties":{"content":{"oneOf":[{"type":"string","description":"The contents of the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"refusal":{"oneOf":[{"type":"string","description":"The refusal message generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.0","typeLabel":"string"},{"type":"null","description":"The refusal message generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.refusal","typeLabel":"string | null"},"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message.","x-stainless-const":true,"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"tool_calls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"oneOf":[{"type":"object","title":"Function tool call","description":"A call to a function tool created by the model.\n","required":["id","type","function"],"x-stainless-naming":{"python":{"model_name":"chat_completion_message_tool_call_union","param_model_name":"chat_completion_message_tool_call_union_param"}},"x-stainless-go-variant-constructor":"skip","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0.id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","x-stainless-const":true,"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0.function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0.function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0.function","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.0","typeLabel":"Function tool call · object"},{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","required":["id","type","custom"],"x-stainless-naming":{"python":{"model_name":"chat_completion_message_tool_call_union","param_model_name":"chat_completion_message_tool_call_union_param"}},"x-stainless-go-variant-constructor":"skip","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1.id","typeLabel":"string"},"type":{"type":"string","enum":["custom"],"description":"The type of the tool. Always `custom`.","x-stainless-const":true,"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"custom":{"type":"object","description":"The custom tool that the model called.","properties":{"name":{"type":"string","description":"The name of the custom tool to call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1.custom.name","typeLabel":"string"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1.custom.input","typeLabel":"string"}},"required":["name","input"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1.custom","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].oneOf.1","typeLabel":"Custom tool call · object"}],"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"Function tool call · object | Custom tool call · object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"(Function tool call · object | Custom tool call · object)[]"},"annotations":{"type":"array","description":"Annotations for the message, when applicable, as when using the\nweb search tool.\n","items":{"type":"object","description":"A URL citation when using web search.\n","required":["type","url_citation"],"properties":{"type":{"type":"string","description":"The type of the URL citation. Always `url_citation`.","enum":["url_citation"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"url_citation":{"type":"object","description":"A URL citation when using web search.","required":["end_index","start_index","url","title"],"properties":{"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].url_citation.end_index","typeLabel":"integer"},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].url_citation.start_index","typeLabel":"integer"},"url":{"type":"string","description":"The URL of the web resource.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].url_citation.url","typeLabel":"string"},"title":{"type":"string","description":"The title of the web resource.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].url_citation.title","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX].url_citation","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.annotations","typeLabel":"object[]"},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.function_call.arguments","typeLabel":"string"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.function_call.name","typeLabel":"string"}},"required":["name","arguments"],"uniqueKey":"choices.items.[INDEX].message.function_call","typeLabel":"object"},"audio":{"oneOf":[{"type":"object","description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. \n","required":["id","expires_at","data","transcript"],"properties":{"id":{"type":"string","description":"Unique identifier for this audio response.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.0.id","typeLabel":"string"},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.\n","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.0.expires_at","typeLabel":"integer"},"data":{"type":"string","description":"Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.0.data","typeLabel":"string"},"transcript":{"type":"string","description":"Transcript of the audio generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.0.transcript","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.0","typeLabel":"object"},{"type":"null","description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. \n","required":["id","expires_at","data","transcript"],"properties":{"id":{"type":"string","description":"Unique identifier for this audio response."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.\n"},"data":{"type":"string","description":"Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n"},"transcript":{"type":"string","description":"Transcript of the audio generated by the model."}},"uniqueKey":"choices.items.[INDEX].message.audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.audio","typeLabel":"object | null"}},"required":["role","content","refusal"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"logprobs":{"oneOf":[{"description":"Log probability information for the choice.","type":"object","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"object[]"},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"object[] | null"},"refusal":{"oneOf":[{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0","typeLabel":"object[]"},{"description":"A list of message refusal tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal","typeLabel":"object[] | null"}},"required":["content","refusal"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"description":"Log probability information for the choice.","type":"null","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}]},"refusal":{"oneOf":[{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},{"description":"A list of message refusal tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}]}},"required":["content","refusal"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model used for the chat completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","description":"The object type, which is always `chat.completion`.","enum":["chat.completion"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"service_tier":{"oneOf":[{"type":"string","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"enum\u003cstring> | null"},"system_fingerprint":{"type":"string","deprecated":true,"description":"This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n","uniqueKey":"system_fingerprint","typeLabel":"string"},"usage":{"type":"object","description":"Usage statistics for the completion request.","properties":{"completion_tokens":{"type":"integer","default":0,"description":"Number of tokens in the generated completion.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","default":0,"description":"Number of tokens in the prompt.","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","default":0,"description":"Total number of tokens used in the request (prompt + completion).","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"completion_tokens_details":{"type":"object","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n","uniqueKey":"usage.completion_tokens_details.accepted_prediction_tokens","typeLabel":"integer"},"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens generated by the model.","uniqueKey":"usage.completion_tokens_details.audio_tokens","typeLabel":"integer"},"reasoning_tokens":{"type":"integer","default":0,"description":"Tokens generated by the model for reasoning.","uniqueKey":"usage.completion_tokens_details.reasoning_tokens","typeLabel":"integer"},"rejected_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n","uniqueKey":"usage.completion_tokens_details.rejected_prediction_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details","typeLabel":"object"},"prompt_tokens_details":{"type":"object","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens present in the prompt.","uniqueKey":"usage.prompt_tokens_details.audio_tokens","typeLabel":"integer"},"cached_tokens":{"type":"integer","default":0,"description":"Cached tokens present in the prompt.","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"uniqueKey":"usage","typeLabel":"object"}},"required":["choices","created","id","model","object"],"x-oaiMeta":{"name":"The chat completion object","group":"chat","example":"{\n \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n \"object\": \"chat.completion\",\n \"created\": 1741570283,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1117,\n \"completion_tokens\": 46,\n \"total_tokens\": 1163,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_fc9f1d7035\"\n}\n"},"uniqueKey":"","typeLabel":"object"},"example":{"id":"chatcmpl-fJ5wOo5nqnWz2Z9jkF4NK","object":"chat.completion","created":1715392980,"model":"qwen3-max","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How are you?","refusal":null,"annotations":[]},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":10,"completion_tokens":10,"total_tokens":20,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"cached_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}},"examples":{"Example":{"title":"Example","value":{"id":"chatcmpl-fJ5wOo5nqnWz2Z9jkF4NK","object":"chat.completion","created":1715392980,"model":"qwen3-max","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How are you?","refusal":null,"annotations":[]},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":10,"completion_tokens":10,"total_tokens":20,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"cached_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"object","description":"Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion. Each chunk has the same ID.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"choices":{"type":"array","description":"A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.\n","items":{"type":"object","required":["delta","finish_reason","index"],"properties":{"delta":{"type":"object","description":"A chat completion delta generated by streamed model responses.","properties":{"content":{"oneOf":[{"type":"string","description":"The contents of the chunk message.","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the chunk message.","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.content","typeLabel":"string | null"},"function_call":{"deprecated":true,"type":"object","description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","uniqueKey":"choices.items.[INDEX].delta.function_call.arguments","typeLabel":"string"},"name":{"type":"string","description":"The name of the function to call.","uniqueKey":"choices.items.[INDEX].delta.function_call.name","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].delta.function_call","typeLabel":"object"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].index","typeLabel":"integer"},"id":{"type":"string","description":"The ID of the tool call.","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","x-stainless-const":true,"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call.","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["index"],"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].delta.tool_calls","typeLabel":"object[]"},"role":{"type":"string","enum":["developer","system","user","assistant","tool"],"description":"The role of the author of this message.","uniqueKey":"choices.items.[INDEX].delta.role","typeLabel":"enum\u003cstring>"},"refusal":{"oneOf":[{"type":"string","description":"The refusal message generated by the model.","uniqueKey":"choices.items.[INDEX].delta.refusal.oneOf.0","typeLabel":"string"},{"type":"null","description":"The refusal message generated by the model.","uniqueKey":"choices.items.[INDEX].delta.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.refusal","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"},"index":{"type":"integer","description":"The index of the choice in the list of choices.","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"logprobs":{"oneOf":[{"description":"Log probability information for the choice.","type":"object","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"object[]"},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"object[] | null"},"refusal":{"oneOf":[{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0","typeLabel":"object[]"},{"description":"A list of message refusal tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal","typeLabel":"object[] | null"}},"required":["content","refusal"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"description":"Log probability information for the choice.","type":"null","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}]},"refusal":{"oneOf":[{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},{"description":"A list of message refusal tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}]}},"required":["content","refusal"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model to generate the completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","description":"The object type, which is always `chat.completion.chunk`.","enum":["chat.completion.chunk"],"x-stainless-const":true,"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"service_tier":{"oneOf":[{"type":"string","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"enum\u003cstring> | null"},"system_fingerprint":{"type":"string","deprecated":true,"description":"This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n","uniqueKey":"system_fingerprint","typeLabel":"string"},"usage":{"oneOf":[{"type":"object","description":"An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n","properties":{"completion_tokens":{"type":"integer","default":0,"description":"Number of tokens in the generated completion.","isRequired":true,"uniqueKey":"usage.oneOf.0.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","default":0,"description":"Number of tokens in the prompt.","isRequired":true,"uniqueKey":"usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","default":0,"description":"Total number of tokens used in the request (prompt + completion).","isRequired":true,"uniqueKey":"usage.oneOf.0.total_tokens","typeLabel":"integer"},"completion_tokens_details":{"type":"object","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n","uniqueKey":"usage.oneOf.0.completion_tokens_details.accepted_prediction_tokens","typeLabel":"integer"},"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens generated by the model.","uniqueKey":"usage.oneOf.0.completion_tokens_details.audio_tokens","typeLabel":"integer"},"reasoning_tokens":{"type":"integer","default":0,"description":"Tokens generated by the model for reasoning.","uniqueKey":"usage.oneOf.0.completion_tokens_details.reasoning_tokens","typeLabel":"integer"},"rejected_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n","uniqueKey":"usage.oneOf.0.completion_tokens_details.rejected_prediction_tokens","typeLabel":"integer"}},"uniqueKey":"usage.oneOf.0.completion_tokens_details","typeLabel":"object"},"prompt_tokens_details":{"type":"object","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens present in the prompt.","uniqueKey":"usage.oneOf.0.prompt_tokens_details.audio_tokens","typeLabel":"integer"},"cached_tokens":{"type":"integer","default":0,"description":"Cached tokens present in the prompt.","uniqueKey":"usage.oneOf.0.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.oneOf.0.prompt_tokens_details","typeLabel":"object"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"uniqueKey":"usage.oneOf.0","typeLabel":"object"},{"type":"null","description":"An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n","properties":{"completion_tokens":{"type":"integer","default":0,"description":"Number of tokens in the generated completion."},"prompt_tokens":{"type":"integer","default":0,"description":"Number of tokens in the prompt."},"total_tokens":{"type":"integer","default":0,"description":"Total number of tokens used in the request (prompt + completion)."},"completion_tokens_details":{"type":"object","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n"},"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens generated by the model."},"reasoning_tokens":{"type":"integer","default":0,"description":"Tokens generated by the model for reasoning."},"rejected_prediction_tokens":{"type":"integer","default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n"}}},"prompt_tokens_details":{"type":"object","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"type":"integer","default":0,"description":"Audio input tokens present in the prompt."},"cached_tokens":{"type":"integer","default":0,"description":"Cached tokens present in the prompt."}}}},"required":["prompt_tokens","completion_tokens","total_tokens"],"uniqueKey":"usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage","typeLabel":"object | null"}},"required":["choices","created","id","model","object"],"x-oaiMeta":{"name":"The chat completion chunk object","group":"chat","example":"{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","choices":[{"delta":{"content":"\u003cstring>","function_call":{"arguments":"\u003cstring>","name":"\u003cstring>"},"tool_calls":[{"index":123,"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}],"role":"developer","refusal":"\u003cstring>"},"finish_reason":"stop","index":123,"logprobs":{"content":[{"token":"\u003cstring>","logprob":123,"bytes":[123],"top_logprobs":[{"token":"\u003cstring>","logprob":123,"bytes":[123]}]}],"refusal":[{"token":"\u003cstring>","logprob":123,"bytes":[123],"top_logprobs":[{"token":"\u003cstring>","logprob":123,"bytes":[123]}]}]}}],"created":123,"model":"\u003cstring>","object":"chat.completion.chunk","service_tier":"auto","system_fingerprint":"\u003cstring>","usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0}}}}},"exampleType":"generated"}},"exampleType":"examples"}},"security":{"18763e08-9d4e-4750-a445-9179b4afcbd7":{"bearerAuth":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"6de9fd0a-4837-4b4a-ba8c-533051f7f2c6":{"url":"https://api.mulerouter.ai/"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/endpoint/openai/openai.yaml"},"subdomain":"mulerouter","siteName":"MuleRouter Docs","title":"MuleRouter Documentation - AI API Gateway \u0026 Routing Platform","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-23T07:46:02.015Z","originalFileLocation":"api-reference/endpoint/openai/chat.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a new chat completion for the given model and prompt.\">\u003cmeta data-mint-head name=\"keywords\" content=\"MuleRouter, AI API, API gateway, LLM, OpenAI, image generation, video generation, Qwen, Wan 2, Midjourney, AI integration, API documentation\">\u003cmeta data-mint-head name=\"application-name\" content=\"MuleRouter Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_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=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"MuleRouter Documentation - AI API Gateway \u0026amp; Routing Platform\">\u003cmeta data-mint-head property=\"og:description\" content=\"Complete API documentation for MuleRouter AI platform. Learn to integrate LLM, image generation, and video generation APIs including OpenAI, Qwen, Wan 2, Midjourney, and more.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MuleRouter Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://www.mulerouter.ai/logo/logo-black.png\">\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=\"MuleRouter Documentation - AI API Gateway \u0026amp; Routing Platform\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Complete API documentation for MuleRouter AI platform. Learn to integrate LLM, image generation, and video generation APIs including OpenAI, Qwen, Wan 2, Midjourney, and more.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://www.mulerouter.ai/logo/logo-black.png\">\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=\"/docs/mintlify-assets/_mintlify/favicons/mulerouter/vbgd1_NbBwUfmOI3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MuleRouter Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#594BF6\">\u003cmeta data-mint-head name=\"author\" content=\"MuleRouter\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/openai/chat.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.mulerouter.ai/#organization\",\"name\":\"MuleRouter Docs\",\"url\":\"https://www.mulerouter.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mulerouter/w_eptSTc-1yZxAo4/logo/logo-black.png?fit=max\u0026auto=format\u0026n=w_eptSTc-1yZxAo4\u0026q=85\u0026s=999db716e829193466c7e1f5634e0cd6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.mulerouter.ai/docs#website\",\"name\":\"MuleRouter Docs\",\"url\":\"https://www.mulerouter.ai/docs\",\"publisher\":{\"@id\":\"https://www.mulerouter.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat#webpage\",\"url\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat\",\"name\":\"Create Chat Completion\",\"description\":\"Creates a new chat completion for the given model and prompt.\",\"dateModified\":\"2026-01-23T07:46:02.015Z\",\"isPartOf\":{\"@id\":\"https://www.mulerouter.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"MuleRouter Docs\",\"item\":\"https://www.mulerouter.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Chat Completion\",\"item\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat#apireference\",\"headline\":\"Create Chat Completion\",\"name\":\"Create Chat Completion\",\"description\":\"Creates a new chat completion for the given model and prompt.\",\"url\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat\",\"mainEntityOfPage\":{\"@id\":\"https://www.mulerouter.ai/docs/api-reference/endpoint/openai/chat#webpage\"},\"image\":\"https://www.mulerouter.ai/logo/logo-black.png\",\"dateModified\":\"2026-01-23T07:46:02.015Z\",\"publisher\":{\"@id\":\"https://www.mulerouter.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://www.mulerouter.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MuleRouter Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MuleRouter Docs","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/pdRwFDsc9z"}]},"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":"/get-started/welcome"}]},{"tab":"API Reference","groups":[{"group":"Reference","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Account","pages":[{"title":"Get account balance","description":"Read the authenticated account balance","openapi":"api-reference/endpoint/user/billing/balance.yaml GET /user/billing/balance","href":"/api-reference/endpoint/user/billing/balance"}]},{"group":"LLM","pages":[{"group":"OpenAI Format","pages":[{"title":"Create Chat Completion","openapi":"api-reference/endpoint/openai/openai.yaml POST /vendors/openai/v1/chat/completions","href":"/api-reference/endpoint/openai/chat"},{"title":"Supported Models","description":null,"href":"/api-reference/endpoint/openai/models"}]}]},{"group":"Image Generation","pages":[{"group":"Wan 2","pages":[{"group":"Wan 2.6 Text-To-Image","pages":[{"title":"Wan 2.6 Text-To-Image Generation","openapi":"api-reference/endpoint/alibaba/wan2.6-t2i/wan2.6-t2i.yaml POST /vendors/alibaba/v1/wan2.6-t2i/generation","href":"/api-reference/endpoint/alibaba/wan2.6-t2i/generation"},{"title":"Wan 2.6 Text-To-Image Task","openapi":"api-reference/endpoint/alibaba/wan2.6-t2i/wan2.6-t2i.yaml GET /vendors/alibaba/v1/wan2.6-t2i/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-t2i/generation-task"},{"title":"Delete Wan 2.6 Text-To-Image Task","openapi":"api-reference/endpoint/alibaba/wan2.6-t2i/wan2.6-t2i.yaml DELETE /vendors/alibaba/v1/wan2.6-t2i/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-t2i/delete-task"}]},{"group":"Wan 2.6 Image-To-Image","pages":[{"title":"Wan 2.6 Image-To-Image Generation","openapi":"api-reference/endpoint/alibaba/wan2.6-image/wan2.6-image.yaml POST /vendors/alibaba/v1/wan2.6-image/generation","href":"/api-reference/endpoint/alibaba/wan2.6-image/generation"},{"title":"Wan 2.6 Image-To-Image Task","openapi":"api-reference/endpoint/alibaba/wan2.6-image/wan2.6-image.yaml GET /vendors/alibaba/v1/wan2.6-image/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-image/generation-task"},{"title":"Delete Wan 2.6 Image-To-Image Task","openapi":"api-reference/endpoint/alibaba/wan2.6-image/wan2.6-image.yaml DELETE /vendors/alibaba/v1/wan2.6-image/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-image/delete-task"}]},{"group":"Wan 2.5 Text-To-Image Preview","pages":[{"title":"Wan 2.5 Text-To-Image Preview Generation","openapi":"api-reference/endpoint/alibaba/wan2.5-t2i-preview/wan2.5-t2i-preview.yaml POST /vendors/alibaba/v1/wan2.5-t2i-preview/generation","href":"/api-reference/endpoint/alibaba/wan2.5-t2i-preview/generation"},{"title":"Wan 2.5 Text-To-Image Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-t2i-preview/wan2.5-t2i-preview.yaml GET /vendors/alibaba/v1/wan2.5-t2i-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-t2i-preview/generation-task"},{"title":"Delete Wan 2.5 Text-To-Image Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-t2i-preview/wan2.5-t2i-preview.yaml DELETE /vendors/alibaba/v1/wan2.5-t2i-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-t2i-preview/delete-task"}]},{"group":"Wan 2.5 Image-To-Image Preview","pages":[{"title":"Wan 2.5 Image-To-Image Preview Generation","openapi":"api-reference/endpoint/alibaba/wan2.5-i2i-preview/wan2.5-i2i-preview.yaml POST /vendors/alibaba/v1/wan2.5-i2i-preview/generation","href":"/api-reference/endpoint/alibaba/wan2.5-i2i-preview/generation"},{"title":"Wan 2.5 Image-To-Image Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-i2i-preview/wan2.5-i2i-preview.yaml GET /vendors/alibaba/v1/wan2.5-i2i-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-i2i-preview/generation-task"},{"title":"Delete Wan 2.5 Image-To-Image Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-i2i-preview/wan2.5-i2i-preview.yaml DELETE /vendors/alibaba/v1/wan2.5-i2i-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-i2i-preview/delete-task"}]}]},{"group":"Qwen Image Max","pages":[{"title":"Qwen Image Max Generation","openapi":"api-reference/endpoint/alibaba/qwen-image-max/qwen-image-max.yaml POST /vendors/alibaba/v1/qwen-image-max/generation","href":"/api-reference/endpoint/alibaba/qwen-image-max/generation"},{"title":"Qwen Image Max Task","openapi":"api-reference/endpoint/alibaba/qwen-image-max/qwen-image-max.yaml GET /vendors/alibaba/v1/qwen-image-max/generation/{task_id}","href":"/api-reference/endpoint/alibaba/qwen-image-max/generation-task"},{"title":"Delete Qwen Image Max Task","openapi":"api-reference/endpoint/alibaba/qwen-image-max/qwen-image-max.yaml DELETE /vendors/alibaba/v1/qwen-image-max/generation/{task_id}","href":"/api-reference/endpoint/alibaba/qwen-image-max/delete-task"}]},{"group":"Qwen Image Edit Max","pages":[{"title":"Qwen Image Edit Max Generation","openapi":"api-reference/endpoint/alibaba/qwen-image-edit-max/qwen-image-edit-max.yaml POST /vendors/alibaba/v1/qwen-image-edit-max/generation","href":"/api-reference/endpoint/alibaba/qwen-image-edit-max/generation"},{"title":"Qwen Image Edit Max Task","openapi":"api-reference/endpoint/alibaba/qwen-image-edit-max/qwen-image-edit-max.yaml GET /vendors/alibaba/v1/qwen-image-edit-max/generation/{task_id}","href":"/api-reference/endpoint/alibaba/qwen-image-edit-max/generation-task"},{"title":"Delete Qwen Image Edit Max Task","openapi":"api-reference/endpoint/alibaba/qwen-image-edit-max/qwen-image-edit-max.yaml DELETE /vendors/alibaba/v1/qwen-image-edit-max/generation/{task_id}","href":"/api-reference/endpoint/alibaba/qwen-image-edit-max/delete-task"}]},{"group":"Nano Banana Pro","pages":[{"title":"🍌 Nano Banana Pro Image Generation","openapi":"api-reference/endpoint/google/nano-banana-pro/openapi.yaml POST /vendors/google/v1/nano-banana-pro/generation","href":"/api-reference/endpoint/google/nano-banana-pro/generation"},{"title":"🍌 Nano Banana Pro Generation Task","openapi":"api-reference/endpoint/google/nano-banana-pro/openapi.yaml GET /vendors/google/v1/nano-banana-pro/generation/{task_id}","href":"/api-reference/endpoint/google/nano-banana-pro/generation-task"},{"title":"Delete Nano Banana Pro Generation Task","openapi":"api-reference/endpoint/google/nano-banana-pro/openapi.yaml DELETE /vendors/google/v1/nano-banana-pro/generation/{task_id}","href":"/api-reference/endpoint/google/nano-banana-pro/delete-task"},{"title":"🍌 Nano Banana Pro Image Edit","openapi":"api-reference/endpoint/google/nano-banana-pro/openapi.yaml POST /vendors/google/v1/nano-banana-pro/edit","href":"/api-reference/endpoint/google/nano-banana-pro/edit"},{"title":"🍌 Nano Banana Pro Edit Task","openapi":"api-reference/endpoint/google/nano-banana-pro/openapi.yaml GET /vendors/google/v1/nano-banana-pro/edit/{task_id}","href":"/api-reference/endpoint/google/nano-banana-pro/edit-task"}]},{"group":"Nano Banana 2","pages":[{"title":"🍌 Nano Banana 2 Image Generation","openapi":"api-reference/endpoint/google/nano-banana-2/openapi.yaml POST /vendors/google/v1/nano-banana-2/generation","href":"/api-reference/endpoint/google/nano-banana-2/generation"},{"title":"🍌 Nano Banana 2 Generation Task","openapi":"api-reference/endpoint/google/nano-banana-2/openapi.yaml GET /vendors/google/v1/nano-banana-2/generation/{task_id}","href":"/api-reference/endpoint/google/nano-banana-2/generation-task"},{"title":"Delete Nano Banana 2 Generation Task","openapi":"api-reference/endpoint/google/nano-banana-2/openapi.yaml DELETE /vendors/google/v1/nano-banana-2/generation/{task_id}","href":"/api-reference/endpoint/google/nano-banana-2/delete-task"},{"title":"🍌 Nano Banana 2 Image Edit","openapi":"api-reference/endpoint/google/nano-banana-2/openapi.yaml POST /vendors/google/v1/nano-banana-2/edit","href":"/api-reference/endpoint/google/nano-banana-2/edit"},{"title":"🍌 Nano Banana 2 Edit Task","openapi":"api-reference/endpoint/google/nano-banana-2/openapi.yaml GET /vendors/google/v1/nano-banana-2/edit/{task_id}","href":"/api-reference/endpoint/google/nano-banana-2/edit-task"}]},{"group":"Midjourney","pages":[{"title":"Diffusion","openapi":"api-reference/endpoint/midjourney/midjourney.yaml POST /vendors/midjourney/v1/tob/diffusion","href":"/api-reference/endpoint/midjourney/diffusion"},{"title":"Diffusion","openapi":"api-reference/endpoint/midjourney/midjourney.yaml GET /vendors/midjourney/v1/tob/diffusion/{task_id}","href":"/api-reference/endpoint/midjourney/diffuison-task"}]},{"group":"GPT Image 2","pages":[{"title":"GPT Image 2 Image Generation","openapi":"api-reference/endpoint/openai/gpt-image-2/openapi.yaml POST /vendors/openai/v1/gpt-image-2/generation","href":"/api-reference/endpoint/openai/gpt-image-2/generation"},{"title":"GPT Image 2 Generation Task","openapi":"api-reference/endpoint/openai/gpt-image-2/openapi.yaml GET /vendors/openai/v1/gpt-image-2/generation/{task_id}","href":"/api-reference/endpoint/openai/gpt-image-2/generation-task"},{"title":"Delete GPT Image 2 Generation Task","openapi":"api-reference/endpoint/openai/gpt-image-2/openapi.yaml DELETE /vendors/openai/v1/gpt-image-2/generation/{task_id}","href":"/api-reference/endpoint/openai/gpt-image-2/delete-task"},{"title":"GPT Image 2 Image Edit","openapi":"api-reference/endpoint/openai/gpt-image-2/openapi.yaml POST /vendors/openai/v1/gpt-image-2/edit","href":"/api-reference/endpoint/openai/gpt-image-2/edit"},{"title":"GPT Image 2 Edit Task","openapi":"api-reference/endpoint/openai/gpt-image-2/openapi.yaml GET /vendors/openai/v1/gpt-image-2/edit/{task_id}","href":"/api-reference/endpoint/openai/gpt-image-2/edit-task"}]}]},{"group":"Video Generation","pages":[{"group":"Wan 3","pages":[{"group":"Wan 3.0","pages":[{"title":"Alibaba W3.0 Video Generation","openapi":"api-reference/endpoint/alibaba/w3.0-video/w3.0-video.yaml POST /vendors/alibaba/v1/w3.0-video/generation","href":"/api-reference/endpoint/alibaba/w3.0-video/generation"},{"title":"Alibaba W3.0 Video Generation Task","openapi":"api-reference/endpoint/alibaba/w3.0-video/w3.0-video.yaml GET /vendors/alibaba/v1/w3.0-video/generation/{task_id}","href":"/api-reference/endpoint/alibaba/w3.0-video/generation-task"},{"title":"Delete Alibaba W3.0 Video Generation Task","openapi":"api-reference/endpoint/alibaba/w3.0-video/w3.0-video.yaml DELETE /vendors/alibaba/v1/w3.0-video/generation/{task_id}","href":"/api-reference/endpoint/alibaba/w3.0-video/delete-task"}]},{"group":"Wan 3.0 Prime","pages":[{"title":"Alibaba W3.0-Prime Video Generation","openapi":"api-reference/endpoint/alibaba/w3.0-video-prime/w3.0-video-prime.yaml POST /vendors/alibaba/v1/w3.0-video-prime/generation","href":"/api-reference/endpoint/alibaba/w3.0-video-prime/generation"},{"title":"Alibaba W3.0-Prime Video Generation Task","openapi":"api-reference/endpoint/alibaba/w3.0-video-prime/w3.0-video-prime.yaml GET /vendors/alibaba/v1/w3.0-video-prime/generation/{task_id}","href":"/api-reference/endpoint/alibaba/w3.0-video-prime/generation-task"},{"title":"Delete Alibaba W3.0-Prime Video Generation Task","openapi":"api-reference/endpoint/alibaba/w3.0-video-prime/w3.0-video-prime.yaml DELETE /vendors/alibaba/v1/w3.0-video-prime/generation/{task_id}","href":"/api-reference/endpoint/alibaba/w3.0-video-prime/delete-task"}]}]},{"group":"Wan 2","pages":[{"group":"Wan 2.6 Text-To-Video","pages":[{"title":"Wan 2.6 Text-To-Video Generation","openapi":"api-reference/endpoint/alibaba/wan2.6-t2v/wan2.6-t2v.yaml POST /vendors/alibaba/v1/wan2.6-t2v/generation","href":"/api-reference/endpoint/alibaba/wan2.6-t2v/generation"},{"title":"Wan 2.6 Text-To-Video Task","openapi":"api-reference/endpoint/alibaba/wan2.6-t2v/wan2.6-t2v.yaml GET /vendors/alibaba/v1/wan2.6-t2v/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-t2v/generation-task"},{"title":"Delete Wan 2.6 Text-To-Video Task","openapi":"api-reference/endpoint/alibaba/wan2.6-t2v/wan2.6-t2v.yaml DELETE /vendors/alibaba/v1/wan2.6-t2v/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-t2v/delete-task"}]},{"group":"Wan 2.6 Image-To-Video","pages":[{"title":"Wan 2.6 Image-To-Video Generation","openapi":"api-reference/endpoint/alibaba/wan2.6-i2v/wan2.6-i2v.yaml POST /vendors/alibaba/v1/wan2.6-i2v/generation","href":"/api-reference/endpoint/alibaba/wan2.6-i2v/generation"},{"title":"Wan 2.6 Image-To-Video Task","openapi":"api-reference/endpoint/alibaba/wan2.6-i2v/wan2.6-i2v.yaml GET /vendors/alibaba/v1/wan2.6-i2v/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-i2v/generation-task"},{"title":"Delete Wan 2.6 Image-To-Video Task","openapi":"api-reference/endpoint/alibaba/wan2.6-i2v/wan2.6-i2v.yaml DELETE /vendors/alibaba/v1/wan2.6-i2v/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.6-i2v/delete-task"}]},{"group":"Wan 2.5 Text-To-Video Preview","pages":[{"title":"Wan 2.5 Text-To-Video Preview Generation","openapi":"api-reference/endpoint/alibaba/wan2.5-t2v-preview/wan2.5-t2v-preview.yaml POST /vendors/alibaba/v1/wan2.5-t2v-preview/generation","href":"/api-reference/endpoint/alibaba/wan2.5-t2v-preview/generation"},{"title":"Wan 2.5 Text-To-Video Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-t2v-preview/wan2.5-t2v-preview.yaml GET /vendors/alibaba/v1/wan2.5-t2v-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-t2v-preview/generation-task"},{"title":"Delete Wan 2.5 Text-To-Video Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-t2v-preview/wan2.5-t2v-preview.yaml DELETE /vendors/alibaba/v1/wan2.5-t2v-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-t2v-preview/delete-task"}]},{"group":"Wan 2.5 Image-To-Video Preview","pages":[{"title":"Wan 2.5 Image-To-Video Preview Generation","openapi":"api-reference/endpoint/alibaba/wan2.5-i2v-preview/wan2.5-i2v-preview.yaml POST /vendors/alibaba/v1/wan2.5-i2v-preview/generation","href":"/api-reference/endpoint/alibaba/wan2.5-i2v-preview/generation"},{"title":"Wan 2.5 Image-To-Video Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-i2v-preview/wan2.5-i2v-preview.yaml GET /vendors/alibaba/v1/wan2.5-i2v-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-i2v-preview/generation-task"},{"title":"Delete Wan 2.5 Image-To-Video Preview Task","openapi":"api-reference/endpoint/alibaba/wan2.5-i2v-preview/wan2.5-i2v-preview.yaml DELETE /vendors/alibaba/v1/wan2.5-i2v-preview/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.5-i2v-preview/delete-task"}]},{"group":"Wan 2.2 Text-To-Video Plus","pages":[{"title":"Wan 2.2 Text-To-Video Plus Generation","openapi":"api-reference/endpoint/alibaba/wan2.2-t2v-plus/wan2.2-t2v-plus.yaml POST /vendors/alibaba/v1/wan2.2-t2v-plus/generation","href":"/api-reference/endpoint/alibaba/wan2.2-t2v-plus/generation"},{"title":"Wan 2.2 Text-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.2-t2v-plus/wan2.2-t2v-plus.yaml GET /vendors/alibaba/v1/wan2.2-t2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-t2v-plus/generation-task"},{"title":"Delete Wan 2.2 Text-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.2-t2v-plus/wan2.2-t2v-plus.yaml DELETE /vendors/alibaba/v1/wan2.2-t2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-t2v-plus/delete-task"}]},{"group":"Wan 2.2 Image-To-Video Plus","pages":[{"title":"Wan 2.2 Image-To-Video Plus Generation","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-plus/wan2.2-i2v-plus.yaml POST /vendors/alibaba/v1/wan2.2-i2v-plus/generation","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-plus/generation"},{"title":"Wan 2.2 Image-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-plus/wan2.2-i2v-plus.yaml GET /vendors/alibaba/v1/wan2.2-i2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-plus/generation-task"},{"title":"Delete Wan 2.2 Image-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-plus/wan2.2-i2v-plus.yaml DELETE /vendors/alibaba/v1/wan2.2-i2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-plus/delete-task"}]},{"group":"Wan 2.2 Image-To-Video Flash","pages":[{"title":"Wan 2.2 Image-To-Video Flash Generation","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-flash/wan2.2-i2v-flash.yaml POST /vendors/alibaba/v1/wan2.2-i2v-flash/generation","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-flash/generation"},{"title":"Wan 2.2 Image-To-Video Flash Task","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-flash/wan2.2-i2v-flash.yaml GET /vendors/alibaba/v1/wan2.2-i2v-flash/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-flash/generation-task"},{"title":"Delete Wan 2.2 Image-To-Video Flash Task","openapi":"api-reference/endpoint/alibaba/wan2.2-i2v-flash/wan2.2-i2v-flash.yaml DELETE /vendors/alibaba/v1/wan2.2-i2v-flash/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.2-i2v-flash/delete-task"}]},{"group":"Wan 2.1 Keyframe-To-Video Plus","pages":[{"title":"Wan 2.1 Keyframe-To-Video Plus Generation","openapi":"api-reference/endpoint/alibaba/wan2.1-kf2v-plus/wan2.1-kf2v-plus.yaml POST /vendors/alibaba/v1/wan2.1-kf2v-plus/generation","href":"/api-reference/endpoint/alibaba/wan2.1-kf2v-plus/generation"},{"title":"Wan 2.1 Keyframe-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.1-kf2v-plus/wan2.1-kf2v-plus.yaml GET /vendors/alibaba/v1/wan2.1-kf2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.1-kf2v-plus/generation-task"},{"title":"Delete Wan 2.1 Keyframe-To-Video Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.1-kf2v-plus/wan2.1-kf2v-plus.yaml DELETE /vendors/alibaba/v1/wan2.1-kf2v-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.1-kf2v-plus/delete-task"}]},{"group":"Wan 2.1 Video Ace Plus","pages":[{"title":"Wan 2.1 Video Ace Plus Generation","openapi":"api-reference/endpoint/alibaba/wan2.1-vace-plus/wan2.1-vace-plus.yaml POST /vendors/alibaba/v1/wan2.1-vace-plus/generation","href":"/api-reference/endpoint/alibaba/wan2.1-vace-plus/generation"},{"title":"Wan 2.1 Video Ace Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.1-vace-plus/wan2.1-vace-plus.yaml GET /vendors/alibaba/v1/wan2.1-vace-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.1-vace-plus/generation-task"},{"title":"Delete Wan 2.1 Video Ace Plus Task","openapi":"api-reference/endpoint/alibaba/wan2.1-vace-plus/wan2.1-vace-plus.yaml DELETE /vendors/alibaba/v1/wan2.1-vace-plus/generation/{task_id}","href":"/api-reference/endpoint/alibaba/wan2.1-vace-plus/delete-task"}]}]},{"group":"Wan 2 Spark","pages":[{"group":"Wan 2.6 Text-To-Video Spark","pages":[{"title":"Wan 2.6 Text-To-Video Spark Generation","openapi":"api-reference/endpoint/mulerouter/wan2.6-t2v-spark/wan2.6-t2v-spark.yaml POST /vendors/mulerouter/v1/wan2.6-t2v-spark/generation","href":"/api-reference/endpoint/mulerouter/wan2.6-t2v-spark/generation"},{"title":"Wan 2.6 Text-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.6-t2v-spark/wan2.6-t2v-spark.yaml GET /vendors/mulerouter/v1/wan2.6-t2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.6-t2v-spark/generation-task"},{"title":"Delete Wan 2.6 Text-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.6-t2v-spark/wan2.6-t2v-spark.yaml DELETE /vendors/mulerouter/v1/wan2.6-t2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.6-t2v-spark/delete-task"}]},{"group":"Wan 2.6 Image-To-Video Spark","pages":[{"title":"Wan 2.6 Image-To-Video Spark Generation","openapi":"api-reference/endpoint/mulerouter/wan2.6-i2v-spark/wan2.6-i2v-spark.yaml POST /vendors/mulerouter/v1/wan2.6-i2v-spark/generation","href":"/api-reference/endpoint/mulerouter/wan2.6-i2v-spark/generation"},{"title":"Wan 2.6 Image-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.6-i2v-spark/wan2.6-i2v-spark.yaml GET /vendors/mulerouter/v1/wan2.6-i2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.6-i2v-spark/generation-task"},{"title":"Delete Wan 2.6 Image-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.6-i2v-spark/wan2.6-i2v-spark.yaml DELETE /vendors/mulerouter/v1/wan2.6-i2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.6-i2v-spark/delete-task"}]},{"group":"Wan 2.5 Text-To-Video Spark","pages":[{"title":"Wan 2.5 Text-To-Video Spark Generation","openapi":"api-reference/endpoint/mulerouter/wan2.5-t2v-spark/wan2.5-t2v-spark.yaml POST /vendors/mulerouter/v1/wan2.5-t2v-spark/generation","href":"/api-reference/endpoint/mulerouter/wan2.5-t2v-spark/generation"},{"title":"Wan 2.5 Text-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.5-t2v-spark/wan2.5-t2v-spark.yaml GET /vendors/mulerouter/v1/wan2.5-t2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.5-t2v-spark/generation-task"},{"title":"Delete Wan 2.5 Text-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.5-t2v-spark/wan2.5-t2v-spark.yaml DELETE /vendors/mulerouter/v1/wan2.5-t2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.5-t2v-spark/delete-task"}]},{"group":"Wan 2.5 Image-To-Video Spark","pages":[{"title":"Wan 2.5 Image-To-Video Spark Generation","openapi":"api-reference/endpoint/mulerouter/wan2.5-i2v-spark/wan2.5-i2v-spark.yaml POST /vendors/mulerouter/v1/wan2.5-i2v-spark/generation","href":"/api-reference/endpoint/mulerouter/wan2.5-i2v-spark/generation"},{"title":"Wan 2.5 Image-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.5-i2v-spark/wan2.5-i2v-spark.yaml GET /vendors/mulerouter/v1/wan2.5-i2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.5-i2v-spark/generation-task"},{"title":"Delete Wan 2.5 Image-To-Video Spark Task","openapi":"api-reference/endpoint/mulerouter/wan2.5-i2v-spark/wan2.5-i2v-spark.yaml DELETE /vendors/mulerouter/v1/wan2.5-i2v-spark/generation/{task_id}","href":"/api-reference/endpoint/mulerouter/wan2.5-i2v-spark/delete-task"}]}]},{"group":"Kling","pages":[{"group":"Kling V3 Omni Text-To-Video","pages":[{"title":"Kling V3 Omni Text to Video","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-text-to-video.yaml POST /vendors/klingai/v1/kling-v3-omni/text-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3-omni/text-to-video"},{"title":"Kling V3 Omni Text to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-text-to-video.yaml GET /vendors/klingai/v1/kling-v3-omni/text-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3-omni/text-to-video-task"}]},{"group":"Kling V3 Omni Image-To-Video","pages":[{"title":"Kling V3 Omni Image to Video","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-image-to-video.yaml POST /vendors/klingai/v1/kling-v3-omni/image-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3-omni/image-to-video"},{"title":"Kling V3 Omni Image to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-image-to-video.yaml GET /vendors/klingai/v1/kling-v3-omni/image-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3-omni/image-to-video-task"}]},{"group":"Kling V3 Omni Reference Image-To-Video","pages":[{"title":"Kling V3 Omni Reference Image to Video","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-reference-image-to-video.yaml POST /vendors/klingai/v1/kling-v3-omni/reference-image-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3-omni/reference-image-to-video"},{"title":"Kling V3 Omni Reference Image to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-reference-image-to-video.yaml GET /vendors/klingai/v1/kling-v3-omni/reference-image-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3-omni/reference-image-to-video-task"}]},{"group":"Kling V3 Omni Reference Video-To-Video","pages":[{"title":"Kling V3 Omni Reference Video to Video","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-reference-video-to-video.yaml POST /vendors/klingai/v1/kling-v3-omni/reference-video-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3-omni/reference-video-to-video"},{"title":"Kling V3 Omni Reference Video to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-reference-video-to-video.yaml GET /vendors/klingai/v1/kling-v3-omni/reference-video-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3-omni/reference-video-to-video-task"}]},{"group":"Kling V3 Omni Video-To-Video Edit","pages":[{"title":"Kling V3 Omni Video to Video Edit","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-video-to-video-edit.yaml POST /vendors/klingai/v1/kling-v3-omni/video-to-video/edit","href":"/api-reference/endpoint/klingai/kling-v3-omni/video-to-video-edit"},{"title":"Kling V3 Omni Video to Video Edit Task","openapi":"api-reference/endpoint/klingai/kling-v3-omni/kling-v3-omni-video-to-video-edit.yaml GET /vendors/klingai/v1/kling-v3-omni/video-to-video/edit/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3-omni/video-to-video-edit-task"}]},{"group":"Kling V3.0 Text-To-Video","pages":[{"title":"Kling V3.0 Text to Video","openapi":"api-reference/endpoint/klingai/kling-v3/openapi.yaml POST /vendors/klingai/v1/kling-v3/text-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3/text-to-video"},{"title":"Kling V3.0 Text to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3/openapi.yaml GET /vendors/klingai/v1/kling-v3/text-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3/text-to-video-task"}]},{"group":"Kling V3.0 Image-To-Video","pages":[{"title":"Kling V3.0 Image to Video","openapi":"api-reference/endpoint/klingai/kling-v3/openapi.yaml POST /vendors/klingai/v1/kling-v3/image-to-video/generation","href":"/api-reference/endpoint/klingai/kling-v3/image-to-video"},{"title":"Kling V3.0 Image to Video Task","openapi":"api-reference/endpoint/klingai/kling-v3/openapi.yaml GET /vendors/klingai/v1/kling-v3/image-to-video/generation/{task_id}","href":"/api-reference/endpoint/klingai/kling-v3/image-to-video-task"}]}]},{"group":"Midjourney","pages":[{"title":"Video Diffusion","openapi":"api-reference/endpoint/midjourney/midjourney.yaml POST /vendors/midjourney/v1/tob/video-diffusion","href":"/api-reference/endpoint/midjourney/video-diffusion"},{"title":"Video Diffusion","openapi":"api-reference/endpoint/midjourney/midjourney.yaml GET /vendors/midjourney/v1/tob/video-diffusion/{task_id}","href":"/api-reference/endpoint/midjourney/video-diffusion-task"}]}]},{"group":"Speech Generation","pages":[{"group":"MiniMax","pages":[{"group":"Speech 2.8 HD Text-To-Speech","pages":[{"title":"MiniMax Speech 2.8 HD Text to Speech","openapi":"api-reference/endpoint/minimax/speech-2.8-hd/speech-2.8-hd.yaml POST /vendors/minimax/v1/speech-2.8-hd/text-to-speech/generation","href":"/api-reference/endpoint/minimax/speech-2.8-hd/text-to-speech"},{"title":"MiniMax Speech 2.8 HD Text to Speech Task","openapi":"api-reference/endpoint/minimax/speech-2.8-hd/speech-2.8-hd.yaml GET /vendors/minimax/v1/speech-2.8-hd/text-to-speech/generation/{task_id}","href":"/api-reference/endpoint/minimax/speech-2.8-hd/text-to-speech-task"}]},{"group":"Speech 2.8 Turbo Text-To-Speech","pages":[{"title":"MiniMax Speech 2.8 Turbo Text to Speech","openapi":"api-reference/endpoint/minimax/speech-2.8-turbo/speech-2.8-turbo.yaml POST /vendors/minimax/v1/speech-2.8-turbo/text-to-speech/generation","href":"/api-reference/endpoint/minimax/speech-2.8-turbo/text-to-speech"},{"title":"MiniMax Speech 2.8 Turbo Text to Speech Task","openapi":"api-reference/endpoint/minimax/speech-2.8-turbo/speech-2.8-turbo.yaml GET /vendors/minimax/v1/speech-2.8-turbo/text-to-speech/generation/{task_id}","href":"/api-reference/endpoint/minimax/speech-2.8-turbo/text-to-speech-task"}]}]}]},{"group":"Music Generation","pages":[{"group":"MiniMax","pages":[{"group":"Music 2.5 Text-To-Music","pages":[{"title":"MiniMax Music 2.5 Text to Music","openapi":"api-reference/endpoint/minimax/music-2.5/music-2.5.yaml POST /vendors/minimax/v1/music-2.5/text-to-music/generation","href":"/api-reference/endpoint/minimax/music-2.5/text-to-music"},{"title":"MiniMax Music 2.5 Text to Music Task","openapi":"api-reference/endpoint/minimax/music-2.5/music-2.5.yaml GET /vendors/minimax/v1/music-2.5/text-to-music/generation/{task_id}","href":"/api-reference/endpoint/minimax/music-2.5/text-to-music-task"}]},{"group":"Music 2.0 Text-To-Music","pages":[{"title":"MiniMax Music 2.0 Text to Music","openapi":"api-reference/endpoint/minimax/music-2.0/music-2.0.yaml POST /vendors/minimax/v1/music-2.0/text-to-music/generation","href":"/api-reference/endpoint/minimax/music-2.0/text-to-music"},{"title":"MiniMax Music 2.0 Text to Music Task","openapi":"api-reference/endpoint/minimax/music-2.0/music-2.0.yaml GET /vendors/minimax/v1/music-2.0/text-to-music/generation/{task_id}","href":"/api-reference/endpoint/minimax/music-2.0/text-to-music-task"}]}]}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/quickstart"}]},{"tab":"Legal","pages":[{"title":"Legal","href":"/legal/user-privacy-policy"}]}]},"title":"MuleRouter Documentation - AI API Gateway \u0026 Routing Platform","buildId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","deploymentId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D2GYGXhJ.js","utils-BFd71lo2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-i162M7Za.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-oUw0la6W.js","snippetPresets-DtIWL37f.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BCMBbEQM.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DC4RgS91.js","shallow-CgVeLRFv.js","getApiPlaygroundDisplay-D5biMY5x.js","CodeSnippet-BFsbT-Fu.js","CodeSnippets-zLLOIece.js","Page-Ddn8iQDL.js","getPastedJson-BrHW4jRt.js","icon-CkMCp-Tk.js","MethodPill-CCcSM-Ep.js","DuplicateIcon-4tBrFI-V.js","createIcon-YbZxtfvX.js","DynamicMarkdown-BQC1aHST.js","SectionHeading-Dyh8yRs0.js","axios-vUo_bRtp.js","Markdown-DnRxVfNy.js","clsx-BHwt7gjg.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CI1QhstW.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ctpizp2W.js"]}