xAI
6 params
xAI Grok 4.20 0309 Non Reasoning parameters
These are the parameters modelparams.dev tracks for xAI Grok 4.20 0309 Non Reasoning. Each row gives the type, default, valid range or values, and the conditions that gate it. It's the same data the JSON API serves.
Length
2 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Max completion tokens
max_completion_tokens
|
integer (1…+∞) | — | Upper bound for visible output tokens generated in the chat completion. | — |
|
Stop sequence
stop
|
string | — | Stops generation when this sequence is produced. xAI accepts up to four stop sequences. | — |
Sampling
3 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Temperature
temperature
|
number (0…2 step 0.1) | 1 | Controls randomness. Lower values make outputs more focused; higher values make them more varied. | — |
|
Top P
top_p
|
number (0…1 step 0.01) | 1 | Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. | — |
|
Seed
seed
|
integer | — | Optional seed used for decoding when reproducible sampling is desired. | — |
Output
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Response format
response_format.type
|
enum (text | json_object | json_schema) | "text" | Controls whether the model returns text, JSON mode output, or structured JSON schema output. | — |
xAI Grok 4.20 0309 Non Reasoning API parameters in brief
xAI Grok 4.20 0309 Non Reasoning documents 6 API parameters, grouped by what they control:
-
Length:
max_completion_tokensminimum 1;stop. -
Sampling:
temperaturedefaults to 1, range 0–2;top_pdefaults to 1, range 0–1;seed. -
Output:
response_format.typedefaults to "text", accepts "text", "json_object", "json_schema".
Frequently asked questions
- How many parameters does xAI Grok 4.20 0309 Non Reasoning accept?
- xAI Grok 4.20 0309 Non Reasoning accepts 6 API parameters: max_completion_tokens, temperature, top_p, seed, stop, response_format.type.
- What is the default temperature for xAI Grok 4.20 0309 Non Reasoning?
- The default temperature for xAI Grok 4.20 0309 Non Reasoning is 1, within a valid range of 0 to 2.
- What is the default top_p for xAI Grok 4.20 0309 Non Reasoning?
- The default top_p for xAI Grok 4.20 0309 Non Reasoning is 1, within a valid range of 0 to 1.