EmbeddingsRequest
object
attachmentsarray of objectClient-reviewed attachment text entries.
Each item:
textstring
clipboardstringOptional client-reviewed clipboard text.
dimensionsintegerRange: at least 1encoding_formatstringOne of:"float","base64". Default:"float"frequency_penaltynumberRange: -2 to 2inputany requiredInteger token IDs only. The TypeScript request-body slot list has no reviewed text channel for raw embeddings input.
One of
- array of integer
- array of array of integer
max_completion_tokensintegerRange: 1 to 200000max_tokensintegermessagesarray of objectOnly 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:
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
streambooleansystemanyOne 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:
functionobjectdescriptionstring requirednamestringparametersReviewedToolJsonSchema
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}$