GET

/v1/schemas/grok/chat/v1%2Fresponses

kind inputactivity chathash 6bca15fd…extracted Oct 28, 2026version currentsource upstream spec ↗

Request body

31 properties · 1 required · 50 $defs
propertytypedescriptionconstraints
input*string | ModelInputPart[]The input passed to the model. Can be text, image or file.
backgroundany(Unsupported) Whether to process the response asynchronously in the background.default: false
context_managementanyOptional context-management directives (e.g. compaction). Parsed but not yet executed.
guidelinesanyPer-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.
includeanyWhat 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.
instructionsanyAn 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.
logprobsanyWhether 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_tokensanyMax 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_turnsanyMaximum 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
metadataanyNot supported. Only maintained for compatibility reasons.
min_panyMin-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
modelstringModel name for the model to use. Obtainable from <https://console.x.ai/team/default/models> or <https://docs.x.ai/docs/models>.
parallel_tool_callsanyWhether to allow the model to run parallel tool calls.default: true
previous_response_idanyThe ID of the previous response from the model.
prompt_cache_keyanyPlumbed to x-grok-conv-id for Open Responses compatibility, used for routing.
reasoningReasoningConfigurationReasoning configuration. Only for reasoning models.nullable
reasoning_effortanyNon-standard alternative to `reasoning.effort` that accepts the same values. We only look at this if the reasoning field is unset.
safety_identifieranySupplied 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_parametersSearchParametersDeprecated: 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_tierenumProcessing 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
storeanyWhether to store the input message(s) and model response for later retrieval.default: true
streamanyIf 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
temperatureanyWhat 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
textModelResponseConfigurationSettings for customizing a text response from the model.nullable
tool_choicestring | objectControls 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
toolsanyA 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_kanyTop-k sampling: only the `top_k` most probable tokens are considered at each sampling step. Disabled when unset.n ≥ 1 · format: int32
top_logprobsanyAn 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_panyAn 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
truncationanyNot supported. Only maintained for compatibility reasons.
useranyA unique identifier representing your end-user, which can help xAI to monitor and detect abuse.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"grok","endpointId":"v1/responses","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}