Maximum number of generated tokens, including reasoning and visible output. Must fit within the selected model's context and output limits.
The legacy max_tokens field is an alias. Specify only one of the two fields.
How much the model reasons before it answers: none, minimal, low, medium or high.
A tier other than none turns reasoning on. vision_config.enable_thinking, when set,
decides whether the model reasons; the tier then only applies while reasoning is on.
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.
Whether the model may call the declared tools: auto (the default) or none. none is
best effort and does not guarantee a response without tool calls. Forcing a call (required
or a named function) is not supported and is rejected with a 400. Requires tools: sent
without them, it is rejected with a 400.
Functions the model may call. Cannot be combined with a json_schemaresponse_format or
regex.
Requires a model that supports tool calling: other models reject them, and tool calls or
results in messages, with a 400. Generation stops at the first turn that calls functions,
so a response carries at most one turn of tool_calls.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Perceptron Docs","colors":{"primary":"#3B63FF","light":"#8BA6FF","dark":"#193BFF"},"logo":{"light":"https://mintcdn.com/perceptron/CuyGah1e2BqRrsVm/logo/perceptron-full-logo-light.svg?fit=max\u0026auto=format\u0026n=CuyGah1e2BqRrsVm\u0026q=85\u0026s=f5d2ffd0aaf71daba362f13fc9f7decf","dark":"https://mintcdn.com/perceptron/CuyGah1e2BqRrsVm/logo/perceptron-full-logo-dark.svg?fit=max\u0026auto=format\u0026n=CuyGah1e2BqRrsVm\u0026q=85\u0026s=859b1eeb3fa33674275135e6590684df"},"favicon":{"light":"https://mintcdn.com/perceptron/h8MQ12qmkOCPxnyY/logo/favicon_light.png?fit=max\u0026auto=format\u0026n=h8MQ12qmkOCPxnyY\u0026q=85\u0026s=9fed764e4a310a0a735776364bae108f","dark":"https://mintcdn.com/perceptron/h8MQ12qmkOCPxnyY/logo/favicon_dark.png?fit=max\u0026auto=format\u0026n=h8MQ12qmkOCPxnyY\u0026q=85\u0026s=c3ee1fadf844c0278101787211ea413c"},"api":{"openapi":{"source":"api-reference/openapi.json","directory":"api-reference"},"mdx":{"auth":{"method":"bearer"}}},"navbar":{"links":[{"href":"https://www.perceptron.inc/demo","label":"Demo"},{"href":"mailto:support@perceptron.inc","label":"Support"},{"href":"https://discord.gg/fgBeaACQzE","label":"Discord"}]},"footer":{"socials":{"discord":"https://discord.gg/fgBeaACQzE","github":"https://github.com/perceptron-ai-inc","linkedin":"https://www.linkedin.com/company/perceptron-ai-inc","x":"https://x.com/perceptroninc"}},"contextual":{"options":["copy","chatgpt","claude","cursor","mcp","perplexity","view","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"perceptron","hasAudioNarration":false,"actualSubdomain":"perceptron","customDomains":["docs.perceptron.inc"],"gitSource":{"type":"github","owner":"perceptron-ai-inc","repo":"mintlify_docs","deployBranch":"production","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ab61f6fc6fb6f41c7bf742a","collectionId":"47c4f240-aa64-46f0-a5e2-b4675a405dae","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ab61f6fc6fb6f41c7bf742a"},"entitlements":{},"buildId":"6aeb0a42c8520f7b8ee1fd76","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"Models","count":74},{"language":"default","tag":"Perceptron Mk1.5","count":60},{"language":"default","tag":"Perceptron Mk1","count":46},{"language":"default","tag":"API reference","count":38},{"language":"default","tag":"Capabilities","count":28},{"language":"default","tag":"Developer guides","count":23},{"language":"default","tag":"Services","count":21},{"language":"default","tag":"Egocentric","count":16},{"language":"default","tag":"Python SDK","count":12},{"language":"default","tag":"Image","count":11}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"ABCArizonaFlare\";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ABCArizonaFlare/ABCArizonaFlare-Regular-Trial.woff2) format(\"woff2\")}#page-title,.api-endpoint h3,.api-section h2,.mdx-content h1,.mdx-content h2,.page-title{font-family:\"ABCArizonaFlare\";font-weight:400}.h-5,h5{text-transform:uppercase;font-size:.85rem}"}],"page":{"pagePath":"api-reference/chat-completions/create-chat-completion","slug":"/api-reference/chat-completions/create-chat-completion","pageMetadata":{"title":"Create chat completion","description":"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/chat/completions","href":"/api-reference/chat-completions/create-chat-completion","autogeneratedByOpenApi":true},"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: \"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create chat completion","description":"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/chat/completions","href":"/api-reference/chat-completions/create-chat-completion","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Chat Completions"],"summary":"Create chat completion","description":"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.","operationId":"handle_chat_completions","requestBody":"7ae0f13c-4ffe-4a13-a091-84818519355b","responses":{"200":"f944a4ea-e7ed-4319-862e-572a630b23db","400":"9b41f534-20dd-44b2-83ed-d72f7a319d49","401":"992a498b-211b-410f-8951-421cbd2c3e51","404":"4be41293-a697-4f6f-ada5-98ec07c532d8","429":"c8867726-256a-4c46-9efb-810d4dc4c0dc","500":"5f9b38dc-e1b7-4b4d-a9c3-a6193ea787b1","503":"834aebcf-7906-4f0e-ab46-246a7c5a3c76"},"security":["d1eea53f-56b0-452f-8a69-db0729071c63"],"method":"post","type":"path","servers":["16d03011-ad5e-449c-a789-eb4f6a23bc43"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.perceptron.inc"],"title":"Create chat completion","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["messages","model"],"properties":{"messages":{"type":"array","items":{"oneOf":[{"type":"object","title":"System","description":"Author role of the message: `system`, `developer`, `user`, `assistant`, or `tool`.","required":["role","content"],"properties":{"content":{"oneOf":[{"type":"string","title":"Text","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text","description":"Text chunk inside a structured message.","required":["type","text"],"properties":{"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1.items.[INDEX]","typeLabel":"Text · object"},"title":"Content parts","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content.oneOf.1","typeLabel":"Text · object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content","typeLabel":"string | Text · object[]"},"role":{"type":"string","enum":["system"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.role","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.0","typeLabel":"System · object"},{"type":"object","title":"Developer","description":"Author role of the message: `system`, `developer`, `user`, `assistant`, or `tool`.","required":["role","content"],"properties":{"content":{"oneOf":[{"type":"string","title":"Text","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text","description":"Text chunk inside a structured message.","required":["type","text"],"properties":{"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1.items.[INDEX]","typeLabel":"Text · object"},"title":"Content parts","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content.oneOf.1","typeLabel":"Text · object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content","typeLabel":"string | Text · object[]"},"role":{"type":"string","enum":["developer"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.role","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.1","typeLabel":"Developer · object"},{"type":"object","title":"User","description":"Author role of the message: `system`, `developer`, `user`, `assistant`, or `tool`.","required":["role","content"],"properties":{"content":{"oneOf":[{"type":"string","title":"Text","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Text","description":"Text chunk inside a structured message.","required":["type","text"],"properties":{"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"Image URL","description":"Image content part containing a URL.","required":["type","image_url"],"properties":{"image_url":{"type":"object","description":"Inline image reference (an HTTP(S) URL or a base64 data URL).","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"},"type":{"type":"string","enum":["image_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Image URL · object"},{"type":"object","title":"Video URL","description":"Video content part containing a URL.","required":["type","video_url"],"properties":{"video_url":{"type":"object","description":"Video asset referenced inside structured content arrays.","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.video_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.video_url","typeLabel":"object"},"type":{"type":"string","enum":["video_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"Video URL · object"},{"type":"object","title":"Video frames","description":"Content part carrying raw video frames the caller has already decoded, as an\nalternative to a single `video_url`.","required":["type","video_frames"],"properties":{"video_frames":{"type":"object","description":"An ordered sequence of decoded video frames passed inline.","required":["frames"],"properties":{"frames":{"type":"array","items":{"type":"object","description":"A single decoded video frame: an image (HTTP(S) URL or base64 data URL) plus\nits timestamp within the clip.","required":["image_url","timestamp_ms"],"properties":{"image_url":{"type":"object","description":"Inline image reference (an HTTP(S) URL or a base64 data URL).","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames.frames.items.[INDEX].image_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames.frames.items.[INDEX].image_url","typeLabel":"object"},"timestamp_ms":{"type":"integer","format":"int64","description":"Offset of this frame from the start of the clip, in milliseconds. Timestamps must\nbe non-negative and non-decreasing across the `frames` array.","minimum":0,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames.frames.items.[INDEX].timestamp_ms","typeLabel":"integer\u003cint64>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames.frames.items.[INDEX]","typeLabel":"object"},"minItems":2,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames.frames","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.video_frames","typeLabel":"object"},"type":{"type":"string","enum":["video_frames"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.3","typeLabel":"Video frames · object"},{"type":"object","title":"Image file ID","description":"Image content part referencing an uploaded file by id.","required":["type","image_file_id"],"properties":{"image_file_id":{"type":"object","description":"Reference to an uploaded image file by its id (e.g. `file-abc...`).","required":["file_id"],"properties":{"file_id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.4.image_file_id.file_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.4.image_file_id","typeLabel":"object"},"type":{"type":"string","enum":["image_file_id"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.4","typeLabel":"Image file ID · object"},{"type":"object","title":"Video file ID","description":"Video content part referencing an uploaded file by id.","required":["type","video_file_id"],"properties":{"video_file_id":{"type":"object","description":"Reference to an uploaded video file by its id (e.g. `file-abc...`).","required":["file_id"],"properties":{"file_id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.5.video_file_id.file_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.5.video_file_id","typeLabel":"object"},"type":{"type":"string","enum":["video_file_id"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.5","typeLabel":"Video file ID · object"},{"type":"object","title":"Input audio","description":"Audio content part carrying inline base64 audio.","required":["type","input_audio"],"properties":{"input_audio":{"type":"object","description":"Inline audio: the file bytes as base64 plus their encoding.","required":["data","format"],"properties":{"data":{"type":"string","description":"Raw audio file bytes, base64 encoded, without a `data:` URI prefix.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.6.input_audio.data","typeLabel":"string"},"format":{"type":"string","description":"Encoding of `data`: `wav`, `mp3`, or `flac`.","example":"wav","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.6.input_audio.format","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.6.input_audio","typeLabel":"object"},"type":{"type":"string","enum":["input_audio"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.6","typeLabel":"Input audio · object"},{"type":"object","title":"Audio URL","description":"Audio content part containing a URL.","required":["type","audio_url"],"properties":{"audio_url":{"type":"object","description":"Audio file reference (an HTTP(S) URL or a base64 data URL). Supported formats are WAV, MP3, and FLAC.","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.7.audio_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.7.audio_url","typeLabel":"object"},"type":{"type":"string","enum":["audio_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.7","typeLabel":"Audio URL · object"},{"type":"object","title":"Audio file ID","description":"Audio content part referencing an uploaded file by id.","required":["type","audio_file_id"],"properties":{"audio_file_id":{"type":"object","description":"Reference to an uploaded audio file by its id (e.g. `file-abc...`).","required":["file_id"],"properties":{"file_id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.8.audio_file_id.file_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.8.audio_file_id","typeLabel":"object"},"type":{"type":"string","enum":["audio_file_id"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.8.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.8","typeLabel":"Audio file ID · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX]","typeLabel":"Text · object | Image URL · object | Video URL · object | Video frames · object | Image file ID · object | Video file ID · object | Input audio · object | Audio URL · object | Audio file ID · object"},"title":"Content parts","description":"Chat completion message content as either a string or structured content array.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1","typeLabel":"(Text · object | Image URL · object | Video URL · object | Video frames · object | Image file ID · object | Video file ID · object | Input audio · object | Audio URL · object | Audio file ID · object)[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content","typeLabel":"string | (Text · object | Image URL · object | Video URL · object | Video frames · object | Image file ID · object | Video file ID · object | Input audio · object | Audio URL · object | Audio file ID · object)[]"},"role":{"type":"string","enum":["user"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.role","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.2","typeLabel":"User · object"},{"type":"object","title":"Assistant","description":"Author role of the message: `system`, `developer`, `user`, `assistant`, or `tool`.","required":["role"],"properties":{"role":{"type":"string","enum":["assistant"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"null","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.0","typeLabel":"null"},{"type":"string","title":"Text","description":"The text of the message. May be `null` or omitted when the message has `tool_calls`.","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1","typeLabel":"string"},{"type":"array","items":{"type":"object","title":"Text","description":"Text chunk inside a structured message.","required":["type","text"],"properties":{"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.2.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.2.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.2.items.[INDEX]","typeLabel":"Text · object"},"title":"Content parts","description":"The text of the message. May be `null` or omitted when the message has `tool_calls`.","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.2","typeLabel":"Text · object[]"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.content","typeLabel":"null | string | Text · object[]"},"reasoning_content":{"oneOf":[{"type":"string","description":"The `reasoning_content` the model returned for this turn. Send it back with the turn's\n`tool_calls` so the model sees the reasoning it generated. Ignored on requests with neither\n`tools` nor tool calls or results in `messages`.","uniqueKey":"messages.items.[INDEX].oneOf.3.reasoning_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The `reasoning_content` the model returned for this turn. Send it back with the turn's\n`tool_calls` so the model sees the reasoning it generated. Ignored on requests with neither\n`tools` nor tool calls or results in `messages`.","uniqueKey":"messages.items.[INDEX].oneOf.3.reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.reasoning_content","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","description":"A tool call the model made.","required":["id","type","function"],"properties":{"function":{"type":"object","description":"A function the model called.","required":["name","arguments"],"properties":{"arguments":{"type":"string","description":"The arguments as the model generated them, meant to be JSON. They are not validated and\nmay be cut off when the response hit its token limit.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX].function.arguments","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX].function.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX].function","typeLabel":"object"},"id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"The tool calls the model made in this turn. Requires a model that supports tool calling.","uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","description":"A tool call the model made.","required":["id","type","function"],"properties":{"function":{"type":"object","description":"A function the model called.","required":["name","arguments"],"properties":{"arguments":{"type":"string","description":"The arguments as the model generated them, meant to be JSON. They are not validated and\nmay be cut off when the response hit its token limit."},"name":{"type":"string"}}},"id":{"type":"string"},"type":{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"]}}},"description":"The tool calls the model made in this turn. Requires a model that supports tool calling.","uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls","typeLabel":"object[] | null"}},"uniqueKey":"messages.items.[INDEX].oneOf.3","typeLabel":"Assistant · object"},{"type":"object","title":"Tool","description":"Author role of the message: `system`, `developer`, `user`, `assistant`, or `tool`.","required":["role","tool_call_id","content"],"properties":{"content":{"oneOf":[{"type":"string","title":"Text","description":"The result, as text or as `text`, `image_url` and `image_file_id` parts. Images count toward\nthe request's media limit and need a model that accepts image input.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Text","description":"Text chunk inside a structured message.","required":["type","text"],"properties":{"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"Image URL","description":"Image content part containing a URL.","required":["type","image_url"],"properties":{"image_url":{"type":"object","description":"Inline image reference (an HTTP(S) URL or a base64 data URL).","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"},"type":{"type":"string","enum":["image_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Image URL · object"},{"type":"object","title":"Image file ID","description":"Image content part referencing an uploaded file by id.","required":["type","image_file_id"],"properties":{"image_file_id":{"type":"object","description":"Reference to an uploaded image file by its id (e.g. `file-abc...`).","required":["file_id"],"properties":{"file_id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.2.image_file_id.file_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.2.image_file_id","typeLabel":"object"},"type":{"type":"string","enum":["image_file_id"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"Image file ID · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1.items.[INDEX]","typeLabel":"Text · object | Image URL · object | Image file ID · object"},"title":"Content parts","description":"The result, as text or as `text`, `image_url` and `image_file_id` parts. Images count toward\nthe request's media limit and need a model that accepts image input.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content.oneOf.1","typeLabel":"(Text · object | Image URL · object | Image file ID · object)[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content","typeLabel":"string | (Text · object | Image URL · object | Image file ID · object)[]"},"tool_call_id":{"type":"string","description":"The `id` of the tool call this message answers.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.tool_call_id","typeLabel":"string"},"role":{"type":"string","enum":["tool"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.role","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.4","typeLabel":"Tool · object"}],"uniqueKey":"messages.items.[INDEX]","typeLabel":"System · object | Developer · object | User · object | Assistant · object | Tool · object"},"description":"Conversation history listed in order. Supported roles: `system`, `developer` (treated as `system`),\n`user`, `assistant`, `tool`.","isRequired":true,"uniqueKey":"messages","typeLabel":"(System · object | Developer · object | User · object | Assistant · object | Tool · object)[]"},"model":{"type":"string","description":"The model to invoke. Use `GET /v1/models` to discover available model IDs. New Perceptron requests should use\n`perceptron-mk1`.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"frequency_penalty":{"oneOf":[{"type":"number","format":"float","description":"Positive values discourage the model from repeating previously used tokens.","maximum":2,"minimum":-2,"uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Positive values discourage the model from repeating previously used tokens.","maximum":2,"minimum":-2,"uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number\u003cfloat> | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","format":"int32","description":"Maximum number of generated tokens, including reasoning and visible output. Must fit within the selected model's context and output limits.\nThe legacy `max_tokens` field is an alias. Specify only one of the two fields.","minimum":0,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","format":"int32","description":"Maximum number of generated tokens, including reasoning and visible output. Must fit within the selected model's context and output limits.\nThe legacy `max_tokens` field is an alias. Specify only one of the two fields.","minimum":0,"uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer\u003cint32> | null"},"n":{"oneOf":[{"type":"integer","format":"int32","description":"Number of completions to generate. Only `1` is supported; greater values are rejected.","maximum":1,"minimum":1,"uniqueKey":"n.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","format":"int32","description":"Number of completions to generate. Only `1` is supported; greater values are rejected.","maximum":1,"minimum":1,"uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer\u003cint32> | null"},"parallel_tool_calls":{"oneOf":[{"type":"boolean","description":"Whether the model may call several functions in one turn. Defaults to `true`. Ignored\nwithout functions in `tools`.","uniqueKey":"parallel_tool_calls.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the model may call several functions in one turn. Defaults to `true`. Ignored\nwithout functions in `tools`.","uniqueKey":"parallel_tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"parallel_tool_calls","typeLabel":"boolean | null"},"presence_penalty":{"oneOf":[{"type":"number","format":"float","description":"Positive values encourage the model to introduce new concepts.","maximum":2,"minimum":-2,"uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Positive values encourage the model to introduce new concepts.","maximum":2,"minimum":-2,"uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number\u003cfloat> | null"},"reasoning_effort":{"oneOf":[{"type":"null","uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"null"},{"type":"string","description":"How much the model reasons before it answers: `none`, `minimal`, `low`, `medium` or `high`.\nA tier other than `none` turns reasoning on. `vision_config.enable_thinking`, when set,\ndecides whether the model reasons; the tier then only applies while reasoning is on.","enum":["none","minimal","low","medium","high"],"uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"reasoning_effort","typeLabel":"null | enum\u003cstring>"},"regex":{"oneOf":[{"type":"string","description":"Regex pattern for constrained generation.","uniqueKey":"regex.oneOf.0","typeLabel":"string"},{"type":"null","description":"Regex pattern for constrained generation.","uniqueKey":"regex.oneOf.1","typeLabel":"null"}],"uniqueKey":"regex","typeLabel":"string | null"},"response_format":{"oneOf":[{"type":"null","uniqueKey":"response_format.oneOf.0","typeLabel":"null"},{"type":"object","description":"An object specifying the format that the model must output.\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs\nwhich ensures the model will match your supplied JSON schema.","required":["type"],"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"response_format.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.1","typeLabel":"object"},{"type":"object","description":"An object specifying the format that the model must output.\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs\nwhich ensures the model will match your supplied JSON schema.","required":["json_schema","type"],"properties":{"json_schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema.name","typeLabel":"string"},"schema":{"oneOf":[{}],"uniqueKey":"response_format.oneOf.2.json_schema.schema","typeLabel":"any"},"strict":{"oneOf":[{"type":"boolean","description":"When true, the model output will strictly adhere to the provided schema.","uniqueKey":"response_format.oneOf.2.json_schema.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"When true, the model output will strictly adhere to the provided schema.","uniqueKey":"response_format.oneOf.2.json_schema.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.2.json_schema.strict","typeLabel":"boolean | null"}},"isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema","typeLabel":"object"},"type":{"type":"string","enum":["json_schema"],"isRequired":true,"uniqueKey":"response_format.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.2","typeLabel":"object"}],"uniqueKey":"response_format","typeLabel":"null · object · object"},"stream":{"oneOf":[{"type":"boolean","description":"Set to `true` for SSE streaming. When omitted, the API returns a single JSON response.","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Set to `true` for SSE streaming. When omitted, the API returns a single JSON response.","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stream_options":{"oneOf":[{"type":"null","uniqueKey":"stream_options.oneOf.0","typeLabel":"null"},{"type":"object","description":"Optional streaming flags. Token usage is always reported in the final chunk of a streaming response.","properties":{"include_usage":{"oneOf":[{"type":"boolean","description":"Include token usage metrics with streaming responses.","uniqueKey":"stream_options.oneOf.1.include_usage.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Include token usage metrics with streaming responses.","uniqueKey":"stream_options.oneOf.1.include_usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options.oneOf.1.include_usage","typeLabel":"boolean | null"}},"uniqueKey":"stream_options.oneOf.1","typeLabel":"object"}],"uniqueKey":"stream_options","typeLabel":"null | object"},"temperature":{"oneOf":[{"type":"number","format":"float","description":"Sampling temperature. Lower values yield deterministic replies; higher values explore more creative outputs.","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Sampling temperature. Lower values yield deterministic replies; higher values explore more creative outputs.","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number\u003cfloat> | null"},"tool_choice":{"oneOf":[{"type":"null","uniqueKey":"tool_choice.oneOf.0","typeLabel":"null"},{"type":"string","title":"Mode","description":"Whether the model may call the declared tools: `auto` (the default) or `none`. `none` is\nbest effort and does not guarantee a response without tool calls. Forcing a call (`required`\nor a named function) is not supported and is rejected with a 400. Requires `tools`: sent\nwithout them, it is rejected with a 400.","enum":["none","auto","required"],"uniqueKey":"tool_choice.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"object","title":"Named function","description":"Whether the model may call the declared tools: `auto` (the default) or `none`. `none` is\nbest effort and does not guarantee a response without tool calls. Forcing a call (`required`\nor a named function) is not supported and is rejected with a 400. Requires `tools`: sent\nwithout them, it is rejected with a 400.","required":["type","function"],"properties":{"function":{"type":"object","description":"The name of a function.","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function","typeLabel":"object"},"type":{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tool_choice.oneOf.2","typeLabel":"Named function · object"}],"uniqueKey":"tool_choice","typeLabel":"null | enum\u003cstring> | Named function · object"},"tools":{"oneOf":[{"type":"array","items":{"type":"object","title":"Function","description":"A tool the model may call.","required":["function","type"],"properties":{"function":{"type":"object","description":"A function the model may call.","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"What the function does, which the model uses to choose when and how to call it.","uniqueKey":"tools.oneOf.0.items.[INDEX].function.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the function does, which the model uses to choose when and how to call it.","uniqueKey":"tools.oneOf.0.items.[INDEX].function.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.description","typeLabel":"string | null"},"parameters":{"type":"object","description":"The arguments the function accepts, as a JSON Schema object. Kept exactly as sent, including\nthe order of its properties.","uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters","typeLabel":"object"},"strict":{"oneOf":[{"type":"boolean","description":"Accepted but not enforced: the arguments the model generates are not checked against\n`parameters`.","uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Accepted but not enforced: the arguments the model generates are not checked against\n`parameters`.","uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict","typeLabel":"boolean | null"}},"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function","typeLabel":"object"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"Function · object"},"description":"Functions the model may call. Cannot be combined with a `json_schema` `response_format` or\n`regex`.\n\nRequires a model that supports tool calling: other models reject them, and tool calls or\nresults in `messages`, with a 400. Generation stops at the first turn that calls functions,\nso a response carries at most one turn of `tool_calls`.","uniqueKey":"tools.oneOf.0","typeLabel":"Function · object[]"},{"type":"null","items":{"type":"object","title":"Function","description":"A tool the model may call.","required":["function","type"],"properties":{"function":{"type":"object","description":"A function the model may call.","required":["name"],"properties":{"description":{"oneOf":[{"type":"string","description":"What the function does, which the model uses to choose when and how to call it."},{"type":"null","description":"What the function does, which the model uses to choose when and how to call it."}]},"name":{"type":"string"},"parameters":{"type":"object","description":"The arguments the function accepts, as a JSON Schema object. Kept exactly as sent, including\nthe order of its properties."},"strict":{"oneOf":[{"type":"boolean","description":"Accepted but not enforced: the arguments the model generates are not checked against\n`parameters`."},{"type":"null","description":"Accepted but not enforced: the arguments the model generates are not checked against\n`parameters`."}]}}},"type":{"type":"string","enum":["function"]}}},"description":"Functions the model may call. Cannot be combined with a `json_schema` `response_format` or\n`regex`.\n\nRequires a model that supports tool calling: other models reject them, and tool calls or\nresults in `messages`, with a 400. Generation stops at the first turn that calls functions,\nso a response carries at most one turn of `tool_calls`.","uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"Function · object[] | null"},"top_k":{"oneOf":[{"type":"integer","format":"int32","description":"Top-k sampling. The model samples from the top k most likely tokens.","minimum":0,"uniqueKey":"top_k.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","format":"int32","description":"Top-k sampling. The model samples from the top k most likely tokens.","minimum":0,"uniqueKey":"top_k.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_k","typeLabel":"integer\u003cint32> | null"},"top_p":{"oneOf":[{"type":"number","format":"float","description":"Nucleus sampling probability. The model samples from the smallest token set whose cumulative probability exceeds this threshold.","maximum":1,"exclusiveMinimum":0,"uniqueKey":"top_p.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Nucleus sampling probability. The model samples from the smallest token set whose cumulative probability exceeds this threshold.","maximum":1,"exclusiveMinimum":0,"uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number\u003cfloat> | null"},"vision_config":{"oneOf":[{"type":"null","uniqueKey":"vision_config.oneOf.0","typeLabel":"null"},{"type":"object","description":"Perceptron vision-model controls (thinking, spatial output format,\nvideo audio). Only supported on Perceptron-owned models.","properties":{"annotation_format":{"oneOf":[{"type":"null","uniqueKey":"vision_config.oneOf.1.annotation_format.oneOf.0","typeLabel":"null"},{"type":"string","description":"Annotation format the model should emit (`point`, `box`, `polygon`, or `clip`).","enum":["point","box","polygon","clip"],"uniqueKey":"vision_config.oneOf.1.annotation_format.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"vision_config.oneOf.1.annotation_format","typeLabel":"null | enum\u003cstring>"},"enable_audio_in_video":{"oneOf":[{"type":"boolean","description":"When true, the audio track of each video in the request is analyzed along with its frames.\nDefaults to false. A video without an audio track is processed as video only. Audio content\nparts are analyzed regardless of this setting.","uniqueKey":"vision_config.oneOf.1.enable_audio_in_video.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"When true, the audio track of each video in the request is analyzed along with its frames.\nDefaults to false. A video without an audio track is processed as video only. Audio content\nparts are analyzed regardless of this setting.","uniqueKey":"vision_config.oneOf.1.enable_audio_in_video.oneOf.1","typeLabel":"null"}],"uniqueKey":"vision_config.oneOf.1.enable_audio_in_video","typeLabel":"boolean | null"},"enable_thinking":{"oneOf":[{"type":"boolean","description":"Deprecated: use the top-level `reasoning_effort`. When set, this flag decides whether the\nmodel reasons and the tier only applies while reasoning is on.","deprecated":true,"uniqueKey":"vision_config.oneOf.1.enable_thinking.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Deprecated: use the top-level `reasoning_effort`. When set, this flag decides whether the\nmodel reasons and the tier only applies while reasoning is on.","deprecated":true,"uniqueKey":"vision_config.oneOf.1.enable_thinking.oneOf.1","typeLabel":"null"}],"uniqueKey":"vision_config.oneOf.1.enable_thinking","typeLabel":"boolean | null"}},"uniqueKey":"vision_config.oneOf.1","typeLabel":"object"}],"uniqueKey":"vision_config","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"messages":[{"content":"\u003cstring>","role":"system"}],"model":"\u003cstring>","frequency_penalty":0,"max_completion_tokens":1,"n":1,"parallel_tool_calls":true,"presence_penalty":0,"regex":"\u003cstring>","response_format":{"type":"text"},"stream":false,"stream_options":{"include_usage":true},"temperature":1,"tools":[{"function":{"name":"\u003cstring>","description":"\u003cstring>","parameters":{},"strict":true},"type":"function"}],"top_k":1,"top_p":0,"vision_config":{"enable_audio_in_video":true,"enable_thinking":true}}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"f944a4ea-e7ed-4319-862e-572a630b23db":{"description":"Chat completion generated successfully.","content":{"application/json":{"schema":{"type":"object","description":"Non-streaming response body when `stream=false`.","required":["id","choices","created","model","object"],"properties":{"choices":{"type":"array","items":{"type":"object","description":"Individual completion sampled by the model.","required":["index","message"],"properties":{"index":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer\u003cint32>"},"message":{"type":"object","description":"Message object returned in the assistant's response.","required":["content","role"],"properties":{"content":{"oneOf":[{"type":"string","description":"The text of the message, `null` when there is none (for example when the model only\ncalled tools).","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The text of the message, `null` when there is none (for example when the model only\ncalled tools).","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"role":{"type":"string","enum":["system","user","assistant"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"reasoning_content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].message.reasoning_content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].message.reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning_content","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","description":"A tool call the model made.","required":["id","type","function"],"properties":{"function":{"type":"object","description":"A function the model called.","required":["name","arguments"],"properties":{"arguments":{"type":"string","description":"The arguments as the model generated them, meant to be JSON. They are not validated and\nmay be cut off when the response hit its token limit.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].function.arguments","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].function.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].function","typeLabel":"object"},"id":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"The tool calls the model made.","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","description":"A tool call the model made.","required":["id","type","function"],"properties":{"function":{"type":"object","description":"A function the model called.","required":["name","arguments"],"properties":{"arguments":{"type":"string","description":"The arguments as the model generated them, meant to be JSON. They are not validated and\nmay be cut off when the response hit its token limit."},"name":{"type":"string"}}},"id":{"type":"string"},"type":{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"]}}},"description":"The tool calls the model made.","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"null"},{"type":"string","enum":["stop","length","tool_calls","tool_error","tool_limit","interrupted"],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"null | enum\u003cstring>"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"created":{"type":"integer","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"created","typeLabel":"integer\u003cint64>"},"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"usage":{"oneOf":[{"type":"null","uniqueKey":"usage.oneOf.0","typeLabel":"null"},{"type":"object","description":"Token accounting emitted with every completion.","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"completion_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.completion_tokens","typeLabel":"integer\u003cint32>"},"prompt_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.prompt_tokens","typeLabel":"integer\u003cint32>"},"total_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.total_tokens","typeLabel":"integer\u003cint32>"},"prompt_tokens_details":{"oneOf":[{"type":"null","uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when the model reports a per-modality breakdown.","required":["audio_tokens"],"properties":{"audio_tokens":{"type":"integer","format":"int32","description":"Prompt tokens produced from audio input: audio content parts and, when\n`vision_config.enable_audio_in_video` is set, video soundtracks. `0` means no audio was\nanalyzed, including when an opted-in video has no usable soundtrack.","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.1.audio_tokens","typeLabel":"integer\u003cint32>"}},"uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.1","typeLabel":"object"}],"uniqueKey":"usage.oneOf.1.prompt_tokens_details","typeLabel":"null | object"}},"uniqueKey":"usage.oneOf.1","typeLabel":"object"}],"uniqueKey":"usage","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"choices":[{"index":1,"message":{"content":"\u003cstring>","role":"system","reasoning_content":"\u003cstring>","tool_calls":[{"function":{"arguments":"\u003cstring>","name":"\u003cstring>"},"id":"\u003cstring>","type":"function"}]},"finish_reason":"stop"}],"created":1,"id":"\u003cstring>","model":"\u003cstring>","object":"\u003cstring>","usage":{"completion_tokens":1,"prompt_tokens":1,"total_tokens":1,"prompt_tokens_details":{"audio_tokens":1}}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"object","description":"SSE response payload when `stream=true`.","required":["id","choices","created","model","object"],"properties":{"choices":{"type":"array","items":{"type":"object","description":"Streaming choice emitted per SSE chunk.","required":["index"],"properties":{"index":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer\u003cint32>"},"delta":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.0","typeLabel":"null"},{"type":"object","description":"Delta payload for streaming responses.","properties":{"content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.content","typeLabel":"string | null"},"reasoning_content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.reasoning_content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.reasoning_content","typeLabel":"string | null"},"role":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.role.oneOf.0","typeLabel":"null"},{"type":"string","enum":["system","user","assistant"],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.role.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.role","typeLabel":"null | enum\u003cstring>"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","description":"A streamed piece of a tool call. The first piece for an `index` carries the call's `id`,\n`type` and `function.name`; later pieces carry only `function.arguments`, to be appended.","required":["index"],"properties":{"index":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].index","typeLabel":"integer\u003cint32>"},"function":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0","typeLabel":"null"},{"type":"object","description":"A streamed piece of a function call. Concatenate the `arguments` of every piece with the same\n`index`.","properties":{"arguments":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.arguments.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.arguments.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.arguments","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1.name","typeLabel":"string | null"}},"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1","typeLabel":"object"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].function","typeLabel":"null | object"},"id":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].id","typeLabel":"string | null"},"type":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].type.oneOf.0","typeLabel":"null"},{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].type.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX].type","typeLabel":"null | enum\u003cstring>"}},"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","description":"A streamed piece of a tool call. The first piece for an `index` carries the call's `id`,\n`type` and `function.name`; later pieces carry only `function.arguments`, to be appended.","required":["index"],"properties":{"function":{"oneOf":[{"type":"null"},{"type":"object","description":"A streamed piece of a function call. Concatenate the `arguments` of every piece with the same\n`index`.","properties":{"arguments":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"oneOf":[{"type":"string"},{"type":"null"}]}}}]},"id":{"oneOf":[{"type":"string"},{"type":"null"}]},"index":{"type":"integer","format":"int32","minimum":0},"type":{"oneOf":[{"type":"null"},{"type":"string","description":"The type of a tool call or a named tool choice. Always `function`.","enum":["function"]}]}}},"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.oneOf.1.tool_calls","typeLabel":"object[] | null"}},"uniqueKey":"choices.items.[INDEX].delta.oneOf.1","typeLabel":"object"}],"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"null | object"},"finish_reason":{"oneOf":[{"type":"null","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"null"},{"type":"string","enum":["stop","length","tool_calls","tool_error","tool_limit","interrupted"],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"null | enum\u003cstring>"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"created":{"type":"integer","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"created","typeLabel":"integer\u003cint64>"},"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"usage":{"oneOf":[{"type":"null","uniqueKey":"usage.oneOf.0","typeLabel":"null"},{"type":"object","description":"Token accounting emitted with every completion.","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"completion_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.completion_tokens","typeLabel":"integer\u003cint32>"},"prompt_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.prompt_tokens","typeLabel":"integer\u003cint32>"},"total_tokens":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.total_tokens","typeLabel":"integer\u003cint32>"},"prompt_tokens_details":{"oneOf":[{"type":"null","uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when the model reports a per-modality breakdown.","required":["audio_tokens"],"properties":{"audio_tokens":{"type":"integer","format":"int32","description":"Prompt tokens produced from audio input: audio content parts and, when\n`vision_config.enable_audio_in_video` is set, video soundtracks. `0` means no audio was\nanalyzed, including when an opted-in video has no usable soundtrack.","minimum":0,"isRequired":true,"uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.1.audio_tokens","typeLabel":"integer\u003cint32>"}},"uniqueKey":"usage.oneOf.1.prompt_tokens_details.oneOf.1","typeLabel":"object"}],"uniqueKey":"usage.oneOf.1.prompt_tokens_details","typeLabel":"null | object"}},"uniqueKey":"usage.oneOf.1","typeLabel":"object"}],"uniqueKey":"usage","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"choices":[{"index":1,"delta":{"content":"\u003cstring>","reasoning_content":"\u003cstring>","role":"system","tool_calls":[{"index":1,"function":{"arguments":"\u003cstring>","name":"\u003cstring>"},"id":"\u003cstring>","type":"function"}]},"finish_reason":"stop"}],"created":1,"id":"\u003cstring>","model":"\u003cstring>","object":"\u003cstring>","usage":{"completion_tokens":1,"prompt_tokens":1,"total_tokens":1,"prompt_tokens_details":{"audio_tokens":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"9b41f534-20dd-44b2-83ed-d72f7a319d49":{"description":"The request was invalid or could not be processed.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"audio_token_limit_exceeded":{"title":"audio_token_limit_exceeded","value":{"error":{"message":"Audio at messages[0].content[1] is 912.4 s (11405 audio tokens). This model accepts at most 8192 audio tokens per item (about 655 s). Audio is not truncated; shorten or split it.","type":"invalid_request_error","param":"messages[0].content[1].input_audio","code":"audio_token_limit_exceeded"}}},"tool_calling_not_supported":{"title":"tool_calling_not_supported","value":{"error":{"message":"Model 'perceptron-mk1' does not support tool calling","type":"invalid_request_error","param":"tools","code":"unsupported_parameter"}}},"unsupported_input":{"title":"unsupported_input","value":{"error":{"message":"Model 'test' does not support video input","type":"invalid_request_error","param":null,"code":null}}}},"exampleType":"examples"}},"exampleType":"examples"},"992a498b-211b-410f-8951-421cbd2c3e51":{"description":"Authentication failed. Invalid or missing API key.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Invalid API key","type":"authentication_error","param":null,"code":null}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Invalid API key","type":"authentication_error","param":null,"code":null}}}},"exampleType":"examples"}},"exampleType":"examples"},"4be41293-a697-4f6f-ada5-98ec07c532d8":{"description":"The requested model does not exist or is unavailable.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"The model 'unknown-model' does not exist","type":"invalid_request_error","param":"model","code":"model_not_found"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The model 'unknown-model' does not exist","type":"invalid_request_error","param":"model","code":"model_not_found"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c8867726-256a-4c46-9efb-810d4dc4c0dc":{"description":"Rate limit exceeded or quota exceeded. Too many requests or insufficient credits.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Organization rate limit exceeded (300 requests/minute). Please retry after 30 seconds.","type":"rate_limit_error","param":null,"code":"rate_limit_exceeded"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Organization rate limit exceeded (300 requests/minute). Please retry after 30 seconds.","type":"rate_limit_error","param":null,"code":"rate_limit_exceeded"}}}},"exampleType":"examples"}},"exampleType":"examples"},"5f9b38dc-e1b7-4b4d-a9c3-a6193ea787b1":{"description":"Internal server error while processing the request.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"The server had an error while processing your request.","type":"server_error","param":null,"code":null}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The server had an error while processing your request.","type":"server_error","param":null,"code":null}}}},"exampleType":"examples"}},"exampleType":"examples"},"834aebcf-7906-4f0e-ab46-246a7c5a3c76":{"description":"The model is temporarily overloaded and dropped the request before processing it. Retry after the number of seconds in the Retry-After header.","content":{"application/json":{"schema":{"type":"object","description":"OpenAI-compatible error response format.","required":["error"],"properties":{"error":{"type":"object","description":"OpenAI-compatible error detail.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","uniqueKey":"error.type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.type","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"The model is currently overloaded with other requests. Please retry after a short wait.","type":"server_error","param":null,"code":"model_overloaded"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The model is currently overloaded with other requests. Please retry after a short wait.","type":"server_error","param":null,"code":"model_overloaded"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"d1eea53f-56b0-452f-8a69-db0729071c63":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication using your Perceptron API key","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"16d03011-ad5e-449c-a789-eb4f6a23bc43":{"url":"https://api.perceptron.inc"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer token authentication using your Perceptron API key","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer token authentication using your Perceptron API key","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"perceptron","siteName":"Perceptron Docs","title":"Create chat completion - Perceptron Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T10:34:46.093Z","originalFileLocation":"api-reference/chat-completions/create-chat-completion.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=\"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Perceptron Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create chat completion - Perceptron Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Perceptron Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://perceptron.mintlify.app/_mintlify/api/og/v2?division=Chat+completions\u0026amp;title=Create+chat+completion\u0026amp;description=Generate+a+response+for+a+text+or+multimodal+conversation%2C+using+the+OpenAI+chat+completions+request+and+response+format.\u0026amp;theme=ceaeb19d1c5c0da2f2187829\u0026amp;signature=92bf40c896bcb74f90e8540f22e193dadb6fb46cda57cbf3907405098d42d8c4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create chat completion - Perceptron Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://perceptron.mintlify.app/_mintlify/api/og/v2?division=Chat+completions\u0026amp;title=Create+chat+completion\u0026amp;description=Generate+a+response+for+a+text+or+multimodal+conversation%2C+using+the+OpenAI+chat+completions+request+and+response+format.\u0026amp;theme=ceaeb19d1c5c0da2f2187829\u0026amp;signature=92bf40c896bcb74f90e8540f22e193dadb6fb46cda57cbf3907405098d42d8c4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/perceptron/b-1oIqD5B-JgaDLb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Perceptron Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B63FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/chat-completions/create-chat-completion.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.perceptron.inc/#organization\",\"name\":\"Perceptron Docs\",\"url\":\"https://docs.perceptron.inc\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/perceptron/CuyGah1e2BqRrsVm/logo/perceptron-full-logo-light.svg?fit=max\u0026auto=format\u0026n=CuyGah1e2BqRrsVm\u0026q=85\u0026s=f5d2ffd0aaf71daba362f13fc9f7decf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.perceptron.inc#website\",\"name\":\"Perceptron Docs\",\"url\":\"https://docs.perceptron.inc\",\"publisher\":{\"@id\":\"https://docs.perceptron.inc/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion#webpage\",\"url\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion\",\"name\":\"Create chat completion\",\"description\":\"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\",\"dateModified\":\"2026-11-04T10:34:46.093Z\",\"isPartOf\":{\"@id\":\"https://docs.perceptron.inc#website\"},\"breadcrumb\":{\"@id\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Perceptron Docs\",\"item\":\"https://docs.perceptron.inc\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create chat completion\",\"item\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion#apireference\",\"headline\":\"Create chat completion\",\"name\":\"Create chat completion\",\"description\":\"Generate a response for a text or multimodal conversation, using the OpenAI chat completions request and response format.\",\"url\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.perceptron.inc/api-reference/chat-completions/create-chat-completion#webpage\"},\"dateModified\":\"2026-11-04T10:34:46.093Z\",\"publisher\":{\"@id\":\"https://docs.perceptron.inc/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.perceptron.inc#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Perceptron Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Perceptron Docs","nav":{"global":null,"tabs":[{"tab":"Overview","icon":"house","pages":[{"title":"Overview","href":""}]},{"tab":"Models","icon":"microchip","dropdowns":[{"dropdown":"Perceptron Mk1.5","icon":"microchip","description":"Latest","groups":[{"group":"Get started","pages":[{"title":"Models overview","sidebarTitle":"All models","href":"/models"},{"title":"Quickstart","icon":"rocket","href":"/perceptron-mk1.5/index"},{"title":"Perceptron Mk1.5","sidebarTitle":"Model spec","href":"/perceptron-mk1.5/models/perceptron-mk1.5"},{"title":"Release notes","href":"/perceptron-mk1.5/changelog"}]},{"group":"Capabilities","pages":[{"group":"Image","pages":[{"title":"Image understanding","href":"/perceptron-mk1.5/capabilities/image-understanding"},{"title":"Image Q\u0026A","sidebarTitle":"Image Q\u0026A","href":"/perceptron-mk1.5/capabilities/image-qa"},{"title":"Image captioning","href":"/perceptron-mk1.5/capabilities/image-captioning"},{"title":"Object detection","href":"/perceptron-mk1.5/capabilities/object-detection"},{"title":"OCR","href":"/perceptron-mk1.5/capabilities/ocr"},{"title":"In-context learning (image)","sidebarTitle":"ICL (image)","href":"/perceptron-mk1.5/capabilities/in-context-learning-image"}]},{"group":"Video","pages":[{"title":"Video understanding","href":"/perceptron-mk1.5/capabilities/video-understanding"},{"title":"Video Q\u0026A","sidebarTitle":"Video Q\u0026A","href":"/perceptron-mk1.5/capabilities/video-qa"},{"title":"Video clipping","sidebarTitle":"Video clipping","href":"/perceptron-mk1.5/capabilities/video-clipping"},{"title":"In-context learning (video)","sidebarTitle":"ICL (video)","href":"/perceptron-mk1.5/capabilities/in-context-learning-video"},{"title":"Video tracking","href":"/perceptron-mk1.5/capabilities/video-tracking"}]},{"group":"Audio","pages":[{"title":"Audio understanding","href":"/perceptron-mk1.5/capabilities/audio"},{"title":"Audio Q\u0026A","sidebarTitle":"Audio Q\u0026A","href":"/perceptron-mk1.5/capabilities/audio-qa"},{"title":"Audio transcription","href":"/perceptron-mk1.5/capabilities/audio-transcription"},{"title":"Audio clipping","href":"/perceptron-mk1.5/capabilities/audio-clipping"}]},{"title":"Tools","sidebarTitle":"Tools","href":"/perceptron-mk1.5/capabilities/tool-calling"},{"title":"Reasoning","href":"/perceptron-mk1.5/capabilities/thinking"},{"title":"Structured outputs","href":"/perceptron-mk1.5/capabilities/structured-outputs"}]},{"group":"Developer guides","pages":[{"group":"Python SDK","pages":[{"title":"Get started with Python","sidebarTitle":"Get started","href":"/perceptron-mk1.5/guides/python/getting-started"},{"title":"Authentication","href":"/perceptron-mk1.5/guides/python/auth"},{"title":"Request basics","href":"/perceptron-mk1.5/guides/python/request-basics"},{"title":"Rendering annotations","href":"/perceptron-mk1.5/guides/rendering-annotations"},{"title":"Coordinate system","href":"/perceptron-mk1.5/concepts/coordinates"},{"title":"Python FAQs","sidebarTitle":"FAQs","href":"/perceptron-mk1.5/guides/python/faqs"}]},{"title":"Annotation format","href":"/perceptron-mk1.5/concepts/annotations"},{"title":"Multiple assets","href":"/perceptron-mk1.5/guides/multiple-assets"},{"title":"Function calling","href":"/perceptron-mk1.5/guides/tool-calling"},{"title":"Files","href":"/perceptron-mk1.5/guides/files"},{"title":"Multilook","href":"/perceptron-mk1.5/guides/multilook"},{"title":"MCP","href":"/perceptron-mk1.5/guides/mcp"},{"title":"Error messages","href":"/perceptron-mk1.5/guides/error-messages"}]},{"group":"Scaling \u0026 deployment","pages":[{"title":"Batch processing","href":"/perceptron-mk1.5/guides/batch"},{"title":"Scaling","href":"/perceptron-mk1.5/guides/scaling"},{"title":"Tokenization","href":"/perceptron-mk1.5/guides/tokenization"}]},{"group":"Best practices","pages":[{"title":"Prompting reference","href":"/perceptron-mk1.5/best-practices/prompting-reference"},{"title":"Security","href":"/perceptron-mk1.5/best-practices/security"},{"title":"Building a tool agent","href":"/perceptron-mk1.5/guides/tool-agents"},{"title":"High-fidelity object tracking","href":"/perceptron-mk1.5/guides/high-fidelity-object-tracking"}]}]},{"dropdown":"Perceptron Mk1","icon":"microchip","groups":[{"group":"Get started","pages":[{"title":"Quickstart","icon":"rocket","sidebarTitle":"Quickstart","href":"/perceptron-mk1/index"},{"title":"Perceptron Mk1","sidebarTitle":"Model spec","href":"/perceptron-mk1/models/perceptron-mk1"},{"title":"Release notes","href":"/perceptron-mk1/changelog"}]},{"group":"Capabilities","pages":[{"group":"Image","pages":[{"title":"Image Q\u0026A","sidebarTitle":"Image Q\u0026A","href":"/perceptron-mk1/capabilities/image-qa"},{"title":"Image captioning","sidebarTitle":"Image captioning","href":"/perceptron-mk1/capabilities/image-captioning"},{"title":"Object detection","href":"/perceptron-mk1/capabilities/object-detection"},{"title":"OCR","href":"/perceptron-mk1/capabilities/ocr"},{"title":"In-context learning (image)","sidebarTitle":"ICL (image)","href":"/perceptron-mk1/capabilities/in-context-learning-image"}]},{"group":"Video","pages":[{"title":"Video Q\u0026A","sidebarTitle":"Video Q\u0026A","href":"/perceptron-mk1/capabilities/video-qa"},{"title":"Video clipping","sidebarTitle":"Video clipping","href":"/perceptron-mk1/capabilities/video-clipping"},{"title":"In-context learning (video)","sidebarTitle":"ICL (video)","href":"/perceptron-mk1/capabilities/in-context-learning-video"}]},{"title":"Thinking","href":"/perceptron-mk1/capabilities/thinking"},{"title":"Structured outputs","href":"/perceptron-mk1/capabilities/structured-outputs"}]},{"group":"Developer guides","pages":[{"group":"Python SDK","pages":[{"title":"Get started","href":"/perceptron-mk1/guides/python-sdk/getting-started"},{"title":"Authentication","href":"/perceptron-mk1/guides/python-sdk/auth"},{"title":"Pointing basics","href":"/perceptron-mk1/guides/python-sdk/pointing-basics"},{"title":"Perceive basics","href":"/perceptron-mk1/guides/python-sdk/perceive-basics"},{"title":"Coordinate system","href":"/perceptron-mk1/concepts/coordinates"},{"title":"Python SDK FAQs","sidebarTitle":"FAQs","href":"/perceptron-mk1/guides/python-sdk/faqs"}]},{"title":"Files","href":"/perceptron-mk1/guides/files"},{"title":"Multilook","href":"/perceptron-mk1/guides/multilook"},{"title":"MCP","href":"/perceptron-mk1/guides/mcp"},{"title":"Error messages","href":"/perceptron-mk1/guides/error-messages"}]},{"group":"Scaling \u0026 deployment","pages":[{"title":"Batch processing","href":"/perceptron-mk1/guides/batch"},{"title":"Scaling","href":"/perceptron-mk1/guides/scaling"},{"title":"Tokenization","href":"/perceptron-mk1/guides/tokenization"}]},{"group":"Best practices","pages":[{"title":"Prompting reference","href":"/perceptron-mk1/best-practices/prompting-reference"},{"title":"Security","href":"/perceptron-mk1/best-practices/security"}]}]}]},{"tab":"Services","icon":"server","pages":[{"title":"Services","href":"/services"}]},{"tab":"API reference","icon":"code","dropdowns":[{"dropdown":"Perceptron Mk1.5","icon":"microchip","description":"Latest","groups":[{"group":"API reference","pages":[{"title":"API reference","sidebarTitle":"Overview","description":"Choose the reference for your model or service.","href":"/api-reference"}]},{"group":"Chat completions","pages":[{"title":"Create chat completion","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/chat/completions","href":"/api-reference/chat-completions/create-chat-completion"},{"title":"Create multilook chat completions","description":"Run several independent prompts over one shared, prefilled context.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/chat/completions/multilook","href":"/api-reference/chat-completions/create-multilook-chat-completions"}]},{"group":"Files","pages":[{"title":"List files","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/files","href":"/api-reference/files/list-files"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/files","href":"/api-reference/files/upload-a-file"},{"title":"Retrieve a file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/files/{file_id}","href":"/api-reference/files/retrieve-a-file"},{"title":"Delete a file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/files/{file_id}","href":"/api-reference/files/delete-a-file"},{"title":"Download a file's contents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/files/{file_id}/content","href":"/api-reference/files/download-a-files-contents"}]},{"group":"Models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/models","href":"/api-reference/models/list-available-models"},{"title":"Retrieve a model","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/models/{model_id}","href":"/api-reference/models/retrieve-a-model"}]},{"group":"Services","pages":[{"group":"Detect","pages":[{"title":"Detect objects","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/detect","href":"/api-reference/detection/detect-objects"}]},{"group":"Egocentric","pages":[{"title":"Submit an egocentric batch","openapi":"api-reference/openapi.json POST /v1/egocentric/batches","href":"/api-reference/egocentric/submit-an-egocentric-batch"},{"title":"List egocentric batches","openapi":"api-reference/openapi.json GET /v1/egocentric/batches","href":"/api-reference/egocentric/list-egocentric-batches"},{"title":"Retrieve an egocentric batch","openapi":"api-reference/openapi.json GET /v1/egocentric/batches/{batch_id}","href":"/api-reference/egocentric/retrieve-an-egocentric-batch"},{"title":"List jobs in an egocentric batch","openapi":"api-reference/openapi.json GET /v1/egocentric/batches/{batch_id}/jobs","href":"/api-reference/egocentric/list-jobs-in-an-egocentric-batch"},{"title":"List egocentric jobs","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs","href":"/api-reference/egocentric/list-egocentric-jobs"},{"title":"Retrieve an egocentric job","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs/{job_id}","href":"/api-reference/egocentric/retrieve-an-egocentric-job"},{"title":"Download an egocentric result","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs/{job_id}/result","href":"/api-reference/egocentric/download-an-egocentric-result"}]}]}]},{"dropdown":"Perceptron Mk1","icon":"microchip","groups":[{"group":"API reference","pages":[{"title":"Perceptron Mk1 API reference","sidebarTitle":"Overview","href":"/perceptron-mk1/api-reference"}]},{"group":"Chat completions","pages":[{"title":"Create chat completion (Mk1)","api":"POST https://api.perceptron.inc/v1/chat/completions","playground":"simple","href":"/perceptron-mk1/api-reference/endpoint/chat-completions"},{"title":"Create multilook chat completions (Mk1)","api":"POST https://api.perceptron.inc/v1/chat/completions/multilook","playground":"simple","href":"/perceptron-mk1/api-reference/endpoint/multilook-chat-completions"}]},{"group":"Files","pages":[{"title":"List files","openapi":"api-reference/openapi.json GET /v1/files","href":"/perceptron-mk1/api-reference/files/list-files"},{"title":"Upload a file","openapi":"api-reference/openapi.json POST /v1/files","href":"/perceptron-mk1/api-reference/files/upload-a-file"},{"title":"Retrieve a file","openapi":"api-reference/openapi.json GET /v1/files/{file_id}","href":"/perceptron-mk1/api-reference/files/retrieve-a-file"},{"title":"Delete a file","openapi":"api-reference/openapi.json DELETE /v1/files/{file_id}","href":"/perceptron-mk1/api-reference/files/delete-a-file"},{"title":"Download a file's contents","openapi":"api-reference/openapi.json GET /v1/files/{file_id}/content","href":"/perceptron-mk1/api-reference/files/download-a-files-contents"}]},{"group":"Models","pages":[{"title":"List available models","openapi":"api-reference/openapi.json GET /v1/models","href":"/perceptron-mk1/api-reference/models/list-available-models"},{"title":"Retrieve a model","openapi":"api-reference/openapi.json GET /v1/models/{model_id}","href":"/perceptron-mk1/api-reference/models/retrieve-a-model"}]},{"group":"Services","pages":[{"group":"Detect","pages":[{"title":"Detect objects","openapi":"api-reference/openapi.json POST /v1/detect","href":"/perceptron-mk1/api-reference/services/detect-objects"}]},{"group":"Egocentric","pages":[{"title":"Submit an egocentric batch","openapi":"api-reference/openapi.json POST /v1/egocentric/batches","href":"/perceptron-mk1/api-reference/services/egocentric/submit-an-egocentric-batch"},{"title":"List egocentric batches","openapi":"api-reference/openapi.json GET /v1/egocentric/batches","href":"/perceptron-mk1/api-reference/services/egocentric/list-egocentric-batches"},{"title":"Retrieve an egocentric batch","openapi":"api-reference/openapi.json GET /v1/egocentric/batches/{batch_id}","href":"/perceptron-mk1/api-reference/services/egocentric/retrieve-an-egocentric-batch"},{"title":"List jobs in an egocentric batch","openapi":"api-reference/openapi.json GET /v1/egocentric/batches/{batch_id}/jobs","href":"/perceptron-mk1/api-reference/services/egocentric/list-jobs-in-an-egocentric-batch"},{"title":"List egocentric jobs","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs","href":"/perceptron-mk1/api-reference/services/egocentric/list-egocentric-jobs"},{"title":"Retrieve an egocentric job","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs/{job_id}","href":"/perceptron-mk1/api-reference/services/egocentric/retrieve-an-egocentric-job"},{"title":"Download an egocentric result","openapi":"api-reference/openapi.json GET /v1/egocentric/jobs/{job_id}/result","href":"/perceptron-mk1/api-reference/services/egocentric/download-an-egocentric-result"}]}]}]}]}]},"basePath":"","title":"Create chat completion - Perceptron Docs","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js","Markdown-h4cOoD8d.js","clsx-B2v50t8t.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DJnKvr0g.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BHrrjR1K.js"]}