ChatCompletionsRequest
object
attachmentsarray of objectClient-reviewed attachment text entries.
Each item:
textstring
clipboardstringOptional client-reviewed clipboard text.
dimensionsintegerRange: at least 1encoding_formatstringOne of:"float","base64"frequency_penaltynumberRange: -2 to 2max_completion_tokensintegerRange: 1 to 200000max_tokensintegermessagesarray of object requiredOnly allowlisted message keys are accepted. annotations, audio metadata, url_citation, and other unknown message keys are rejected with 422 because they may contain text the client has not reviewed. Content parts also reject unknown keys and unsupported types. This gateway input subset is not measured against the upstream provider.
Each item:
attachmentsarray of objectClient-reviewed attachment text entries.
Each item:
textstring
cache_controlobjectttlstringOne of:"5m","1h"typestring requiredOne of:"ephemeral"
contentany requiredOne of
- string
- array of any
Each item:
One of
- object
- object
- object
- object
metadataobjectmessages[*].metadata is removed before the request is forwarded. Root metadata keys must match the key class [A-Za-z0-9_.-]{1,32} and are not tokenized. Root string values that match the string class [A-Za-z0-9_.:@+/-]{0,512} are forwarded unchanged, except e-mail-form identity values, which are removed. A key or string outside its class receives 422.
rolestring requiredOne of:"system","developer","user","assistant"tool_call_idanytool_callsarray of objectEach item:
functionobject requiredargumentsstring requirednamestring
idstringtypestringOne of:"function"
metadataobjectmessages[*].metadata is removed before the request is forwarded. Root metadata keys must match the key class [A-Za-z0-9_.-]{1,32} and are not tokenized. Root string values that match the string class [A-Za-z0-9_.:@+/-]{0,512} are forwarded unchanged, except e-mail-form identity values, which are removed. A key or string outside its class receives 422.
modelstring requiredLength: at most 64 characters. Pattern:^(?!.*//)(?!.*(?:^|/)\.{1,2}(?:/|$))(?!.*\/$)[A-Za-z0-9][A-Za-z0-9._:/@~+-]{0,63}(?![\s\S])nintegerRange: 1 to 128prepromptstringOptional client-reviewed prompt prefix.
presence_penaltynumberRange: -2 to 2providerstringProvider identifier used for routing. Other values receive 422; inactive or unavailable providers receive 403.
One of:"openai","anthropic","google","azure","grok","openrouter","gemini","deepseek","perplexity","mistral","cohere","groq","together","fireworks"reasoning_effortstringReasoning effort hint.
One of:"none","minimal","low","medium","high","xhigh","max"seedintegerRange: 0 to 2147483647stopanyOperator configuration, not user text. One string or up to four strings, each at most 32 characters.
One of
- string
- array of string
streambooleanstream_optionsobjectOptional on streaming chat-completion requests to OpenAI-compatible providers. Only include_usage (boolean) is accepted; the gateway always requests usage on the provider stream. This field does not change the price.
include_usagebooleanOptional. The gateway always requests a usage frame on the provider stream.
systemanyOne of
- string
- array of object
Each item:
cache_controlobjectttlstringOne of:"5m","1h"typestring requiredOne of:"ephemeral"
textstring requiredtypestring requiredOne of:"text"
temperaturenumbertool_choiceanyOne of
- string
- object
functionobject requirednamestring required
typestring requiredOne of:"function"
toolsarray of objectEach item:
functionobjectOptional strict flag for function tools must be a boolean; string values such as "true" are rejected.
descriptionstring requirednamestringparametersReviewedToolJsonSchemastrictboolean
typestringOne of:"function"
top_pnumberRange: 0 to 1userstringOptional short identifier only. Arbitrary user strings are not supported yet and receive 422.
Pattern:^[A-Za-z0-9_.:-]{1,64}$