The following parameters can be included in your API request - These input fields allow you to control the model, provide conversation context, configure generation settings, and customize the behavior of the response.
Request Parameters
The following parameters can be used when making a Chat Completions API request.
service_tier (string)
service_tier (string)Specifies the service tier used to process the request (Available only for models that support this feature).
Allowed values: default, priority
When set to priority, supported models may receive higher processing priority.
model (string)
model (string)The model identifier to use for the request.
messages (array)
messages (array)The conversation history provided to the model.
Typically consists of a sequence of user, assistant, and tool messages, with an optional system message that can appear anywhere in the conversation to define the model's behavior, instructions, or response style.
stream (boolean)
stream (boolean)Whether to stream the response using Server-Sent Events (SSE).
Default Value: false
temperature (number)
temperature (number)Controls randomness in the generated output.
Higher values (e.g. 0.8) make responses more creative, while lower values (e.g. 0.2) make them more focused and deterministic.
Default Value: 1
Range: 0 ≤ temperature ≤ 2
top_p (number)
top_p (number)Controls nucleus sampling. The model considers only tokens whose cumulative probability mass is within the specified threshold.
Default Value: 1
Range: 0 < top_p ≤ 1
min_p (number)
min_p (number)Minimum probability threshold relative to the most likely token. Set to 0 to disable.
Default Value: 0
Range: 0 ≤ min_p ≤ 1
top_k (integer)
top_k (integer)Limits sampling to the top K most likely tokens.
Set to 0 to disable.
Default Value: 0
Range: 0 ≤ top_k < 1000
max_tokens (integer)
max_tokens (integer)Maximum number of tokens the model can generate.
The combined input and output token count cannot exceed the model's context window.
Range: 0 < max_tokens ≤ 10000000
stop (string)
stop (string)One or more sequences that will cause generation to stop when encountered.
Supports up to 16 stop sequences.
stop_token_ids (array)
stop_token_ids (array)Up to 16 token IDs that will cause generation to stop when produced. These IDs are combined with the model's built-in stop tokens and are primarily intended for advanced or private deployment use cases.
n (integer)
n (integer)The number of response choices to generate and return.
Default Value: 1
Range: 1 ≤ n ≤ 4
presence_penalty (number)
presence_penalty (number)Positive values encourage the model to introduce new topics by penalizing tokens that have already appeared in the conversation. Higher values increase the likelihood of generating more diverse content.
Default Value: 0
Range: -2 ≤ presence_penalty ≤ 2
frequency_penalty (number)
frequency_penalty (number)Reduces repetition by penalizing tokens based on how frequently they appear in the generated text.
Default Value: 0
Range: -2 ≤ frequency_penalty ≤ 2
tools (array)
tools (array)A list of tools available to the model.
Currently, only function calling is supported.
tool_choice (string)
tool_choice (string)Controls how the model selects tools.
Allowed values:
noneautorequired- Specific tool name
By default:
nonewhen no tools are providedautowhen tools are available
response_format (any)
response_format (any)Specifies the desired response format.
Currently only supports structured JSON responses.
repetition_penalty (number)
repetition_penalty (number)Multiplicative penalty applied to repeated tokens.
Values greater than 1 discourage repetition, while values below 1 encourage it.
Default Value: 1
Range: 0.01 ≤ repetition_penalty ≤ 5
user (string)
user (string)Unique identifier for your end user.
Avoid sending personally identifiable information. Hashing user identifiers is recommended.
seed (integer)
seed (integer)Seed value used for random number generation.
Providing a seed may improve reproducibility, although deterministic output is not guaranteed.
Range: -9223372036854776000 ≤ seed < 18446744073709552000
logprobs (boolean)
logprobs (boolean)Determines whether token-level log probabilities are included in the response. When set to true, the API returns the log probability for each generated token in the message content.
stream_options (object)
stream_options (object)Additional configuration options for streaming responses.
reasoning_effort (string)
reasoning_effort (string)Controls reasoning depth for supported reasoning models.
Allowed values:
nonelowmediumhighxhigh
Lower values can improve response speed and reduce token usage.
reasoning (object)
reasoning (object)Advanced reasoning configuration for supported models.
prompt_cache_key (string)
prompt_cache_key (string)Cache key used to reuse prompts across requests and improve performance.
chat_template_kwargs (object)
chat_template_kwargs (object)Additional arguments passed to the model's chat template.
continue_final_message (boolean)
continue_final_message (boolean)If enabled, the model continues generating from the final assistant message instead of starting a new assistant turn. Only applies when the last message in the conversation has the assistant role.

