GET

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

kind inputactivity chathash f0e383e2extracted Jul 22, 2026version currentsource upstream spec ↗

Request body

29 properties · 1 required · 45 $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.
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. This includes both output and reasoning tokens. 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.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_effortanyreasoning_effort alternative to reasoning configuration. This is a non-standard field meant to ease user experience. We only look at this if the reasoning field is unset.
search_parametersSearchParametersSet the parameters to be used for searched data. Takes precedence over `web_search_preview` tool if specified in the tools.nullable
service_tierenumSpecifies the processing tier for this request. Set to `"priority"` for higher scheduling priority at a higher token price. Valid values: `"auto"` (default), `"priority"`.default | priority · 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. 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 128 tools are supported.`web_search_preview` tool, if specified, will be overridden by `search_parameters`.items ≤ 128
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: 1
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", …}]}