Creates a model response for the given chat conversation.
Request body
If set to true, groq will return called tools without validating that the tool is present in request.tools. tool_choice=required/none will still be enforced, but the request cannot require a specific tool be used.
This is not yet supported by any of our models. Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
Whether to include reasoning in the response. If true, the response will include a reasoning field. If false, the model's reasoning will not be included in the response. This field is mutually exclusive with reasoning_format.
This is not yet supported by any of our models. Modify the likelihood of specified tokens appearing in the completion.
This is not yet supported by any of our models. Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
This is not yet supported by any of our models. An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
Deprecated in favor of max_completion_tokens. The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.
The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.
How many chat completion choices to generate for each input message. Note that the current moment, only n=1 is supported. Other values will result in a 400 response.
This is not yet supported by any of our models. Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
The service tier to use for the request. Defaults to on_demand.
- auto will automatically select the highest tier available within the rate limits of your organization.
- flex uses the flex tier, which will succeed or fail quickly.
qwen3 models support the following values Set to 'none' to disable reasoning. Set to 'default' or null to let Qwen reason.
openai/gpt-oss-20b and openai/gpt-oss-120b support 'low', 'medium', or 'high'. 'medium' is the default value.
Specifies how to output reasoning tokens This field is mutually exclusive with include_reasoning.
If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example code.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.
Whether to enable parallel function calling during tool use.
A unique identifier representing your end-user, which can help us monitor and detect abuse.
This parameter is not currently supported.
This parameter is not currently supported.
Deprecated: Use search_settings.include_domains instead. A list of domains to include in the search results when the model uses a web search tool.
Deprecated: Use search_settings.exclude_domains instead. A list of domains to exclude from the search results when the model uses a web search tool.
Whether to enable citations in the response. When enabled, the model will include citations for information retrieved from provided documents or web searches.
Example request
{
"n": 1,
"stop": "\n",
"temperature": 1,
"top_p": 1
}Response
OK
A unique identifier for the chat completion.
The Unix timestamp (in seconds) of when the chat completion was created.
The model used for the chat completion.
This fingerprint represents the backend configuration that the model runs with.
Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.
The object type, which is always chat.completion.
The service tier used for the request.