GET
/v1/schemas/grok/chat/v1%2Fresponses
Accept:
Request body
31 properties · 1 required · 50 $defs| property | type | description | constraints |
|---|---|---|---|
| input* | string | ModelInputPart[] | The input passed to the model. Can be text, image or file. | |
| background | any | (Unsupported) Whether to process the response asynchronously in the background. | default: false |
| context_management | any | Optional context-management directives (e.g. compaction). Parsed but not yet executed. | |
| guidelines | any | Per-category instructions for model output. See [`Guideline`]. Omitted requests leave this unset. A request whose guidelines cannot be applied, for example on a multi-agent model or with `stop`, fails with 400. | |
| include | any | What additional output data to include in the response. Supported values include `reasoning.encrypted_content` (encrypted reasoning tokens) and tool-output options. OpenAI's `message.output_text.logprobs` is accepted for compatibility but silently ignored. | |
| instructions | any | An alternate way to specify the system prompt. Note that this cannot be used alongside `previous_response_id`, where the system prompt of the previous message will be used. | |
| logprobs | any | 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. Not supported by models `grok-4.20` and newer; the field will be silently ignored if set. | default: false |
| max_output_tokens | any | Max number of tokens that can be generated in a response. Only applies to visible output tokens (i.e. does not apply to tokens used for reasoning or function calls). Defaults to 128,000 when unset; set a larger value to allow longer generations. | format: int32 |
| max_turns | any | Maximum number of agentic tool calling turns allowed for this request. If not set, defaults to the server's global cap. This parameter will be ignored for any non-agentic requests, and for agentic SLOP requests that have neither a server-side tool nor a file a… | format: int32 |
| metadata | any | Not supported. Only maintained for compatibility reasons. | |
| min_p | any | Min-p sampling: tokens whose probability is below `min_p` times the probability of the most likely token are excluded from sampling. Disabled when unset. | 0 ≤ n ≤ 1 · format: float |
| model | string | Model name for the model to use. Obtainable from <https://console.x.ai/team/default/models> or <https://docs.x.ai/docs/models>. | |
| parallel_tool_calls | any | Whether to allow the model to run parallel tool calls. | default: true |
| previous_response_id | any | The ID of the previous response from the model. | |
| prompt_cache_key | any | Plumbed to x-grok-conv-id for Open Responses compatibility, used for routing. | |
| reasoning | ReasoningConfiguration | Reasoning configuration. Only for reasoning models. | nullable |
| reasoning_effort | any | Non-standard alternative to `reasoning.effort` that accepts the same values. We only look at this if the reasoning field is unset. | |
| safety_identifier | any | Supplied by the API client to identify the end user behind this request. A stable string that uniquely identifies each of your users; hash your internal user id or username rather than sending an email or name. Stored with the request metadata so a usage-polic… | |
| search_parameters | SearchParameters | Deprecated: live search has been removed, and requests that set this field fail with `410 Gone`. Use the `web_search` and `x_search` tools instead: <https://docs.x.ai/developers/tools/overview>. | nullable |
| service_tier | enum | Processing tier. `"fast"` and `"priority"` are interchangeable: on models with a fast deployment both use it and its rates; otherwise both mean higher scheduling priority at a higher price. Valid: `"auto"`, `"priority"`, `"fast"`. | default | priority | fast · nullable |
| store | any | Whether to store the input message(s) and model response for later retrieval. | default: true |
| stream | any | 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. | default: false |
| temperature | any | What sampling temperature to use, between 0 and 2. Values above 1 are sampled at 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. | 0 ≤ n ≤ 2 · format: float · default: 1 |
| text | ModelResponseConfiguration | Settings for customizing a text response from the model. | nullable |
| tool_choice | string | object | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one … | nullable |
| tools | any | A list of tools the model may call in JSON-schema. Currently, only functions and web search are supported as tools. A max of 1000 tools are supported. | items ≤ 1000 |
| top_k | any | Top-k sampling: only the `top_k` most probable tokens are considered at each sampling step. Disabled when unset. | n ≥ 1 · format: int32 |
| top_logprobs | any | An integer between 0 and 8 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. Not supported by models `grok-4.20` and newer; the field w… | 0 ≤ n ≤ 8 · format: int32 |
| top_p | any | 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. It is generally reco… | 0 < n ≤ 1 · format: float · default: 0.95 |
| truncation | any | Not supported. Only maintained for compatibility reasons. | |
| user | any | A unique identifier representing your end-user, which can help xAI to monitor and detect abuse. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"grok","endpointId":"v1/responses","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}