model
Model ID to be used for generating the chat completion. Only certain models support all parameters.
messages
The messages comprising the conversation so far, using the required role/content structure. Message modalities (like images or audio) are supported depending on the model.
audio
Parameters for audio output, required when requesting audio responses with modalities.
frequency_penalty
Penalizes new tokens based on frequency in the generated text, discouraging verbatim repetition.
function_call
Controls which function (if any) is called by the model. Deprecated in favor of tool_choice.
functions
A list of functions the model may call. Deprecated in favor of 'tools'.
logit_bias
Modifies likelihood of specified tokens appearing in completion.
logprobs
Whether to return log probabilities of output tokens.
max_completion_tokens
Upper bound on the number of tokens to generate in the completion, including visible and (for reasoning models) reasoning tokens.
max_tokens
The maximum number of tokens to generate (deprecated, not compatible with o-series models).
metadata
Custom metadata associated with the request, can be used for querying or logging.
modalities
Specifies the output types requested from the model (e.g., text, audio).
n
How many completion choices to generate for each input message.
parallel_tool_calls
Enable/disable parallel function calling.
prediction
Configuration for predicted outputs for faster responses when content is already known.
presence_penalty
Penalizes new tokens based on their presence in the text so far.
reasoning_effort
Constrains effort spent on model's reasoning process.
response_format
Specifies the required format of the response (e.g., JSON schema).
seed
For best-effort deterministic outputs. Requests with the same seed and params will try to return same results.
service_tier
Specifies latency tier for the request, relevant for customers subscribed to scale tier.
stop
Sequences at which to stop generating further tokens. Not supported by all models.
store
Whether to store the output for future retrieval (only stored if this is true).
stream
If true, streams the results using Server-Sent Events as tokens are generated.
stream_options
Options related to streaming response; used only if stream is true.
temperature
Sampling temperature; higher is more random, lower is more deterministic.
tool_choice
Controls how and which tools/functions the model should call. Supports values 'auto', 'required', 'none', or specific tool specification object.
tools
Array of tools/functions the model is allowed to call during completion.
top_logprobs
Number of top tokens to return logprobs for at each output token position. Requires logprobs true.
top_p
Nucleus sampling parameter. Consider tokens with top_p probability mass only.
user
A stable unique identifier for your end-user (for abuse detection and cache optimization).
web_search_options
Configuration for the web search tool if enabled in tools.