Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
Modify the likelihood of specified tokens appearing in the completion.
Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
This feature is in Beta.
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
Required range: -9223372036854776000 <= x <= 9223372036854776000
If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.
View the thinking/reasoning tokens as part of your response. Thinking models produce a long internal chain of thought before generating a response. Supported only for specific Claude models on Anthropic, Google Vertex AI, and AWS Bedrock. Requires setting strict_openai_compliance = false in your API call.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
Controls which (if any) tool is called by the model.
none means the model will not call any tool and instead generates a message.
auto means the model can pick between generating a message or calling one or more tools.
required means the model must call one or more tools.
Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
none is the default when no tools are present. auto is the default if tools are present.
Controls which (if any) function is called by the model.
none means the model will not call a function and instead generates a message.
auto means the model can pick between generating a message or calling a function.
Specifying a particular function via {"name": "my_function"} forces the model to call that function.
none is the default when no functions are present. auto is the default if functions are present.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Obiguard","colors":{"primary":"#FF0000","light":"#FF0000","dark":"#000000"},"logo":{"light":"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-light.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=7f26932acafd8568c72a25c5458ff7b9","dark":"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-dark.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=a8a778ee9d037ca897664a320f65c222"},"favicon":{"light":"https://mintcdn.com/obiguard/1Nx7oPvMompXEA4c/images/favicon-light.svg?fit=max\u0026auto=format\u0026n=1Nx7oPvMompXEA4c\u0026q=85\u0026s=1c526122a05adaacc78acf0dfa8c396f","dark":"https://mintcdn.com/obiguard/1Nx7oPvMompXEA4c/images/favicon-dark.svg?fit=max\u0026auto=format\u0026n=1Nx7oPvMompXEA4c\u0026q=85\u0026s=7bacca52a1837f6a712b5196d1a40229"},"navbar":{"links":[{"href":"mailto:support@obiguard.com","label":"Support"},{"href":"https://app.obiguard.ai","label":"Go to Dashboard"}],"primary":{"type":"button","label":"Back to Obiguard.AI","href":"https://obiguard.ai"}},"footer":{"socials":{"x":"https://x.com/ObiguardAI","github":"https://github.com/obiguard","linkedin":"https://linkedin.com/company/obiguard"}},"integrations":{"ga4":{"measurementId":"G-7SDXP83MGF"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"obiguard","hasAudioNarration":false,"actualSubdomain":"obiguard","customDomains":["docs.obiguard.ai"],"gitSource":{"type":"github","owner":"obiguard","repo":"obiguard-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae352a8096333fd0dad261d","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Integrations","count":51},{"language":"default","tag":"LLMs","count":39},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"More","count":21},{"language":"default","tag":"Features","count":19},{"language":"default","tag":"Inference API","count":17},{"language":"default","tag":"AI Gateway","count":11},{"language":"default","tag":"Agents","count":7},{"language":"default","tag":"Multimodal Capabilities","count":6},{"language":"default","tag":"White Papers","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/inference-api/chat","slug":"/api-reference/inference-api/chat","pageMetadata":{"title":"Chat","openapi":"post /chat/completions","description":null,"href":"/api-reference/inference-api/chat"},"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":"Chat","openapi":"post /chat/completions","description":null,"href":"/api-reference/inference-api/chat"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createChatCompletion","servers":["7be66ea0-0e40-4684-8d39-21cf99fcb8ab"],"tags":["Chat"],"summary":"Chat","security":["3b38c905-3f49-4f38-b8a8-63fe9ff12044"],"requestBody":"26d25a90-9af2-4a3b-8b68-e4c6f902551b","responses":{"200":"7e7daadd-1994-4b08-97e0-7c0665083830"},"x-code-samples":[{"lang":"cURL","label":"Default","source":"curl https://gateway.obiguard.ai/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"x-obiguard-api-key: $OBIGUARD_API_KEY\" \\\n -d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n"},{"lang":"python","label":"Default","source":"from obiguard import Obiguard\n\nclient = Obiguard(\n obiguard_api_key=\"ak***\", # Your Obiguard access key\n \n)\n\nresponse = client.chat.completions.create(\n model=\"gpt-4o\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(response.choices[0].message)\n"}],"method":"post","type":"path","path":"/chat/completions","baseUrlOptions":["https://gateway.obiguard.ai/v1"],"title":"Chat","description":"","codeSamples":[{"label":"Default","lang":"cURL","source":"curl https://gateway.obiguard.ai/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"x-obiguard-api-key: $OBIGUARD_API_KEY\" \\\n -d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n"},{"label":"Default","lang":"python","source":"from obiguard import Obiguard\n\nclient = Obiguard(\n obiguard_api_key=\"ak***\", # Your Obiguard access key\n \n)\n\nresponse = client.chat.completions.create(\n model=\"gpt-4o\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(response.choices[0].message)\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"description":"A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).","type":"array","minItems":1,"items":{"oneOf":[{"type":"object","title":"System message","required":["content","role"],"x-oaiExpandable":true,"properties":{"content":{"description":"The contents of the system message.","type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content","typeLabel":"string"},"role":{"type":"string","enum":["system"],"description":"The role of the messages author, in this case `system`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.0.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.0","typeLabel":"System message · object"},{"type":"object","title":"Developer message","description":"New role by OpenAI for select models. Must be explicitly used for models that support it. When used with incompatible models or providers, Obiguard automatically converts it to a system role.","required":["content","role"],"x-oaiExpandable":true,"properties":{"content":{"description":"The contents of the Developer message.","type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.content","typeLabel":"string"},"role":{"type":"string","enum":["developer"],"description":"The role of the messages author, in this case `Developer`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.1","typeLabel":"Developer message · object"},{"type":"object","title":"User message","required":["content","role"],"x-oaiExpandable":true,"properties":{"content":{"oneOf":[{"type":"string","title":"Text content","description":"The contents of the user message.\n","x-oaiExpandable":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Text content part","required":["type","text"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Text content part · object"},{"type":"object","title":"Image content part","required":["type","image_url"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.","format":"uri","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string\u003curi>"},"detail":{"type":"string","description":"Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding).","enum":["auto","low","high"],"default":"auto","uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Image content part · object"}],"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1.items.[INDEX]","typeLabel":"Text content part · object | Image content part · object"},"title":"Array of content parts","description":"The contents of the user message.\n","minItems":1,"x-oaiExpandable":true,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content.oneOf.1","typeLabel":"(Text content part · object | Image content part · object)[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content","typeLabel":"string | (Text content part · object | Image content part · object)[]"},"role":{"type":"string","enum":["user"],"description":"The role of the messages author, in this case `user`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.role","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.2.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.2","typeLabel":"User message · object"},{"type":"object","title":"Assistant message","required":["role"],"x-oaiExpandable":true,"properties":{"role":{"type":"string","enum":["assistant"],"description":"The role of the messages author, in this case `assistant`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n","uniqueKey":"messages.items.[INDEX].oneOf.3.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.content","typeLabel":"string | null"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","uniqueKey":"messages.items.[INDEX].oneOf.3.name","typeLabel":"string"},"tool_calls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].oneOf.3.tool_calls","typeLabel":"object[]"},"function_call":{"oneOf":[{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0.arguments","typeLabel":"string"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0.name","typeLabel":"string"}},"required":["arguments","name"],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.0","typeLabel":"object"},{"type":"null","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["arguments","name"],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].oneOf.3.function_call","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].oneOf.3","typeLabel":"Assistant message · object"},{"type":"object","title":"Tool message","required":["role","content","tool_call_id"],"x-oaiExpandable":true,"properties":{"role":{"type":"string","enum":["tool"],"description":"The role of the messages author, in this case `tool`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"The contents of the tool message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.content","typeLabel":"string"},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.tool_call_id","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.4","typeLabel":"Tool message · object"},{"type":"object","title":"Function message","required":["role","content","name"],"deprecated":true,"x-oaiExpandable":true,"properties":{"role":{"type":"string","enum":["function"],"description":"The role of the messages author, in this case `function`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The contents of the function message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the function message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content","typeLabel":"string | null"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.5","typeLabel":"Function message · object"}],"uniqueKey":"messages.items.[INDEX]","typeLabel":"System message · object | Developer message · object | User message · object | Assistant message · object | Tool message · object | Function message · object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"(System message · object | Developer message · object | User message · object | Assistant message · object | Tool message · object | Function message · object)[]"},"model":{"oneOf":[{"type":"string","description":"ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.","x-oaiTypeLabel":"string","example":"gpt-4-turbo","isRequired":true,"uniqueKey":"model.oneOf.0","typeLabel":"string"},{"type":"string","description":"ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.","enum":["gpt-4o","gpt-4o-2024-05-13","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","gpt-3.5-turbo-16k-0613"],"x-oaiTypeLabel":"string","example":"gpt-4-turbo","isRequired":true,"uniqueKey":"model.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"model","typeLabel":"string | enum\u003cstring>"},"frequency_penalty":{"oneOf":[{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)\n","uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)\n","uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"logit_bias":{"oneOf":[{"type":"object","x-oaiTypeLabel":"map","default":null,"additionalProperties":{"type":"integer","uniqueKey":"logit_bias.oneOf.0.additionalProperties","typeLabel":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n","uniqueKey":"logit_bias.oneOf.0","typeLabel":"object"},{"type":"null","x-oaiTypeLabel":"map","default":null,"additionalProperties":{"type":"integer","uniqueKey":"logit_bias.oneOf.1.additionalProperties","typeLabel":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n","uniqueKey":"logit_bias.oneOf.1","typeLabel":"null"}],"uniqueKey":"logit_bias","typeLabel":"object | null"},"logprobs":{"oneOf":[{"description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.","type":"boolean","default":false,"uniqueKey":"logprobs.oneOf.0","typeLabel":"boolean"},{"description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.","type":"null","default":false,"uniqueKey":"logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"logprobs","typeLabel":"boolean | null"},"top_logprobs":{"oneOf":[{"description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.","type":"integer","minimum":0,"maximum":20,"uniqueKey":"top_logprobs.oneOf.0","typeLabel":"integer"},{"description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.","type":"null","minimum":0,"maximum":20,"uniqueKey":"top_logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_logprobs","typeLabel":"integer | null"},"max_tokens":{"oneOf":[{"description":"The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the chat completion.\n\nThe total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n","type":"integer","uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"description":"The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the chat completion.\n\nThe total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n","type":"null","uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"n":{"oneOf":[{"type":"integer","minimum":1,"maximum":128,"default":1,"example":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.","uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"maximum":128,"default":1,"example":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.","uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"presence_penalty":{"oneOf":[{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)\n","uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)\n","uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"response_format":{"oneOf":[{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","required":["type"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"],"isRequired":true,"uniqueKey":"response_format.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"JSON schema","description":"JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/integrations/llms/openai/structured-outputs).\n","required":["type","json_schema"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"],"isRequired":true,"uniqueKey":"response_format.oneOf.1.type","typeLabel":"enum\u003cstring>"},"json_schema":{"type":"object","title":"JSON schema","description":"Structured Outputs configuration options, including a JSON Schema.\n","properties":{"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.\n","isRequired":true,"uniqueKey":"response_format.oneOf.1.json_schema.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the response format is for, used by the\nmodel to determine how to respond in the format.\n","uniqueKey":"response_format.oneOf.1.json_schema.description","typeLabel":"string"},"schema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true,"uniqueKey":"response_format.oneOf.1.json_schema.schema","typeLabel":"JSON schema · object"},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the\noutput. If set to true, the model will always follow the exact schema\ndefined in the `schema` field. Only a subset of JSON Schema is supported\nwhen `strict` is `true`.\n","uniqueKey":"response_format.oneOf.1.json_schema.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the\noutput. If set to true, the model will always follow the exact schema\ndefined in the `schema` field. Only a subset of JSON Schema is supported\nwhen `strict` is `true`.\n","uniqueKey":"response_format.oneOf.1.json_schema.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.1.json_schema.strict","typeLabel":"boolean | null"}},"required":["name"],"isRequired":true,"uniqueKey":"response_format.oneOf.1.json_schema","typeLabel":"JSON schema · object"}},"uniqueKey":"response_format.oneOf.1","typeLabel":"JSON schema · object"},{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\n\nUsing `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.\n","required":["type"],"properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"],"isRequired":true,"uniqueKey":"response_format.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.2","typeLabel":"JSON object · object"}],"uniqueKey":"response_format","typeLabel":"Text · object | JSON schema · object | JSON object · object"},"seed":{"oneOf":[{"type":"integer","minimum":-9223372036854776000,"maximum":9223372036854776000,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n","x-code-samples":{"beta":true},"uniqueKey":"seed.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":-9223372036854776000,"maximum":9223372036854776000,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n","x-code-samples":{"beta":true},"uniqueKey":"seed.oneOf.1","typeLabel":"null"}],"uniqueKey":"seed","typeLabel":"integer | null"},"stop":{"oneOf":[{"type":"string","description":"Up to 4 sequences where the API will stop generating further tokens.\n","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"null","description":"Up to 4 sequences where the API will stop generating further tokens.\n","uniqueKey":"stop.oneOf.1","typeLabel":"null"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.2.items.[INDEX]","typeLabel":"string"},"description":"Up to 4 sequences where the API will stop generating further tokens.\n","maxItems":4,"minItems":1,"uniqueKey":"stop.oneOf.2","typeLabel":"string[]"}],"uniqueKey":"stop","typeLabel":"string | null | string[]"},"stream":{"oneOf":[{"description":"If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n","type":"boolean","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"description":"If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n","type":"null","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stream_options":{"oneOf":[{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"object","default":null,"properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.\n","uniqueKey":"stream_options.oneOf.0.include_usage","typeLabel":"boolean"}},"uniqueKey":"stream_options.oneOf.0","typeLabel":"object"},{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"null","default":null,"properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.\n"}},"uniqueKey":"stream_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options","typeLabel":"object | null"},"thinking":{"oneOf":[{"type":"object","description":"View the thinking/reasoning tokens as part of your response. Thinking models produce a long internal chain of thought before generating a response. Supported only for specific Claude models on Anthropic, Google Vertex AI, and AWS Bedrock. Requires setting `strict_openai_compliance = false` in your API call.\n","properties":{"type":{"type":"string","enum":["enabled","disabled"],"description":"Enables or disables the thinking mode capability.","default":"disabled","isRequired":true,"uniqueKey":"thinking.oneOf.0.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"type":"integer","description":"The maximum number of tokens to allocate for the thinking process.\nA higher token budget allows for more thorough reasoning but may increase overall response time.\n","minimum":1,"example":2030,"uniqueKey":"thinking.oneOf.0.budget_tokens","typeLabel":"integer"}},"required":["type"],"example":{"type":"enabled","budget_tokens":2030},"uniqueKey":"thinking.oneOf.0","typeLabel":"object"},{"type":"null","description":"View the thinking/reasoning tokens as part of your response. Thinking models produce a long internal chain of thought before generating a response. Supported only for specific Claude models on Anthropic, Google Vertex AI, and AWS Bedrock. Requires setting `strict_openai_compliance = false` in your API call.\n","properties":{"type":{"type":"string","enum":["enabled","disabled"],"description":"Enables or disables the thinking mode capability.","default":"disabled"},"budget_tokens":{"type":"integer","description":"The maximum number of tokens to allocate for the thinking process.\nA higher token budget allows for more thorough reasoning but may increase overall response time.\n","minimum":1,"example":2030}},"required":["type"],"example":{"type":"enabled","budget_tokens":2030},"uniqueKey":"thinking.oneOf.1","typeLabel":"null"}],"uniqueKey":"thinking","typeLabel":"object | null"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":2,"default":1,"example":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n","uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":2,"default":1,"example":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"default":1,"example":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"default":1,"example":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"tools":{"type":"array","description":"A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","isRequired":true,"uniqueKey":"tools.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"tools.items.[INDEX].function.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"tools.items.[INDEX].function.description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"tools.items.[INDEX].function.parameters","typeLabel":"object"}},"required":["name"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].function","typeLabel":"object"}},"required":["type","function"],"uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","enum":["none","auto","required"],"x-oaiExpandable":true,"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","required":["type","function"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object"},"parallel_tool_calls":{"description":"Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.","type":"boolean","default":true,"uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"user":{"type":"string","example":"user-1234","description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).\n","uniqueKey":"user","typeLabel":"string"},"function_call":{"oneOf":[{"type":"string","description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n","enum":["none","auto"],"deprecated":true,"x-oaiExpandable":true,"uniqueKey":"function_call.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n","required":["name"],"deprecated":true,"x-oaiExpandable":true,"properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"function_call.oneOf.1.name","typeLabel":"string"}},"uniqueKey":"function_call.oneOf.1","typeLabel":"object"}],"uniqueKey":"function_call","typeLabel":"enum\u003cstring> | object"},"functions":{"deprecated":true,"description":"Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n","type":"array","minItems":1,"maxItems":128,"items":{"type":"object","deprecated":true,"properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"functions.items.[INDEX].parameters","typeLabel":"object"}},"required":["name"],"uniqueKey":"functions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"functions","typeLabel":"object[]"}},"required":["model","messages"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"messages":[{"content":"\u003cstring>","role":"system","name":"\u003cstring>"}],"model":"gpt-4-turbo","frequency_penalty":0,"logit_bias":null,"logprobs":false,"top_logprobs":10,"max_tokens":123,"n":1,"presence_penalty":0,"response_format":{"type":"text"},"seed":0,"stop":"\u003cstring>","stream":false,"stream_options":null,"thinking":{"type":"enabled","budget_tokens":2030},"temperature":1,"top_p":1,"tools":[{"type":"function","function":{"name":"\u003cstring>","description":"\u003cstring>","parameters":{}}}],"parallel_tool_calls":true,"user":"user-1234","functions":[{"name":"\u003cstring>","description":"\u003cstring>","parameters":{}}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"7e7daadd-1994-4b08-97e0-7c0665083830":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"Represents a chat completion response returned by model, based on the provided input.","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"choices":{"type":"array","description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.","items":{"type":"object","required":["finish_reason","index","message","logprobs"],"properties":{"finish_reason":{"type":"string","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"},"index":{"type":"integer","description":"The index of the choice in the list of choices.","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","description":"A chat completion message generated by the model.","properties":{"content":{"oneOf":[{"type":"string","description":"The contents of the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The contents of the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"tool_calls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[]"},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.function_call.arguments","typeLabel":"string"},"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.function_call.name","typeLabel":"string"}},"required":["name","arguments"],"uniqueKey":"choices.items.[INDEX].message.function_call","typeLabel":"object"},"content_blocks":{"oneOf":[{"type":"array","description":"The content blocks of the message. This is only present for certain providers with strict-open-ai-compliance flag set to false","items":{"oneOf":[{"type":"object","title":"Text content part","description":"A block of content in a chat completion message.","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"Text content part · object"},{"type":"object","title":"Thinking content part","description":"A block of content in a chat completion message.","required":["type","thinking"],"properties":{"type":{"type":"string","enum":["thinking"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"thinking":{"type":"string","description":"The thinking content.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.1.thinking","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"Thinking content part · object"},{"type":"object","title":"Redacted thinking content part","description":"A block of content in a chat completion message.","required":["type","data"],"properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"The redacted thinking content.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.2.data","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX].oneOf.2","typeLabel":"Redacted thinking content part · object"}],"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0.items.[INDEX]","typeLabel":"Text content part · object | Thinking content part · object | Redacted thinking content part · object"},"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.0","typeLabel":"(Text content part · object | Thinking content part · object | Redacted thinking content part · object)[]"},{"type":"null","description":"The content blocks of the message. This is only present for certain providers with strict-open-ai-compliance flag set to false","items":{"oneOf":[{"type":"object","title":"Text content part","description":"A block of content in a chat completion message.","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part."},"text":{"type":"string","description":"The text content."}}},{"type":"object","title":"Thinking content part","description":"A block of content in a chat completion message.","required":["type","thinking"],"properties":{"type":{"type":"string","enum":["thinking"],"description":"The type of the content part."},"thinking":{"type":"string","description":"The thinking content."}}},{"type":"object","title":"Redacted thinking content part","description":"A block of content in a chat completion message.","required":["type","data"],"properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"The type of the content part."},"data":{"type":"string","description":"The redacted thinking content."}}}]},"uniqueKey":"choices.items.[INDEX].message.content_blocks.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.content_blocks","typeLabel":"(Text content part · object | Thinking content part · object | Redacted thinking content part · object)[] | null"}},"required":["role","content"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"logprobs":{"oneOf":[{"description":"Log probability information for the choice.","type":"object","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"integer[] | null"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0.items.[INDEX]","typeLabel":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"integer[]"},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"integer[] | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"object[]"},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"object[] | null"}},"required":["content"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"description":"Log probability information for the choice.","type":"null","properties":{"content":{"oneOf":[{"description":"A list of message content tokens with log probability information.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},{"description":"A list of message content tokens with log probability information.","type":"null","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"bytes":{"oneOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"array","items":{"type":"integer"}},{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","type":"null","items":{"type":"integer"}}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}]}},"required":["content"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model used for the chat completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","description":"The object type, which is always `chat.completion`.","enum":["chat.completion"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"system_fingerprint":{"type":"string","description":"This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n","uniqueKey":"system_fingerprint","typeLabel":"string"},"usage":{"type":"object","description":"Usage statistics for the completion request.","properties":{"completion_tokens":{"type":"integer","description":"Number of tokens in the generated completion.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt.","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total number of tokens used in the request (prompt + completion).","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"uniqueKey":"usage","typeLabel":"object"}},"required":["choices","created","id","model","object"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","choices":[{"finish_reason":"stop","index":123,"message":{"content":"\u003cstring>","role":"assistant","tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}],"function_call":{"arguments":"\u003cstring>","name":"\u003cstring>"},"content_blocks":[{"type":"text","text":"\u003cstring>"}]},"logprobs":{"content":[{"token":"\u003cstring>","logprob":123,"bytes":[123],"top_logprobs":[{"token":"\u003cstring>","logprob":123,"bytes":[123]}]}]}}],"created":123,"model":"\u003cstring>","object":"chat.completion","system_fingerprint":"\u003cstring>","usage":{"completion_tokens":123,"prompt_tokens":123,"total_tokens":123}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3b38c905-3f49-4f38-b8a8-63fe9ff12044":{"Obiguard-API-Key":{"type":"apiKey","in":"header","name":"x-obiguard-api-key","scopes":[],"schemeName":"Obiguard-API-Key"}}},"servers":{"7be66ea0-0e40-4684-8d39-21cf99fcb8ab":{"url":"https://gateway.obiguard.ai/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-obiguard-api-key","scopes":[],"schemeName":"Obiguard-API-Key"},"schema":{"title":"x-obiguard-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Obiguard-API-Key","name":"x-obiguard-api-key"}],"title":"Obiguard-API-Key"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"obiguard","siteName":"Obiguard","title":"Chat - Obiguard","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T14:05:51.297Z","originalFileLocation":"api-reference/inference-api/chat.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Obiguard\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_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/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat - Obiguard\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Obiguard\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.obiguard.ai/api-reference/inference-api/chat\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://obiguard.mintlify.site/_mintlify/api/og/v2?division=Chat+Completions\u0026amp;title=Chat\u0026amp;theme=17af59e946014cd64216eecb\u0026amp;signature=bf005cb143dc6e5beaf0c4f605ae91ddbb686ae9fe4be1a0108036fe395981d5\">\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=\"Chat - Obiguard\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://obiguard.mintlify.site/_mintlify/api/og/v2?division=Chat+Completions\u0026amp;title=Chat\u0026amp;theme=17af59e946014cd64216eecb\u0026amp;signature=bf005cb143dc6e5beaf0c4f605ae91ddbb686ae9fe4be1a0108036fe395981d5\">\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/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Obiguard\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF0000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.obiguard.ai/api-reference/inference-api/chat\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/inference-api/chat.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.obiguard.ai/#organization\",\"name\":\"Obiguard\",\"url\":\"https://docs.obiguard.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-light.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=7f26932acafd8568c72a25c5458ff7b9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.obiguard.ai#website\",\"name\":\"Obiguard\",\"url\":\"https://docs.obiguard.ai\",\"publisher\":{\"@id\":\"https://docs.obiguard.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.obiguard.ai/api-reference/inference-api/chat#webpage\",\"url\":\"https://docs.obiguard.ai/api-reference/inference-api/chat\",\"name\":\"Chat\",\"dateModified\":\"2026-10-29T14:05:51.297Z\",\"isPartOf\":{\"@id\":\"https://docs.obiguard.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.obiguard.ai/api-reference/inference-api/chat#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.obiguard.ai/api-reference/inference-api/chat#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Obiguard\",\"item\":\"https://docs.obiguard.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat\",\"item\":\"https://docs.obiguard.ai/api-reference/inference-api/chat\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.obiguard.ai/api-reference/inference-api/chat#apireference\",\"headline\":\"Chat\",\"name\":\"Chat\",\"url\":\"https://docs.obiguard.ai/api-reference/inference-api/chat\",\"mainEntityOfPage\":{\"@id\":\"https://docs.obiguard.ai/api-reference/inference-api/chat#webpage\"},\"dateModified\":\"2026-10-29T14:05:51.297Z\",\"publisher\":{\"@id\":\"https://docs.obiguard.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.obiguard.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Obiguard\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Obiguard\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/inference-api/chat.md","siteName":"Obiguard","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/what-is-obiguard"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/ecosystem"}]},{"tab":"Inference API","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/inference-api/introduction"},{"title":"Supported Providers","href":"/api-reference/inference-api/supported-providers"},{"title":"Authentication","href":"/api-reference/inference-api/authentication"},{"title":"Headers","href":"/api-reference/inference-api/headers"},{"title":"Errors","href":"/api-reference/inference-api/error-codes"}]},{"group":"SDK","pages":[{"title":"Supported SDKs","href":"/api-reference/sdk/list"},{"title":"Obiguard Python SDK","description":"Official Obiguard Python SDK to help take your AI apps to production","href":"/api-reference/sdk/python"}]},{"group":"Chat Completions","pages":[{"title":"Chat","openapi":"post /chat/completions","href":"/api-reference/inference-api/chat"}]},{"group":"Embeddings","pages":[{"title":"Embeddings","openapi":"post /embeddings","description":null,"href":"/api-reference/inference-api/embeddings"}]},{"group":"Images","pages":[{"title":"Create Image","openapi":"post /images/generations","href":"/api-reference/inference-api/images/create-image"},{"title":"Create Image Edit","openapi":"post /images/edits","href":"/api-reference/inference-api/images/create-image-edit"},{"title":"Create Image Variation","openapi":"post /images/variations","href":"/api-reference/inference-api/images/create-image-variation"}]},{"group":"Audio","pages":[{"title":"Create Speech","openapi":"post /audio/speech","href":"/api-reference/inference-api/audio/create-speech"},{"title":"Create Transcription","openapi":"post /audio/transcriptions","href":"/api-reference/inference-api/audio/create-transcription"},{"title":"Create Translation","openapi":"post /audio/translations","href":"/api-reference/inference-api/audio/create-translation"}]},{"group":"Completions","pages":[{"title":"Completions","openapi":"post /completions","href":"/api-reference/inference-api/completions"}]},{"group":"Other APIs","pages":[{"title":"Gateway to Other APIs","icon":"chart-network","href":"/api-reference/inference-api/gateway-for-other-apis"}]}]},{"tab":"White Papers","pages":[{"title":"White Papers","href":"/white-papers/our-white-paper"}]}]},"basePath":"","title":"Chat - Obiguard","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}