Chat Completions
Authorizations
Body
openai standard message format
model specified as model_vendor/model
, for example openai/gpt-4o
Parameters for audio output. Required when audio output is requested with modalities: ['audio'].
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far.
-2 < x < 2
Deprecated in favor of tool_choice. Controls which function is called by the model.
Deprecated in favor of tools. A list of functions the model may generate JSON inputs for.
Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.
Whether to return log probabilities of the output tokens or not.
An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.
Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate.
Developer-defined tags and values used for filtering completions in the dashboard.
Output types that you would like the model to generate for this request.
How many chat completion choices to generate for each input message.
Whether to enable parallel function calling during tool use.
Static predicted output content, such as the content of a text file being regenerated.
Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.
-2 < x < 2
For o1 models only. Constrains effort on reasoning. Values: low, medium, high.
An object specifying the format that the model must output.
If specified, system will attempt to sample deterministically for repeated requests with same seed.
Up to 4 sequences where the API will stop generating further tokens.
Whether to store the output for use in model distillation or evals products.
If true, partial message deltas will be sent as server-sent events.
Options for streaming response. Only set this when stream is true.
What sampling temperature to use. Higher values make output more random, lower more focused.
0 < x < 2
Controls which tool is called by the model. Values: none, auto, required, or specific tool.
A list of tools the model may call. Currently, only functions are supported. Max 128 functions.
Only sample from the top K options for each subsequent token
Number of most likely tokens to return at each position, with associated log probability.
0 < x < 20
Alternative to temperature. Only tokens comprising top_p probability mass are considered.
0 < x < 1