Generates a chat completion from an OpenAI-style messages array.
Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you
have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract,
and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI
Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k,
guided_choice, and thinking; other extra fields are dropped, and fields that set the provider
endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected
with a 422. The model is selected from model given as vendor/name; most vendors are served
through the litellm proxy gateway, while
OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events
of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is
recorded for the account, and for streaming responses it is read from the final chunk.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Scale AI","colors":{"primary":"#3f2e7b","light":"#ca62ff","dark":"#3f2e7b"},"logo":{"light":"https://mintcdn.com/scalegp/TBmst1qiYXwYqUB5/logo/light.png?fit=max\u0026auto=format\u0026n=TBmst1qiYXwYqUB5\u0026q=85\u0026s=46027042c16b373ac463148db5ad1d6b","dark":"https://mintcdn.com/scalegp/TBmst1qiYXwYqUB5/logo/dark.png?fit=max\u0026auto=format\u0026n=TBmst1qiYXwYqUB5\u0026q=85\u0026s=02733f39d684d796ec742853eabf0de5"},"favicon":"https://mintcdn.com/scalegp/1vQnbXFkjbQbcgd1/favicon.png?fit=max\u0026auto=format\u0026n=1vQnbXFkjbQbcgd1\u0026q=85\u0026s=f52c84ba46a7cca58551673616dabe9c","background":{"decoration":"windows"},"navbar":{"links":[],"primary":{"type":"button","label":"Platform","href":"https://app.sgp.scale.com/"}},"footer":{"socials":{"x":"https://x.com/scale_ai","facebook":"https://www.facebook.com/scaleapi","linkedin":"https://www.linkedin.com/company/scaleai"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"scalegp","hasAudioNarration":false,"actualSubdomain":"scalegp","customDomains":["docs.gp.scale.com"],"gitSource":{"type":"github","owner":"scaleapi","repo":"sgp-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aecf0ec6829c68a2fb0d3c8","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":235},{"language":"default","tag":"AgentOps API","count":141},{"language":"default","tag":"Guides","count":131},{"language":"default","tag":"Agentex API","count":97},{"language":"default","tag":"Evaluations","count":72},{"language":"default","tag":"Dex API","count":48},{"language":"default","tag":"Agents","count":44},{"language":"default","tag":"Evaluation Datasets","count":34},{"language":"default","tag":"Models","count":32},{"language":"default","tag":"Knowledge Bases","count":31}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"@font-face{font-family:'Aeonik';src:url('https://fonts.gstatic.com/s/inter/v18/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2');font-weight:normal;font-style:normal;font-display:swap}h1,h2,h3{font-family:'aeonik';letter-spacing:normal!important}"}],"page":{"pagePath":"reference/v5/inference/generate-openai-chat-completion-from-messages","slug":"/reference/v5/inference/generate-openai-chat-completion-from-messages","pageMetadata":{"title":"Generate OpenAI chat completion from messages","description":"Generates a chat completion from an OpenAI-style `messages` array.\n\nUse this endpoint for standard messages-based chat inference; use /v5/completions instead when you\nhave a raw text `prompt` rather than messages, /v5/responses for the OpenAI Responses API contract,\nand /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI\nChat Completions parameters plus a fixed set of vendor generation parameters such as `top_k`,\n`guided_choice`, and `thinking`; other extra fields are dropped, and fields that set the provider\nendpoint, credentials, or headers (for example `api_base`, `api_key`, `extra_headers`) are rejected\nwith a 422. The model is selected from `model` given as `vendor/name`; most vendors are served\nthrough the litellm proxy gateway, while\nOpenAI may use a native gateway. When `stream` is set the response is delivered as server-sent events\nof `chat.completion.chunk`; otherwise a single `chat.completion` object is returned. Token usage is\nrecorded for the account, and for streaming responses it is read from the final chunk.","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/chat/completions","href":"/reference/v5/inference/generate-openai-chat-completion-from-messages","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Generates a chat completion from an OpenAI-style \", _jsx(_components.code, {\n children: \"messages\"\n }), \" array.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you\\nhave a raw text \", _jsx(_components.code, {\n children: \"prompt\"\n }), \" rather than messages, /v5/responses for the OpenAI Responses API contract,\\nand /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI\\nChat Completions parameters plus a fixed set of vendor generation parameters such as \", _jsx(_components.code, {\n children: \"top_k\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"guided_choice\"\n }), \", and \", _jsx(_components.code, {\n children: \"thinking\"\n }), \"; other extra fields are dropped, and fields that set the provider\\nendpoint, credentials, or headers (for example \", _jsx(_components.code, {\n children: \"api_base\"\n }), \", \", _jsx(_components.code, {\n children: \"api_key\"\n }), \", \", _jsx(_components.code, {\n children: \"extra_headers\"\n }), \") are rejected\\nwith a 422. The model is selected from \", _jsx(_components.code, {\n children: \"model\"\n }), \" given as \", _jsx(_components.code, {\n children: \"vendor/name\"\n }), \"; most vendors are served\\nthrough the litellm proxy gateway, while\\nOpenAI may use a native gateway. When \", _jsx(_components.code, {\n children: \"stream\"\n }), \" is set the response is delivered as server-sent events\\nof \", _jsx(_components.code, {\n children: \"chat.completion.chunk\"\n }), \"; otherwise a single \", _jsx(_components.code, {\n children: \"chat.completion\"\n }), \" object is returned. Token usage is\\nrecorded for the account, and for streaming responses it is read from the final chunk.\"]\n })]\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":"Generate OpenAI chat completion from messages","description":"Generates a chat completion from an OpenAI-style `messages` array.\n\nUse this endpoint for standard messages-based chat inference; use /v5/completions instead when you\nhave a raw text `prompt` rather than messages, /v5/responses for the OpenAI Responses API contract,\nand /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI\nChat Completions parameters plus a fixed set of vendor generation parameters such as `top_k`,\n`guided_choice`, and `thinking`; other extra fields are dropped, and fields that set the provider\nendpoint, credentials, or headers (for example `api_base`, `api_key`, `extra_headers`) are rejected\nwith a 422. The model is selected from `model` given as `vendor/name`; most vendors are served\nthrough the litellm proxy gateway, while\nOpenAI may use a native gateway. When `stream` is set the response is delivered as server-sent events\nof `chat.completion.chunk`; otherwise a single `chat.completion` object is returned. Token usage is\nrecorded for the account, and for streaming responses it is read from the final chunk.","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/chat/completions","href":"/reference/v5/inference/generate-openai-chat-completion-from-messages","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Inference"],"summary":"Generate OpenAI chat completion from messages","description":"Generates a chat completion from an OpenAI-style `messages` array.\n\nUse this endpoint for standard messages-based chat inference; use /v5/completions instead when you\nhave a raw text `prompt` rather than messages, /v5/responses for the OpenAI Responses API contract,\nand /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI\nChat Completions parameters plus a fixed set of vendor generation parameters such as `top_k`,\n`guided_choice`, and `thinking`; other extra fields are dropped, and fields that set the provider\nendpoint, credentials, or headers (for example `api_base`, `api_key`, `extra_headers`) are rejected\nwith a 422. The model is selected from `model` given as `vendor/name`; most vendors are served\nthrough the litellm proxy gateway, while\nOpenAI may use a native gateway. When `stream` is set the response is delivered as server-sent events\nof `chat.completion.chunk`; otherwise a single `chat.completion` object is returned. Token usage is\nrecorded for the account, and for streaming responses it is read from the final chunk.","operationId":"POST-V5-/v5/chat/completions","security":["49ae086e-f326-4b9a-a414-6e3d56070dd0"],"parameters":["aed98d68-cd5e-4323-b961-3c9560f6816b","eac443e9-cb78-4aac-a242-ba3debaad4dc","feba5245-8d67-4cc8-9fd5-9959e857258b"],"requestBody":"5e937b5a-4791-4d07-9446-9f968af18459","responses":{"200":"9b3835ab-769c-42ba-aa84-ac880e93aaec","422":"41019233-b545-41c0-8c12-140639545287"},"method":"post","type":"path","servers":["53d4b40c-6ecb-41f0-8721-9b4723f67775"],"path":"/v5/chat/completions","baseUrlOptions":["https://api.egp.scale.com"],"title":"Generate OpenAI chat completion from messages","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"aed98d68-cd5e-4323-b961-3c9560f6816b":{"name":"x-api-key","in":"header","required":false,"schema":{"oneOf":[{"type":"string","title":"X-Api-Key","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"X-Api-Key","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}},"eac443e9-cb78-4aac-a242-ba3debaad4dc":{"name":"x-openai-api-key","in":"header","required":false,"schema":{"oneOf":[{"type":"string","title":"X-Openai-Api-Key","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"X-Openai-Api-Key","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}},"feba5245-8d67-4cc8-9fd5-9959e857258b":{"name":"x-selected-account-id","in":"header","required":false,"schema":{"oneOf":[{"type":"string","title":"Account ID Header","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Account ID Header","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"model":{"type":"string","title":"Model","description":"model specified as `model_vendor/model`, for example `openai/gpt-4o`","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"items":{"additionalProperties":true,"type":"object","uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"type":"array","title":"Messages","description":"openai standard message format","isRequired":true,"uniqueKey":"messages","typeLabel":"Messages · object[]"},"top_k":{"oneOf":[{"type":"integer","title":"Top K","description":"Only sample from the top K options for each subsequent token","uniqueKey":"top_k.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Top K","description":"Only sample from the top K options for each subsequent token","uniqueKey":"top_k.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_k","typeLabel":"integer | null"},"frequency_penalty":{"oneOf":[{"type":"number","title":"Frequency Penalty","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far.","maximum":2,"minimum":-2,"uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Frequency Penalty","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far.","uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"function_call":{"oneOf":[{"type":"object","title":"Function Call","description":"Deprecated in favor of tool_choice. Controls which function is called by the model.","additionalProperties":true,"uniqueKey":"function_call.oneOf.0","typeLabel":"Function Call · object"},{"type":"null","title":"Function Call","description":"Deprecated in favor of tool_choice. Controls which function is called by the model.","uniqueKey":"function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"function_call","typeLabel":"Function Call · object | null"},"functions":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"functions.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Functions","description":"Deprecated in favor of tools. A list of functions the model may generate JSON inputs for.","uniqueKey":"functions.oneOf.0","typeLabel":"Functions · object[]"},{"type":"null","title":"Functions","description":"Deprecated in favor of tools. A list of functions the model may generate JSON inputs for.","uniqueKey":"functions.oneOf.1","typeLabel":"null"}],"uniqueKey":"functions","typeLabel":"Functions · object[] | null"},"logit_bias":{"oneOf":[{"type":"object","title":"Logit Bias","description":"Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.","additionalProperties":{"type":"integer","uniqueKey":"logit_bias.oneOf.0.additionalProperties","typeLabel":"integer"},"uniqueKey":"logit_bias.oneOf.0","typeLabel":"Logit Bias · object"},{"type":"null","title":"Logit Bias","description":"Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.","uniqueKey":"logit_bias.oneOf.1","typeLabel":"null"}],"uniqueKey":"logit_bias","typeLabel":"Logit Bias · object | null"},"logprobs":{"oneOf":[{"type":"boolean","title":"Logprobs","description":"Whether to return log probabilities of the output tokens or not.","uniqueKey":"logprobs.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Logprobs","description":"Whether to return log probabilities of the output tokens or not.","uniqueKey":"logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"logprobs","typeLabel":"boolean | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","title":"Max Completion Tokens","description":"An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.","uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Completion Tokens","description":"An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.","uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"max_tokens":{"oneOf":[{"type":"integer","title":"Max Tokens","description":"Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate.","uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Tokens","description":"Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate.","uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"metadata":{"oneOf":[{"type":"object","title":"Metadata","description":"Developer-defined tags and values used for filtering completions in the dashboard.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"metadata.oneOf.0.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"metadata.oneOf.0.additionalProperties.oneOf.1.items.[INDEX]","typeLabel":"string"},"uniqueKey":"metadata.oneOf.0.additionalProperties.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"metadata.oneOf.0.additionalProperties","typeLabel":"string | string[]"},"uniqueKey":"metadata.oneOf.0","typeLabel":"Metadata · object"},{"type":"null","title":"Metadata","description":"Developer-defined tags and values used for filtering completions in the dashboard.","uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"Metadata · object | null"},"modalities":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"modalities.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Modalities","description":"Output types that you would like the model to generate for this request.","uniqueKey":"modalities.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Modalities","description":"Output types that you would like the model to generate for this request.","uniqueKey":"modalities.oneOf.1","typeLabel":"null"}],"uniqueKey":"modalities","typeLabel":"string[] | null"},"n":{"oneOf":[{"type":"integer","title":"N","description":"How many chat completion choices to generate for each input message.","uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","title":"N","description":"How many chat completion choices to generate for each input message.","uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"parallel_tool_calls":{"oneOf":[{"type":"boolean","title":"Parallel Tool Calls","description":"Whether to enable parallel function calling during tool use.","uniqueKey":"parallel_tool_calls.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Parallel Tool Calls","description":"Whether to enable parallel function calling during tool use.","uniqueKey":"parallel_tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"parallel_tool_calls","typeLabel":"boolean | null"},"prediction":{"oneOf":[{"type":"object","title":"Prediction","description":"Static predicted output content, such as the content of a text file being regenerated.","additionalProperties":true,"uniqueKey":"prediction.oneOf.0","typeLabel":"Prediction · object"},{"type":"null","title":"Prediction","description":"Static predicted output content, such as the content of a text file being regenerated.","uniqueKey":"prediction.oneOf.1","typeLabel":"null"}],"uniqueKey":"prediction","typeLabel":"Prediction · object | null"},"presence_penalty":{"oneOf":[{"type":"number","title":"Presence Penalty","description":"Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.","maximum":2,"minimum":-2,"uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Presence Penalty","description":"Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.","uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"reasoning_effort":{"oneOf":[{"type":"string","title":"Reasoning Effort","description":"For o1 models only. Constrains effort on reasoning. Values: low, medium, high.","uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reasoning Effort","description":"For o1 models only. Constrains effort on reasoning. Values: low, medium, high.","uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"reasoning_effort","typeLabel":"string | null"},"response_format":{"oneOf":[{"type":"object","title":"Response Format","description":"An object specifying the format that the model must output.","additionalProperties":true,"uniqueKey":"response_format.oneOf.0","typeLabel":"Response Format · object"},{"type":"null","title":"Response Format","description":"An object specifying the format that the model must output.","uniqueKey":"response_format.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format","typeLabel":"Response Format · object | null"},"seed":{"oneOf":[{"type":"integer","title":"Seed","description":"If specified, system will attempt to sample deterministically for repeated requests with same seed.","uniqueKey":"seed.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Seed","description":"If specified, system will attempt to sample deterministically for repeated requests with same seed.","uniqueKey":"seed.oneOf.1","typeLabel":"null"}],"uniqueKey":"seed","typeLabel":"integer | null"},"stop":{"oneOf":[{"type":"string","title":"Stop","description":"Up to 4 sequences where the API will stop generating further tokens.","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Stop","description":"Up to 4 sequences where the API will stop generating further tokens.","uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Stop","description":"Up to 4 sequences where the API will stop generating further tokens.","uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"store":{"oneOf":[{"type":"boolean","title":"Store","description":"Whether to store the output for use in model distillation or evals products.","uniqueKey":"store.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Store","description":"Whether to store the output for use in model distillation or evals products.","uniqueKey":"store.oneOf.1","typeLabel":"null"}],"uniqueKey":"store","typeLabel":"boolean | null"},"stream":{"oneOf":[{"type":"boolean","title":"Stream","description":"If true, partial message deltas will be sent as server-sent events.","uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Stream","description":"If true, partial message deltas will be sent as server-sent events.","uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stream_options":{"oneOf":[{"type":"object","title":"Stream Options","description":"Options for streaming response. Only set this when stream is true.","additionalProperties":true,"uniqueKey":"stream_options.oneOf.0","typeLabel":"Stream Options · object"},{"type":"null","title":"Stream Options","description":"Options for streaming response. Only set this when stream is true.","uniqueKey":"stream_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options","typeLabel":"Stream Options · object | null"},"temperature":{"oneOf":[{"type":"number","title":"Temperature","description":"What sampling temperature to use. Higher values make output more random, lower more focused.","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","title":"Temperature","description":"What sampling temperature to use. Higher values make output more random, lower more focused.","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"tool_choice":{"oneOf":[{"type":"string","title":"Tool Choice","description":"Controls which tool is called by the model. Values: none, auto, required, or specific tool.","uniqueKey":"tool_choice.oneOf.0","typeLabel":"string"},{"type":"object","title":"Tool Choice","description":"Controls which tool is called by the model. Values: none, auto, required, or specific tool.","additionalProperties":true,"uniqueKey":"tool_choice.oneOf.1","typeLabel":"Tool Choice · object"},{"type":"null","title":"Tool Choice","description":"Controls which tool is called by the model. Values: none, auto, required, or specific tool.","uniqueKey":"tool_choice.oneOf.2","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"string | Tool Choice · object | null"},"tools":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Tools","description":"A list of tools the model may call. Currently, only functions are supported. Max 128 functions.","uniqueKey":"tools.oneOf.0","typeLabel":"Tools · object[]"},{"type":"null","title":"Tools","description":"A list of tools the model may call. Currently, only functions are supported. Max 128 functions.","uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"Tools · object[] | null"},"top_logprobs":{"oneOf":[{"type":"integer","title":"Top Logprobs","description":"Number of most likely tokens to return at each position, with associated log probability.","maximum":20,"minimum":0,"uniqueKey":"top_logprobs.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Top Logprobs","description":"Number of most likely tokens to return at each position, with associated log probability.","uniqueKey":"top_logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_logprobs","typeLabel":"integer | null"},"top_p":{"oneOf":[{"type":"number","title":"Top P","description":"Alternative to temperature. Only tokens comprising top_p probability mass are considered.","maximum":1,"minimum":0,"uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","title":"Top P","description":"Alternative to temperature. Only tokens comprising top_p probability mass are considered.","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"audio":{"oneOf":[{"type":"object","title":"Audio","description":"Parameters for audio output. Required when audio output is requested with modalities: ['audio'].","additionalProperties":true,"uniqueKey":"audio.oneOf.0","typeLabel":"Audio · object"},{"type":"null","title":"Audio","description":"Parameters for audio output. Required when audio output is requested with modalities: ['audio'].","uniqueKey":"audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"audio","typeLabel":"Audio · object | null"}},"additionalProperties":true,"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","uniqueKey":"","typeLabel":"ChatCompletionRequest · object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{}],"top_k":123,"frequency_penalty":0,"function_call":{},"functions":[{}],"logit_bias":{},"logprobs":true,"max_completion_tokens":123,"max_tokens":123,"metadata":{},"modalities":["\u003cstring>"],"n":123,"parallel_tool_calls":true,"prediction":{},"presence_penalty":0,"reasoning_effort":"\u003cstring>","response_format":{},"seed":123,"stop":"\u003cstring>","store":true,"stream":true,"stream_options":{},"temperature":1,"tool_choice":"\u003cstring>","tools":[{}],"top_logprobs":10,"top_p":0.5,"audio":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"9b3835ab-769c-42ba-aa84-ac880e93aaec":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Response Post-V5-/V5/Chat/Completions","required":["id","choices","created","model"],"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"},"choices":{"items":{"properties":{"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"],"title":"Finish Reason","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"},"index":{"type":"integer","title":"Index","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].index","typeLabel":"integer"},"message":{"properties":{"role":{"type":"string","const":"assistant","title":"Role","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","title":"Content","uniqueKey":"oneOf.0.choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","title":"Content","uniqueKey":"oneOf.0.choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.content","typeLabel":"string | null"},"refusal":{"oneOf":[{"type":"string","title":"Refusal","uniqueKey":"oneOf.0.choices.items.[INDEX].message.refusal.oneOf.0","typeLabel":"string"},{"type":"null","title":"Refusal","uniqueKey":"oneOf.0.choices.items.[INDEX].message.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.refusal","typeLabel":"string | null"},"annotations":{"oneOf":[{"type":"array","items":{"properties":{"type":{"type":"string","const":"url_citation","title":"Type","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].type","typeLabel":"string"},"url_citation":{"properties":{"end_index":{"type":"integer","title":"End Index","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].url_citation.end_index","typeLabel":"integer"},"start_index":{"type":"integer","title":"Start Index","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].url_citation.start_index","typeLabel":"integer"},"title":{"type":"string","title":"Title","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].url_citation.title","typeLabel":"string"},"url":{"type":"string","title":"Url","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].url_citation.url","typeLabel":"string"}},"additionalProperties":true,"type":"object","required":["end_index","start_index","title","url"],"title":"AnnotationURLCitation","description":"A URL citation when using web search.","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX].url_citation","typeLabel":"AnnotationURLCitation · object"}},"additionalProperties":true,"type":"object","required":["type","url_citation"],"title":"Annotation","description":"A URL citation when using web search.","uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0.items.[INDEX]","typeLabel":"Annotation · object"},"title":"Annotations","uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.0","typeLabel":"Annotation · object[]"},{"type":"null","title":"Annotations","uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.annotations","typeLabel":"Annotation · object[] | null"},"audio":{"oneOf":[{"type":"object","title":"ChatCompletionAudio","description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio).","required":["id","data","expires_at","transcript"],"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.0.id","typeLabel":"string"},"data":{"type":"string","title":"Data","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.0.data","typeLabel":"string"},"expires_at":{"type":"integer","title":"Expires At","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.0.expires_at","typeLabel":"integer"},"transcript":{"type":"string","title":"Transcript","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.0.transcript","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.0","typeLabel":"ChatCompletionAudio · object"},{"type":"null","uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.audio","typeLabel":"ChatCompletionAudio · object | null"},"function_call":{"oneOf":[{"type":"object","title":"FunctionCall","description":"Deprecated and replaced by `tool_calls`.\n\nThe name and arguments of a function that should be called, as generated by the model.","required":["arguments","name"],"properties":{"arguments":{"type":"string","title":"Arguments","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.function_call.oneOf.0.arguments","typeLabel":"string"},"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.function_call.oneOf.0.name","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.function_call.oneOf.0","typeLabel":"FunctionCall · object"},{"type":"null","uniqueKey":"oneOf.0.choices.items.[INDEX].message.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.function_call","typeLabel":"FunctionCall · object | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"oneOf":[{"type":"object","title":"ChatCompletionMessageFunctionToolCall","description":"A call to a function tool created by the model.","required":["id","function","type"],"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0.id","typeLabel":"string"},"function":{"properties":{"arguments":{"type":"string","title":"Arguments","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0.function.arguments","typeLabel":"string"},"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0.function.name","typeLabel":"string"}},"additionalProperties":true,"type":"object","required":["arguments","name"],"title":"Function","description":"The function that the model called.","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0.function","typeLabel":"Function · object"},"type":{"type":"string","const":"function","title":"Type","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"ChatCompletionMessageFunctionToolCall · object"},{"type":"object","title":"ChatCompletionMessageCustomToolCall","description":"A call to a custom tool created by the model.","required":["id","custom","type"],"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1.id","typeLabel":"string"},"custom":{"properties":{"input":{"type":"string","title":"Input","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1.custom.input","typeLabel":"string"},"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1.custom.name","typeLabel":"string"}},"additionalProperties":true,"type":"object","required":["input","name"],"title":"Custom","description":"The custom tool that the model called.","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1.custom","typeLabel":"Custom · object"},"type":{"type":"string","const":"custom","title":"Type","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"ChatCompletionMessageCustomToolCall · object"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"ChatCompletionMessageFunctionToolCall · object | ChatCompletionMessageCustomToolCall · object"},"title":"Tool Calls","uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.0","typeLabel":"(ChatCompletionMessageFunctionToolCall · object | ChatCompletionMessageCustomToolCall · object)[]"},{"type":"null","title":"Tool Calls","uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls","typeLabel":"(ChatCompletionMessageFunctionToolCall · object | ChatCompletionMessageCustomToolCall · object)[] | null"}},"additionalProperties":true,"type":"object","required":["role"],"title":"ChatCompletionMessage","description":"A chat completion message generated by the model.","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].message","typeLabel":"ChatCompletionMessage · object"},"logprobs":{"oneOf":[{"type":"object","title":"ChoiceLogprobs","description":"Log probability information for the choice.","properties":{"content":{"oneOf":[{"type":"array","items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"top_logprobs":{"items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob"],"title":"TopLogprob","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"TopLogprob · object"},"type":"array","title":"Top Logprobs","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"TopLogprob · object[]"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob","top_logprobs"],"title":"ChatCompletionTokenLogprob","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"ChatCompletionTokenLogprob · object"},"title":"Content","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"ChatCompletionTokenLogprob · object[]"},{"type":"null","title":"Content","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"ChatCompletionTokenLogprob · object[] | null"},"refusal":{"oneOf":[{"type":"array","items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"top_logprobs":{"items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob"],"title":"TopLogprob","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"TopLogprob · object"},"type":"array","title":"Top Logprobs","isRequired":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"TopLogprob · object[]"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob","top_logprobs"],"title":"ChatCompletionTokenLogprob","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX]","typeLabel":"ChatCompletionTokenLogprob · object"},"title":"Refusal","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0","typeLabel":"ChatCompletionTokenLogprob · object[]"},{"type":"null","title":"Refusal","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0.refusal","typeLabel":"ChatCompletionTokenLogprob · object[] | null"}},"additionalProperties":true,"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"ChoiceLogprobs · object"},{"type":"null","uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].logprobs","typeLabel":"ChoiceLogprobs · object | null"}},"additionalProperties":true,"type":"object","required":["finish_reason","index","message"],"title":"Choice","uniqueKey":"oneOf.0.choices.items.[INDEX]","typeLabel":"Choice · object"},"type":"array","title":"Choices","isRequired":true,"uniqueKey":"oneOf.0.choices","typeLabel":"Choice · object[]"},"created":{"type":"integer","title":"Created","isRequired":true,"uniqueKey":"oneOf.0.created","typeLabel":"integer"},"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"oneOf.0.model","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","title":"Object","default":"chat.completion","uniqueKey":"oneOf.0.object","typeLabel":"string"},"service_tier":{"oneOf":[{"type":"string","title":"Service Tier","enum":["auto","default","flex","scale","priority"],"uniqueKey":"oneOf.0.service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Service Tier","uniqueKey":"oneOf.0.service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.service_tier","typeLabel":"enum\u003cstring> | null"},"system_fingerprint":{"oneOf":[{"type":"string","title":"System Fingerprint","uniqueKey":"oneOf.0.system_fingerprint.oneOf.0","typeLabel":"string"},{"type":"null","title":"System Fingerprint","uniqueKey":"oneOf.0.system_fingerprint.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.system_fingerprint","typeLabel":"string | null"},"usage":{"oneOf":[{"type":"object","title":"CompletionUsage","description":"Usage statistics for the completion request.","required":["completion_tokens","prompt_tokens","total_tokens"],"properties":{"completion_tokens":{"type":"integer","title":"Completion Tokens","isRequired":true,"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","isRequired":true,"uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","title":"Total Tokens","isRequired":true,"uniqueKey":"oneOf.0.usage.oneOf.0.total_tokens","typeLabel":"integer"},"completion_tokens_details":{"oneOf":[{"type":"object","title":"CompletionTokensDetails","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"oneOf":[{"type":"integer","title":"Accepted Prediction Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Accepted Prediction Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens","typeLabel":"integer | null"},"audio_tokens":{"oneOf":[{"type":"integer","title":"Audio Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Audio Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens","typeLabel":"integer | null"},"reasoning_tokens":{"oneOf":[{"type":"integer","title":"Reasoning Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Reasoning Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"integer | null"},"rejected_prediction_tokens":{"oneOf":[{"type":"integer","title":"Rejected Prediction Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Rejected Prediction Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens","typeLabel":"integer | null"}},"additionalProperties":true,"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.0","typeLabel":"CompletionTokensDetails · object"},{"type":"null","uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.completion_tokens_details","typeLabel":"CompletionTokensDetails · object | null"},"prompt_tokens_details":{"oneOf":[{"type":"object","title":"PromptTokensDetails","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"oneOf":[{"type":"integer","title":"Audio Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Audio Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens","typeLabel":"integer | null"},"cached_tokens":{"oneOf":[{"type":"integer","title":"Cached Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Cached Tokens","uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens","typeLabel":"integer | null"}},"additionalProperties":true,"uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.0","typeLabel":"PromptTokensDetails · object"},{"type":"null","uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage.oneOf.0.prompt_tokens_details","typeLabel":"PromptTokensDetails · object | null"}},"additionalProperties":true,"uniqueKey":"oneOf.0.usage.oneOf.0","typeLabel":"CompletionUsage · object"},{"type":"null","uniqueKey":"oneOf.0.usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.usage","typeLabel":"CompletionUsage · object | null"}},"additionalProperties":true,"uniqueKey":"oneOf.0","typeLabel":"Response Post-V5-/V5/Chat/Completions · object"},{"type":"object","title":"Response Post-V5-/V5/Chat/Completions","required":["id","choices","created","model"],"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"oneOf.1.id","typeLabel":"string"},"choices":{"items":{"properties":{"delta":{"properties":{"content":{"oneOf":[{"type":"string","title":"Content","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.content.oneOf.0","typeLabel":"string"},{"type":"null","title":"Content","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.content","typeLabel":"string | null"},"function_call":{"oneOf":[{"type":"object","title":"ChoiceDeltaFunctionCall","description":"Deprecated and replaced by `tool_calls`.\n\nThe name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"oneOf":[{"type":"string","title":"Arguments","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.arguments.oneOf.0","typeLabel":"string"},{"type":"null","title":"Arguments","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.arguments.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.arguments","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","title":"Name","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0.name","typeLabel":"string | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.0","typeLabel":"ChoiceDeltaFunctionCall · object"},{"type":"null","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.function_call","typeLabel":"ChoiceDeltaFunctionCall · object | null"},"refusal":{"oneOf":[{"type":"string","title":"Refusal","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.refusal.oneOf.0","typeLabel":"string"},{"type":"null","title":"Refusal","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.refusal","typeLabel":"string | null"},"role":{"oneOf":[{"type":"string","title":"Role","enum":["developer","system","user","assistant","tool"],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.role.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Role","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.role.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.role","typeLabel":"enum\u003cstring> | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"properties":{"index":{"type":"integer","title":"Index","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].index","typeLabel":"integer"},"id":{"oneOf":[{"type":"string","title":"Id","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Id","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].id","typeLabel":"string | null"},"function":{"oneOf":[{"type":"object","title":"ChoiceDeltaToolCallFunction","properties":{"arguments":{"oneOf":[{"type":"string","title":"Arguments","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.arguments.oneOf.0","typeLabel":"string"},{"type":"null","title":"Arguments","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.arguments.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.arguments","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","title":"Name","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0.name","typeLabel":"string | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.0","typeLabel":"ChoiceDeltaToolCallFunction · object"},{"type":"null","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].function","typeLabel":"ChoiceDeltaToolCallFunction · object | null"},"type":{"oneOf":[{"type":"string","title":"Type","const":"function","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Type","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX].type","typeLabel":"string | null"}},"additionalProperties":true,"type":"object","required":["index"],"title":"ChoiceDeltaToolCall","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"ChoiceDeltaToolCall · object"},"title":"Tool Calls","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.0","typeLabel":"ChoiceDeltaToolCall · object[]"},{"type":"null","title":"Tool Calls","uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].delta.tool_calls","typeLabel":"ChoiceDeltaToolCall · object[] | null"}},"additionalProperties":true,"type":"object","title":"ChoiceDelta","description":"A chat completion delta generated by streamed model responses.","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].delta","typeLabel":"ChoiceDelta · object"},"index":{"type":"integer","title":"Index","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"oneOf":[{"type":"string","title":"Finish Reason","enum":["stop","length","tool_calls","content_filter","function_call"],"uniqueKey":"oneOf.1.choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Finish Reason","uniqueKey":"oneOf.1.choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"},"logprobs":{"oneOf":[{"type":"object","title":"ChoiceLogprobs","description":"Log probability information for the choice.","properties":{"content":{"oneOf":[{"type":"array","items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"top_logprobs":{"items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob"],"title":"TopLogprob","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"TopLogprob · object"},"type":"array","title":"Top Logprobs","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"TopLogprob · object[]"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob","top_logprobs"],"title":"ChatCompletionTokenLogprob","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"ChatCompletionTokenLogprob · object"},"title":"Content","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"ChatCompletionTokenLogprob · object[]"},{"type":"null","title":"Content","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"ChatCompletionTokenLogprob · object[] | null"},"refusal":{"oneOf":[{"type":"array","items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"top_logprobs":{"items":{"properties":{"token":{"type":"string","title":"Token","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","title":"Logprob","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob"],"title":"TopLogprob","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"TopLogprob · object"},"type":"array","title":"Top Logprobs","isRequired":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"TopLogprob · object[]"},"bytes":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Bytes","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"additionalProperties":true,"type":"object","required":["token","logprob","top_logprobs"],"title":"ChatCompletionTokenLogprob","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX]","typeLabel":"ChatCompletionTokenLogprob · object"},"title":"Refusal","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0","typeLabel":"ChatCompletionTokenLogprob · object[]"},{"type":"null","title":"Refusal","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0.refusal","typeLabel":"ChatCompletionTokenLogprob · object[] | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"ChoiceLogprobs · object"},{"type":"null","uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.choices.items.[INDEX].logprobs","typeLabel":"ChoiceLogprobs · object | null"}},"additionalProperties":true,"type":"object","required":["delta","index"],"title":"Choice","uniqueKey":"oneOf.1.choices.items.[INDEX]","typeLabel":"Choice · object"},"type":"array","title":"Choices","isRequired":true,"uniqueKey":"oneOf.1.choices","typeLabel":"Choice · object[]"},"created":{"type":"integer","title":"Created","isRequired":true,"uniqueKey":"oneOf.1.created","typeLabel":"integer"},"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"oneOf.1.model","typeLabel":"string"},"object":{"type":"string","const":"chat.completion.chunk","title":"Object","default":"chat.completion.chunk","uniqueKey":"oneOf.1.object","typeLabel":"string"},"service_tier":{"oneOf":[{"type":"string","title":"Service Tier","enum":["auto","default","flex","scale","priority"],"uniqueKey":"oneOf.1.service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Service Tier","uniqueKey":"oneOf.1.service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.service_tier","typeLabel":"enum\u003cstring> | null"},"system_fingerprint":{"oneOf":[{"type":"string","title":"System Fingerprint","uniqueKey":"oneOf.1.system_fingerprint.oneOf.0","typeLabel":"string"},{"type":"null","title":"System Fingerprint","uniqueKey":"oneOf.1.system_fingerprint.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.system_fingerprint","typeLabel":"string | null"},"usage":{"oneOf":[{"type":"object","title":"CompletionUsage","description":"Usage statistics for the completion request.","required":["completion_tokens","prompt_tokens","total_tokens"],"properties":{"completion_tokens":{"type":"integer","title":"Completion Tokens","isRequired":true,"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","isRequired":true,"uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","title":"Total Tokens","isRequired":true,"uniqueKey":"oneOf.1.usage.oneOf.0.total_tokens","typeLabel":"integer"},"completion_tokens_details":{"oneOf":[{"type":"object","title":"CompletionTokensDetails","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"oneOf":[{"type":"integer","title":"Accepted Prediction Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Accepted Prediction Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.accepted_prediction_tokens","typeLabel":"integer | null"},"audio_tokens":{"oneOf":[{"type":"integer","title":"Audio Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Audio Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.audio_tokens","typeLabel":"integer | null"},"reasoning_tokens":{"oneOf":[{"type":"integer","title":"Reasoning Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Reasoning Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"integer | null"},"rejected_prediction_tokens":{"oneOf":[{"type":"integer","title":"Rejected Prediction Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Rejected Prediction Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0.rejected_prediction_tokens","typeLabel":"integer | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.0","typeLabel":"CompletionTokensDetails · object"},{"type":"null","uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.completion_tokens_details","typeLabel":"CompletionTokensDetails · object | null"},"prompt_tokens_details":{"oneOf":[{"type":"object","title":"PromptTokensDetails","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"oneOf":[{"type":"integer","title":"Audio Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Audio Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.audio_tokens","typeLabel":"integer | null"},"cached_tokens":{"oneOf":[{"type":"integer","title":"Cached Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Cached Tokens","uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0.cached_tokens","typeLabel":"integer | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.0","typeLabel":"PromptTokensDetails · object"},{"type":"null","uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage.oneOf.0.prompt_tokens_details","typeLabel":"PromptTokensDetails · object | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1.usage.oneOf.0","typeLabel":"CompletionUsage · object"},{"type":"null","uniqueKey":"oneOf.1.usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.usage","typeLabel":"CompletionUsage · object | null"}},"additionalProperties":true,"uniqueKey":"oneOf.1","typeLabel":"Response Post-V5-/V5/Chat/Completions · object"}],"uniqueKey":"","typeLabel":"Response Post-V5-/V5/Chat/Completions · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","choices":[{"finish_reason":"stop","index":123,"message":{"role":"assistant","content":"\u003cstring>","refusal":"\u003cstring>","annotations":[{"type":"url_citation","url_citation":{"end_index":123,"start_index":123,"title":"\u003cstring>","url":"\u003cstring>"}}],"audio":{"id":"\u003cstring>","data":"\u003cstring>","expires_at":123,"transcript":"\u003cstring>"},"function_call":{"arguments":"\u003cstring>","name":"\u003cstring>"},"tool_calls":[{"id":"\u003cstring>","function":{"arguments":"\u003cstring>","name":"\u003cstring>"},"type":"function"}]},"logprobs":{"content":[{"token":"\u003cstring>","logprob":123,"top_logprobs":[{"token":"\u003cstring>","logprob":123,"bytes":[123]}],"bytes":[123]}],"refusal":[{"token":"\u003cstring>","logprob":123,"top_logprobs":[{"token":"\u003cstring>","logprob":123,"bytes":[123]}],"bytes":[123]}]}}],"created":123,"model":"\u003cstring>","object":"chat.completion","service_tier":"auto","system_fingerprint":"\u003cstring>","usage":{"completion_tokens":123,"prompt_tokens":123,"total_tokens":123,"completion_tokens_details":{"accepted_prediction_tokens":123,"audio_tokens":123,"reasoning_tokens":123,"rejected_prediction_tokens":123},"prompt_tokens_details":{"audio_tokens":123,"cached_tokens":123}}}}},"exampleType":"generated"}},"exampleType":"generated"},"41019233-b545-41c0-8c12-140639545287":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"input":{"oneOf":[{"title":"Input"}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"},"ctx":{"type":"object","title":"Context","additionalProperties":true,"uniqueKey":"detail.items.[INDEX].ctx","typeLabel":"Context · object"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","input":"\u003cunknown>","ctx":{}}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"49ae086e-f326-4b9a-a414-6e3d56070dd0":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"APIKeyHeader"}}},"servers":{"53d4b40c-6ecb-41f0-8721-9b4723f67775":{"url":"https://api.egp.scale.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"APIKeyHeader"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"x-api-key"}],"title":"APIKeyHeader"}]},"originalFileLocation":"openapi/v5.yaml"},"subdomain":"scalegp","siteName":"Scale AI","title":"Generate OpenAI chat completion from messages - Scale AI","navMaps":{"firstHrefInVersion":{"V5":{"href":"/reference/v5/inference/generate-openai-chat-completion-from-messages","matchLevel":0},"V4 (legacy)":{"href":"/docs/inference/inference-overview","matchLevel":2}},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T21:11:36.819Z","originalFileLocation":"reference/v5/inference/generate-openai-chat-completion-from-messages.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=\"Generates a chat completion from an OpenAI-style messages array. Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k, guided_choice, and thinking; other extra fields are dropped, and fields that set the provider endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected with a 422. The model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Scale AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_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/scalegp/UksUEh3sxckFW0X-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate OpenAI chat completion from messages - Scale AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generates a chat completion from an OpenAI-style messages array. Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k, guided_choice, and thinking; other extra fields are dropped, and fields that set the provider endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected with a 422. The model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Scale AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://scalegp.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Generate+OpenAI+chat+completion+from+messages\u0026amp;description=Generates+a+chat+completion+from+an+OpenAI-style+%60messages%60+array.%0A%0AUse+this+endpoint+for+standard+messages-based+chat+inference%3B+use+%2Fv5%2Fcompletions+instead+wh\u0026amp;theme=b7e87dd2f9a2a23155199f59\u0026amp;signature=d1ab8d651d92c9d0c8a70e492c50fbfcc24dfb8fa3928516f14c7aaab8d90a99\">\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=\"Generate OpenAI chat completion from messages - Scale AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generates a chat completion from an OpenAI-style messages array. Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k, guided_choice, and thinking; other extra fields are dropped, and fields that set the provider endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected with a 422. The model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://scalegp.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Generate+OpenAI+chat+completion+from+messages\u0026amp;description=Generates+a+chat+completion+from+an+OpenAI-style+%60messages%60+array.%0A%0AUse+this+endpoint+for+standard+messages-based+chat+inference%3B+use+%2Fv5%2Fcompletions+instead+wh\u0026amp;theme=b7e87dd2f9a2a23155199f59\u0026amp;signature=d1ab8d651d92c9d0c8a70e492c50fbfcc24dfb8fa3928516f14c7aaab8d90a99\">\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/scalegp/UksUEh3sxckFW0X-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Scale AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3f2e7b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/v5/inference/generate-openai-chat-completion-from-messages.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gp.scale.com/#organization\",\"name\":\"Scale AI\",\"url\":\"https://docs.gp.scale.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/scalegp/TBmst1qiYXwYqUB5/logo/light.png?fit=max\u0026auto=format\u0026n=TBmst1qiYXwYqUB5\u0026q=85\u0026s=46027042c16b373ac463148db5ad1d6b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gp.scale.com#website\",\"name\":\"Scale AI\",\"url\":\"https://docs.gp.scale.com\",\"publisher\":{\"@id\":\"https://docs.gp.scale.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages#webpage\",\"url\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages\",\"name\":\"Generate OpenAI chat completion from messages\",\"description\":\"Generates a chat completion from an OpenAI-style messages array. Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k, guided_choice, and thinking; other extra fields are dropped, and fields that set the provider endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected with a 422. The model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.\",\"dateModified\":\"2026-11-05T21:11:36.819Z\",\"isPartOf\":{\"@id\":\"https://docs.gp.scale.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference\",\"item\":\"https://docs.gp.scale.com/reference/v5/inference/run-inference-with-free-form-payload\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate OpenAI chat completion from messages\",\"item\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages#apireference\",\"headline\":\"Generate OpenAI chat completion from messages\",\"name\":\"Generate OpenAI chat completion from messages\",\"description\":\"Generates a chat completion from an OpenAI-style messages array. Use this endpoint for standard messages-based chat inference; use /v5/completions instead when you have a raw text prompt rather than messages, /v5/responses for the OpenAI Responses API contract, and /v5/inference when the payload does not follow any OpenAI schema. The request accepts the OpenAI Chat Completions parameters plus a fixed set of vendor generation parameters such as top_k, guided_choice, and thinking; other extra fields are dropped, and fields that set the provider endpoint, credentials, or headers (for example api_base, api_key, extra_headers) are rejected with a 422. The model is selected from model given as vendor/name; most vendors are served through the litellm proxy gateway, while OpenAI may use a native gateway. When stream is set the response is delivered as server-sent events of chat.completion.chunk; otherwise a single chat.completion object is returned. Token usage is recorded for the account, and for streaming responses it is read from the final chunk.\",\"url\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gp.scale.com/reference/v5/inference/generate-openai-chat-completion-from-messages#webpage\"},\"dateModified\":\"2026-11-05T21:11:36.819Z\",\"publisher\":{\"@id\":\"https://docs.gp.scale.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gp.scale.com#website\"}}]}\u003c/script>","siteName":"Scale AI","nav":{"global":null,"versions":[{"version":"V5","tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/docs/v5/overview"}]},{"tab":"AgentOps API","groups":[{"group":"Inference","pages":[{"title":"Run inference with free-form payload","description":"Runs a model using a free-form, vendor-native request payload rather than a fixed OpenAI schema.\n\nUse this endpoint when the target model does not fit the OpenAI chat, responses, or\ntext-completion contracts: the `args` field is an arbitrary dict passed straight through to the\nselected vendor gateway, and the reply is returned inside `response` as arbitrary JSON (object,\narray, string, number, or boolean). Prefer /v5/chat/completions, /v5/responses, or /v5/completions\nwhen your request matches one of those OpenAI-standard shapes, since those return typed OpenAI\nresponse objects. The model is chosen from the `model` field formatted as `vendor/name`, which\nselects the per-vendor inference gateway. When the request enables streaming, the response is sent\nas server-sent events with each chunk wrapped as a `generic_inference.chunk` object; otherwise a\nsingle `generic_inference` object is returned.","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/inference","href":"/reference/v5/inference/run-inference-with-free-form-payload"},{"title":"Generate OpenAI chat completion from messages","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/chat/completions","href":"/reference/v5/inference/generate-openai-chat-completion-from-messages"},{"title":"Run OpenAI Responses API (OpenAI only)","description":"Runs inference using the OpenAI Responses API contract, taking an `input` rather than a chat `messages` array.\n\nThis endpoint is restricted to OpenAI-vendor models: requests whose `model` (`vendor/name`) resolves\nto any other vendor are rejected with an unsupported-vendor error, unlike /v5/chat/completions and\n/v5/inference which support many vendors. Use it when you specifically need Responses API features\nsuch as `previous_response_id` chaining, `instructions`, or `store`; use /v5/chat/completions for the\nstandard messages-based chat contract. When `stream` is set the response streams as server-sent\nevents; otherwise a single `response` object is returned.","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/responses","href":"/reference/v5/inference/run-openai-responses-api-openai-only"},{"title":"Generate legacy text completion from prompt","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/completions","href":"/reference/v5/inference/generate-legacy-text-completion-from-prompt"},{"title":"List available chat completion models","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/chat/completions/models","href":"/reference/v5/inference/list-available-chat-completion-models"}]},{"group":"Questions","pages":[{"title":"List questions","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/questions","href":"/reference/v5/questions/list-questions"},{"title":"Create a question","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/questions","href":"/reference/v5/questions/create-a-question"},{"title":"Get a question","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/questions/{question_id}","href":"/reference/v5/questions/get-a-question"},{"title":"Archive a question","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/questions/{question_id}","href":"/reference/v5/questions/archive-a-question"},{"title":"Update a question","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/questions/{question_id}","href":"/reference/v5/questions/update-a-question"},{"title":"Restore an archived question","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/questions/{question_id}/restore","href":"/reference/v5/questions/restore-an-archived-question"}]},{"group":"Rubrics","pages":[{"title":"List rubrics","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/rubrics","href":"/reference/v5/rubrics/list-rubrics"},{"title":"Create a rubric","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/rubrics","href":"/reference/v5/rubrics/create-a-rubric"},{"title":"Get a rubric","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/rubrics/{rubric_id}","href":"/reference/v5/rubrics/get-a-rubric"},{"title":"Archive a rubric","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/rubrics/{rubric_id}","href":"/reference/v5/rubrics/archive-a-rubric"},{"title":"Update or restore a rubric","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/rubrics/{rubric_id}","href":"/reference/v5/rubrics/update-or-restore-a-rubric"},{"title":"Add a criterion to a rubric","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/rubrics/{rubric_id}/criteria","href":"/reference/v5/rubrics/add-a-criterion-to-a-rubric"},{"title":"Update a criterion","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}","href":"/reference/v5/rubrics/update-a-criterion"},{"title":"List criterion versions","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}/versions","href":"/reference/v5/rubrics/list-criterion-versions"}]},{"group":"Vector Stores","pages":[{"title":"List Vector Stores","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/vector-stores","href":"/reference/v5/vector-stores/list-vector-stores"},{"title":"Create Vector Store","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/create","href":"/reference/v5/vector-stores/create-vector-store"},{"title":"Get Vector Store","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/vector-stores/{vector_store_name}","href":"/reference/v5/vector-stores/get-vector-store"},{"title":"Configure Vector Store","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/configure","href":"/reference/v5/vector-stores/configure-vector-store"},{"title":"Drop Vector Store","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/drop","href":"/reference/v5/vector-stores/drop-vector-store"},{"title":"Upsert Vectors","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/upsert","href":"/reference/v5/vector-stores/upsert-vectors"},{"title":"Delete Vectors","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/delete","href":"/reference/v5/vector-stores/delete-vectors"},{"title":"List Vectors","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/vector-stores/{vector_store_name}/vectors","href":"/reference/v5/vector-stores/list-vectors"},{"title":"Get Vector","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/vector-stores/{vector_store_name}/vectors/{vector_id}","href":"/reference/v5/vector-stores/get-vector"},{"title":"Count Vectors","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/count","href":"/reference/v5/vector-stores/count-vectors"},{"title":"Query Vectors","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/vector-stores/{vector_store_name}/query","href":"/reference/v5/vector-stores/query-vectors"}]},{"group":"Files","pages":[{"title":"List files","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/files","href":"/reference/v5/files/list-files"},{"title":"Upload file bytes directly","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/files","href":"/reference/v5/files/upload-file-bytes-directly"},{"title":"Import files from cloud storage","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/files/cloud_imports","href":"/reference/v5/files/import-files-from-cloud-storage"},{"title":"Get file metadata","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/files/{file_id}","href":"/reference/v5/files/get-file-metadata"},{"title":"Delete a file","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/files/{file_id}","href":"/reference/v5/files/delete-a-file"},{"title":"Update a file","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/files/{file_id}","href":"/reference/v5/files/update-a-file"},{"title":"Download file content","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/files/{file_id}/content","href":"/reference/v5/files/download-file-content"}]},{"group":"Models","pages":[{"title":"List custom models","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/models","href":"/reference/v5/models/list-custom-models"},{"title":"Create a custom model","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/models","href":"/reference/v5/models/create-a-custom-model"},{"title":"Get a custom model","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/models/{model_id}","href":"/reference/v5/models/get-a-custom-model"},{"title":"Delete a custom model","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/models/{model_id}","href":"/reference/v5/models/delete-a-custom-model"},{"title":"Update a custom model","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/models/{model_id}","href":"/reference/v5/models/update-a-custom-model"}]},{"group":"Agent Configs","pages":[{"title":"List Agent Configs","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agent_configs","href":"/reference/v5/agent-configs/list-agent-configs"},{"title":"Create Agent Config","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/agent_configs","href":"/reference/v5/agent-configs/create-agent-config"},{"title":"List MCP Tool Names","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agent_configs/mcp_tools","href":"/reference/v5/agent-configs/list-mcp-tool-names"},{"title":"Get Agent Config","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agent_configs/{agent_config_id}","href":"/reference/v5/agent-configs/get-agent-config"},{"title":"Delete Agent Config (hard delete)","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/agent_configs/{agent_config_id}","href":"/reference/v5/agent-configs/delete-agent-config-hard-delete"},{"title":"Update Agent Config","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/agent_configs/{agent_config_id}","href":"/reference/v5/agent-configs/update-agent-config"}]},{"group":"Datasets","pages":[{"title":"List datasets","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/datasets","href":"/reference/v5/datasets/list-datasets"},{"title":"Create a dataset","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/datasets","href":"/reference/v5/datasets/create-a-dataset"},{"title":"Get a dataset","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/datasets/{dataset_id}","href":"/reference/v5/datasets/get-a-dataset"},{"title":"Archive a dataset","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/datasets/{dataset_id}","href":"/reference/v5/datasets/archive-a-dataset"},{"title":"Update or restore a dataset","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/datasets/{dataset_id}","href":"/reference/v5/datasets/update-or-restore-a-dataset"}]},{"group":"Dataset Items","pages":[{"title":"Add items to an existing dataset","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/dataset-items/batch","href":"/reference/v5/dataset-items/add-items-to-an-existing-dataset"},{"title":"Get a dataset item","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/dataset-items/{dataset_item_id}","href":"/reference/v5/dataset-items/get-a-dataset-item"},{"title":"Delete a dataset item","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/dataset-items/{dataset_item_id}","href":"/reference/v5/dataset-items/delete-a-dataset-item"},{"title":"Update a dataset item","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/dataset-items/{dataset_item_id}","href":"/reference/v5/dataset-items/update-a-dataset-item"},{"title":"List dataset items","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/dataset-items","href":"/reference/v5/dataset-items/list-dataset-items"}]},{"group":"Evaluations","pages":[{"title":"List Evaluations","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations","href":"/reference/v5/evaluations/list-evaluations"},{"title":"Create Evaluation","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluations","href":"/reference/v5/evaluations/create-evaluation"},{"title":"Get Evaluation","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations/{evaluation_id}","href":"/reference/v5/evaluations/get-evaluation"},{"title":"Archive Evaluation","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/evaluations/{evaluation_id}","href":"/reference/v5/evaluations/archive-evaluation"},{"title":"Update or Restore Evaluation","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluations/{evaluation_id}","href":"/reference/v5/evaluations/update-or-restore-evaluation"},{"title":"Add Test Criteria to Evaluation","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluations/{evaluation_id}/tasks","href":"/reference/v5/evaluations/add-test-criteria-to-evaluation"},{"title":"Update Test Criteria Configuration","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluations/{evaluation_id}/tasks/{alias}","href":"/reference/v5/evaluations/update-test-criteria-configuration"},{"title":"Get Available Metadata Keys","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations/metadata-keys","href":"/reference/v5/evaluations/get-available-metadata-keys"},{"title":"Get Available Evaluation Statuses","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations/statuses","href":"/reference/v5/evaluations/get-available-evaluation-statuses"},{"title":"Get Evaluation Data Schema","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations/{evaluation_id}/schema","href":"/reference/v5/evaluations/get-evaluation-data-schema"},{"title":"Get Evaluation Taxonomy","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluations/{evaluation_id}/taxonomy","href":"/reference/v5/evaluations/get-evaluation-taxonomy"},{"title":"Filter Evaluations","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluations/filter","href":"/reference/v5/evaluations/filter-evaluations"},{"title":"Dry-run a custom-function evaluation task","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluations/tasks/dry-run","href":"/reference/v5/evaluations/dry-run-a-custom-function-evaluation-task"}]},{"group":"Evaluation Groups","pages":[{"title":"List Evaluation Groups","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-groups","href":"/reference/v5/evaluation-groups/list-evaluation-groups"},{"title":"Create Evaluation Group","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluation-groups","href":"/reference/v5/evaluation-groups/create-evaluation-group"},{"title":"Get Evaluation Group","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-groups/{group_id}","href":"/reference/v5/evaluation-groups/get-evaluation-group"},{"title":"Update Evaluation Group","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml put /v5/evaluation-groups/{group_id}","href":"/reference/v5/evaluation-groups/update-evaluation-group"},{"title":"Archive Evaluation Group","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/evaluation-groups/{group_id}","href":"/reference/v5/evaluation-groups/archive-evaluation-group"},{"title":"Patch Evaluation Group","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluation-groups/{group_id}","href":"/reference/v5/evaluation-groups/patch-evaluation-group"},{"title":"Get Evaluation Group Schema","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-groups/{group_id}/schema","href":"/reference/v5/evaluation-groups/get-evaluation-group-schema"}]},{"group":"Evaluation Charts","pages":[{"title":"List Evaluation Charts","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-charts","href":"/reference/v5/evaluation-charts/list-evaluation-charts"},{"title":"Create Evaluation Chart","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluation-charts","href":"/reference/v5/evaluation-charts/create-evaluation-chart"},{"title":"Get Evaluation Chart","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-charts/{chart_id}","href":"/reference/v5/evaluation-charts/get-evaluation-chart"},{"title":"Replace Evaluation Chart","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml put /v5/evaluation-charts/{chart_id}","href":"/reference/v5/evaluation-charts/replace-evaluation-chart"},{"title":"Delete Evaluation Chart","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml delete /v5/evaluation-charts/{chart_id}","href":"/reference/v5/evaluation-charts/delete-evaluation-chart"},{"title":"Patch Evaluation Chart","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluation-charts/{chart_id}","href":"/reference/v5/evaluation-charts/patch-evaluation-chart"}]},{"group":"Evaluation Dashboards","pages":[{"title":"List Evaluation Dashboards","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-dashboards","href":"/reference/v5/evaluation-dashboards/list-evaluation-dashboards"},{"title":"Create Evaluation Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluation-dashboards","href":"/reference/v5/evaluation-dashboards/create-evaluation-dashboard"},{"title":"Get Evaluation Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-dashboards/{dashboard_id}","href":"/reference/v5/evaluation-dashboards/get-evaluation-dashboard"},{"title":"Delete Evaluation Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/evaluation-dashboards/{dashboard_id}","href":"/reference/v5/evaluation-dashboards/delete-evaluation-dashboard"},{"title":"Patch Evaluation Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluation-dashboards/{dashboard_id}","href":"/reference/v5/evaluation-dashboards/patch-evaluation-dashboard"},{"title":"Add Widget to Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluation-dashboards/{dashboard_id}/widgets","href":"/reference/v5/evaluation-dashboards/add-widget-to-dashboard"},{"title":"Remove Widget from Dashboard","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}","href":"/reference/v5/evaluation-dashboards/remove-widget-from-dashboard"},{"title":"Update Dashboard Widget","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}","href":"/reference/v5/evaluation-dashboards/update-dashboard-widget"}]},{"group":"Evaluation Items","pages":[{"title":"Get a single evaluation item","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-items/{evaluation_item_id}","href":"/reference/v5/evaluation-items/get-a-single-evaluation-item"},{"title":"List and filter evaluation items","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/evaluation-items","href":"/reference/v5/evaluation-items/list-and-filter-evaluation-items"},{"title":"Export evaluation items to a file","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/evaluation-items/export","href":"/reference/v5/evaluation-items/export-evaluation-items-to-a-file"}]},{"group":"Spans","pages":[{"title":"Create a span","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans","href":"/reference/v5/spans/create-a-span"},{"title":"Upsert spans in a batch","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml put /v5/spans/batch","href":"/reference/v5/spans/upsert-spans-in-a-batch"},{"title":"Create spans in a batch","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/batch","href":"/reference/v5/spans/create-spans-in-a-batch"},{"title":"List trace deletion requests","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/spans/deletions","href":"/reference/v5/spans/list-trace-deletion-requests"},{"title":"Create trace deletion request","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/deletions","href":"/reference/v5/spans/create-trace-deletion-request"},{"title":"Get trace deletion request status","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/spans/deletions/{deletion_request_id}","href":"/reference/v5/spans/get-trace-deletion-request-status"},{"title":"Get a span","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml get /v5/spans/{span_id}","href":"/reference/v5/spans/get-a-span"},{"title":"Update a span","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/spans/{span_id}","href":"/reference/v5/spans/update-a-span"},{"title":"Get a span within a trace","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/traces/{trace_id}/spans/{span_id}","href":"/reference/v5/spans/get-a-span-within-a-trace"},{"title":"List span summaries for a trace","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/traces/{trace_id}/spans","href":"/reference/v5/spans/list-span-summaries-for-a-trace"},{"title":"Search spans","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/search","href":"/reference/v5/spans/search-spans"},{"title":"Export spans","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/export","href":"/reference/v5/spans/export-spans"},{"title":"Get span export status","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/spans/export/{export_id}","href":"/reference/v5/spans/get-span-export-status"},{"title":"Get time-bucketed span metrics","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/metrics","href":"/reference/v5/spans/get-time-bucketed-span-metrics"},{"title":"Get span metrics grouped by name","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/spans/metrics/by-span","href":"/reference/v5/spans/get-span-metrics-grouped-by-name"}]},{"group":"Span Assessment","pages":[{"title":"List span or trace assessments","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/span-assessments","href":"/reference/v5/span-assessment/list-span-or-trace-assessments"},{"title":"Create span assessment","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/span-assessments","href":"/reference/v5/span-assessment/create-span-assessment"},{"title":"Get span assessment by ID","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/span-assessments/{span_assessment_id}","href":"/reference/v5/span-assessment/get-span-assessment-by-id"},{"title":"Permanently delete span assessment","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/span-assessments/{span_assessment_id}","href":"/reference/v5/span-assessment/permanently-delete-span-assessment"},{"title":"Update span assessment","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/span-assessments/{span_assessment_id}","href":"/reference/v5/span-assessment/update-span-assessment"}]},{"group":"Annotation Tasks","pages":[{"title":"Update or assign annotation tasks in bulk","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/annotation-tasks/batch","href":"/reference/v5/annotation-tasks/update-or-assign-annotation-tasks-in-bulk"}]},{"group":"Credentials","pages":[{"title":"List Credentials","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/credentials","href":"/reference/v5/credentials/list-credentials"},{"title":"Create Credential","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/credentials","href":"/reference/v5/credentials/create-credential"},{"title":"Get Credential by Name","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/credentials/name/{credential_name}","href":"/reference/v5/credentials/get-credential-by-name"},{"title":"Get Credential by ID","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/credentials/{credential_id}","href":"/reference/v5/credentials/get-credential-by-id"},{"title":"Delete Credential","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/credentials/{credential_id}","href":"/reference/v5/credentials/delete-credential"},{"title":"Update Credential","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml patch /v5/credentials/{credential_id}","href":"/reference/v5/credentials/update-credential"},{"title":"Get Credential Secret by ID","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/credentials/{credential_id}/secret","href":"/reference/v5/credentials/get-credential-secret-by-id"},{"title":"Get Credential Secret by Name","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/credentials/name/{credential_name}/secret","href":"/reference/v5/credentials/get-credential-secret-by-name"}]},{"group":"Agentex Cloud Build","pages":[{"title":"List container image builds","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/builds","href":"/reference/v5/agentex-cloud-build/list-container-image-builds"},{"title":"Submit container image build","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/builds","href":"/reference/v5/agentex-cloud-build/submit-container-image-build"},{"title":"List agents built but not deployed","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/builds/undeployed","href":"/reference/v5/agentex-cloud-build/list-agents-built-but-not-deployed"},{"title":"Get a build","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/builds/{build_id}","href":"/reference/v5/agentex-cloud-build/get-a-build"},{"title":"Stream build logs","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/builds/{build_id}/logs","href":"/reference/v5/agentex-cloud-build/stream-build-logs"},{"title":"Cancel a build","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/builds/{build_id}/cancel","href":"/reference/v5/agentex-cloud-build/cancel-a-build"}]},{"group":"Agentex Cloud Deploy","pages":[{"title":"List agent deployments","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agentex/deployments","href":"/reference/v5/agentex-cloud-deploy/list-agent-deployments"},{"title":"Deploy a built agent image","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml post /v5/agentex/deployments","href":"/reference/v5/agentex-cloud-deploy/deploy-a-built-agent-image"},{"title":"Get an agent deployment","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agentex/deployments/{deployment_id}","href":"/reference/v5/agentex-cloud-deploy/get-an-agent-deployment"},{"title":"Delete and tear down a deployment","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/agentex/deployments/{deployment_id}","href":"/reference/v5/agentex-cloud-deploy/delete-and-tear-down-a-deployment"},{"title":"Get agent deployment logs","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml get /v5/agentex/deployments/{deployment_id}/logs","href":"/reference/v5/agentex-cloud-deploy/get-agent-deployment-logs"}]},{"group":"Agentex Agent","pages":[{"title":"Delete Agent","deprecated":null,"version":null,"openapi":"/openapi/v5.yaml delete /v5/agentex/agents/{agent_id}","href":"/reference/v5/agentex-agent/delete-agent"}]},{"group":"SGP Cloud Secrets","pages":[{"title":"List Secrets","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml get /v5/sgp/secrets","href":"/reference/v5/sgp-cloud-secrets/list-secrets"},{"title":"Create Secret","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml post /v5/sgp/secrets","href":"/reference/v5/sgp-cloud-secrets/create-secret"},{"title":"Get Secret","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml get /v5/sgp/secrets/{secret_id}","href":"/reference/v5/sgp-cloud-secrets/get-secret"},{"title":"Delete Secret","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml delete /v5/sgp/secrets/{secret_id}","href":"/reference/v5/sgp-cloud-secrets/delete-secret"},{"title":"Update Secret","deprecated":true,"version":null,"openapi":"/openapi/v5.yaml patch /v5/sgp/secrets/{secret_id}","href":"/reference/v5/sgp-cloud-secrets/update-secret"}]}]},{"tab":"AgentOps SDK","href":"https://scaleapi.github.io/sgp-sdk-docs/api/python/"},{"tab":"Agentex API","pages":[{"title":"Agentex API","href":"/reference/agentex/agents/get-agent-by-id"}]},{"tab":"Agentex SDK","href":"https://scaleapi.github.io/agentex-sdk-docs/api/python/"},{"tab":"Capabilities","pages":[{"title":"Capabilities","href":"/docs/capabilities/overview"}]},{"tab":"Dex API","pages":[{"title":"Dex API","href":"/reference/dex/projects/list-projects"}]}]},{"version":"V4 (legacy)","pages":[{"title":"V4 (legacy)","href":"/docs/inference/inference-overview"}]}]},"basePath":"","title":"Generate OpenAI chat completion from messages - Scale AI","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}