GET

/v1/schemas/grok/chat/v1/responses

kind inputactivity chathash 6bca15fd…extracted Oct 28, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
ba7fa0aee6b67a25f648797321f9ecfd0a4869f577325942ac611941b0501441
{
  "fetchedAt": 1793164224,
  "extractorVersion": "1",
  "verifiedAt": null
}

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.

Types

50 $defs

Annotationobject

end_indexanyThe end index of the annotation.format: int32
start_indexanyThe summary of the annotation.format: int32
titleanyThe title of the annotation.
type*stringThe type of the annotation. Only supported type currently is `url_citation`.
url*stringThe URL of the web resource.

CodeInterpreterCallobject

The output of a code interpreter tool call.

codestringThe code of the code interpreter tool call.
idstringThe unique ID of the code interpreter tool call.
outputs*CodeInterpreterOutput[]The outputs of the code interpreter tool call.
statusstringThe status of the code interpreter tool call.
type*stringThe type of the code interpreter tool call. Always `code_interpreter_call`.

CodeInterpreterOutputobject | object

CompactionOutputItemobject

A compaction item from a previous `/v1/responses/compact` call.

encrypted_content*stringThe encrypted content of the compacted conversation.
idanyThe unique ID of the compaction item (e.g. `cmp_<uuid>`).
type*stringThe type of the item. Always `"compaction"`.

CustomToolCallobject

The output of a custom tool call.

call_id*stringThe unique ID of the function tool call generated by the model.
id*stringThe status of the custom tool call.
inputstringThe unique ID of the custom tool call,
name*stringAn identifier used to map this custom tool call to a tool call output.
statusstringStatus of the item. One of `completed`, `in_progress` or `incomplete`.
type*stringThe input for the custom tool call generated by the model.

FileSearchCallobject

The output of a web search tool call.

idstringThe unique ID of the file search tool call.
queries*string[]The queries used to search for files.
results*FileSearchResult[]The results of the file search tool call.
statusstringThe status of the file search tool call.
type*stringThe type of the file search tool call. Always `file_search_call`.

FileSearchResultobject

file_id*stringThe file ID of the file search result.
filename*stringThe filename of the file search result.
scorenumberThe score of the file search result. Proto3 omits float fields with value 0.0; default to 0.0 when absent.format: double
text*stringThe text of the file search result.

FunctionDefinitionobject

Definition of the tool call made available to the model.

defer_loadinganyWhen true, the definition is hidden from the model's prompt but stays callable, loaded via a `tool_search` step (`/v1/responses` only).
descriptionanyA description of the function to indicate to the model when to call it.
name*stringThe name of the function. If the model calls the function, this name is used in the response.
parameters*anyA JSON schema describing the function parameters. The model _should_ follow the schema, however, this is not enforced at the moment.
strictanyNot supported. Only maintained for compatibility reasons.

FunctionToolCallobject

A tool call to run a function.

arguments*stringThe arguments to pass to the function, as a JSON string.
call_id*stringThe unique ID of the function tool call generated by the model.
idstringThe unique ID of the function tool call.
name*stringThe name of the function.
statusstringStatus of the item. One of `completed`, `in_progress` or `incomplete`.
type*stringThe type of the function tool call, which can be `"function_call"` for client-side tool calls, and `"web_search_call"` or `"x_search_call"` or `"code_interpreter_call"` or `"mcp_call"` for server-side tool calls.

FunctionToolCallOutputobject

The output of a function tool call.

call_id*stringThe unique ID of the function tool call generated by the model.
output*string | ModelInputContentItem[]The output of the function tool call. Can be a plain string or a list of content items (`input_text`, `input_image`, `input_file`).
type*stringThe type of the function tool call, which is always `function_call_output`.

Guidelineobject

One entry in [`ChatRequest::guidelines`] and [`ModelRequest::guidelines`].

behavior*enumHow the model should handle a [`GuidelineCategory`].decline | allow
category*enumContent category a guideline applies to.nsfw | violence | profanity | cyber
type*stringDiscriminator. Must be `policy`.

GuidelineBehaviorenum

How the model should handle a [`GuidelineCategory`].

decline | allow

GuidelineCategoryenum

Content category a guideline applies to.

nsfw | violence | profanity | cyber

ImageGenerationCallobject

The output of an image generation tool call.

idstringThe unique ID of the image generation tool call.
promptanyThe prompt used to generate the image.
resultanyThe generated image encoded in base64 (OpenAI-compatible: bare base64, no data-URL prefix), or `null` while the call is still in progress or has failed. The image format can be determined from the decoded magic bytes (typically JPEG or PNG).
statusstringThe status of the image generation tool call. One of `in_progress`, `generating`, `completed` or `failed`.
type*enumType tag for [`ImageGenerationCall`]. Serializes as `"image_generation_call"`.image_generation_call

LocalShellSkillobject

A skill available in the local shell environment.

description*stringA description of what the skill does.
name*stringThe name of the skill.
path*stringThe path to the directory containing the skill (with a SKILL.md file).

McpCallobject

The output of a MCP tool call.

arguments*stringA JSON string of the arguments passed to the tool.
errorstringThe error message of the MCP tool call.
idstringThe unique ID of the MCP tool call.
name*stringThe name of the tool that was run.
output*stringThe output of the MCP tool call.
server_label*stringThe label of the MCP server running the tool.
statusstringThe status of the MCP tool call.
type*stringThe type of the MCP tool call. Always `mcp_call`.

ModelInputstring | ModelInputPart[]

Content of the input passed to a `/v1/response` request.

ModelInputContentstring | ModelInputContentItem[]

ModelInputContentItemobject | object | object | …

ModelInputPartobject | any | any | …

ModelOutputany | any | any | …

ModelResponseConfigurationobject

formatobject | object | objectAn object specifying the format that the model must output. Specify `{ "type": "json_object" }` for JSON output, or `{ "type": "json_schema", "json_schema": {...} }` for structured outputs. If `{ \"type\": \"text\" }`, the model will return a text response.nullable

ModelResponseFormatobject | object | object

Response format parameter for structured outputs.

ModelToolany | any | object | …

Definition of one tool that the model can call.

ModelToolChoicestring | object

Parameter to control how model chooses the tools.

OutputMessageobject

An output message from the model.

content*OutputMessageContent[]Content of the output message.
idstringThe unique ID of the output message.
role*stringThe role of the output message, which can be `assistant` or `tool`.
statusstringStatus of the item. One of `completed`, `in_progress` or `incomplete`.
type*stringThe type of the output message, which is always `message`.

OutputMessageContentobject | object

Reasoningobject

The reasoning done by the model.

contentReasoningText[]The reasoning text contents.
encrypted_contentanyThe enrypted reasoning. Returned when `reasoning.encrypted_content` is passed in `include`.
idstringThe unique ID of the reasoning content.
statusstringStatus of the item. One of `completed`, `in_progress` or `incomplete`.
summary*SummaryText[]The summarized reasoning text contents.
type*stringThe type of the object, which is always `reasoning`.

ReasoningConfigurationobject

effortanyConstrains how hard a reasoning model thinks before responding. Higher efforts use more reasoning tokens for deeper thinking. The supported values and the default depend on the model.
generate_summaryanyOnly included for compatibility.
summaryanyA summary of the model's reasoning process. Possible values are `auto`, `concise` and `detailed`. Only included for compatibility. The model shall always return `detailed`.

ReasoningTextobject

text*stringReasoning done by the model.
type*stringThe type of the object, which is always `reasoning_text`.

SearchParametersobject

Parameters to control realtime data.

from_dateanyDate from which to consider the results in ISO-8601 YYYY-MM-DD. See <https://en.wikipedia.org/wiki/ISO_8601>.format: date
max_search_resultsanyMaximum number of search results to use.1 ≤ n ≤ 30 · format: int32 · default: 15
modeanyChoose the mode to query realtime data: * `off`: no search performed and no external will be considered. * `on` (default): the model will search in every sources for relevant data. * `auto`: the model choose whether to search data or not and where to search th…default: "auto"
return_citationsanyWhether to return citations in the response or not.default: true
sourcesanyList of sources to search in. If no sources specified, the model will look over the web and X by default.
to_dateanyDate up to which to consider the results in ISO-8601 YYYY-MM-DD. See <https://en.wikipedia.org/wiki/ISO_8601>.format: date

SearchSourceobject | object | object | …

ServiceTierenum

Processing tier for a request. `Fast` and `Priority` are interchangeable: the model's fast deployment and its rates where configured, else higher scheduling priority at a higher price.

default | priority | fast

ShellCallobject

A shell command call emitted by the model for local execution.

action*ShellCallActionThe shell commands and limits that describe how to run the tool call.
call_id*stringThe unique ID of the shell tool call generated by the model.
environmentShellEnvironmentThe environment for the shell tool call.nullable
idstringThe unique ID of the shell call item.
statusstringStatus of the item. One of `completed`, `in_progress` or `incomplete`.
type*stringThe type of the output item, which is always `shell_call`.

ShellCallActionobject

The shell commands and limits that describe how to run the tool call.

commands*string[]The commands to run.
max_output_lengthanyOptional maximum number of characters to return from each command.format: int32
timeout_msanyOptional timeout in milliseconds for the commands.format: int64
typeanyThe type of the action, which is always `exec`.

ShellCallOutcomeobject | object

The outcome of a shell command execution.

ShellCallOutputobject

The output of a shell tool call, sent by the client after local execution.

call_id*stringThe unique ID of the shell tool call generated by the model.
max_output_lengthanyThe maximum length of the shell command output. Generated by the model and should be passed back with the raw output.format: int32
output*ShellCallOutputResult[]An array of shell call output contents.
type*stringThe type of the output item, which is always `shell_call_output`.

ShellCallOutputResultobject

The content of a shell tool call output that was emitted.

outcome*object | objectThe outcome of the command execution.
stderrstringThe standard error output that was captured.
stdoutstringThe standard output that was captured.

ShellEnvironmentobject

The environment configuration for a shell tool.

skillsLocalShellSkill[]An optional list of skills available in the local environment.
type*stringThe type of the environment. Currently only `local` is supported.

SummaryTextobject

text*stringSummary of the reasoning done by the model.
type*stringThe type of the object, which is always `summary_text`.

TokenLogProbobject

bytesanyThe ASCII encoding of the output character.
logprob*numberThe log probability of returning this token.format: float
token*stringThe token.
top_logprobs*TopLogProb[]An array of the most likely tokens to return at this token position.

ToolSearchCallobject

A server-side tool search call made by the model.

argumentsanyThe arguments of the tool search call: `{"query": ..., "limit": ...}`.
call_idanyAlways `null`; present for OpenAI compatibility.
executionstringWhere the search runs. Always `server`.
id*stringThe unique ID of the tool search call item.
statusstringStatus of the item. One of `in_progress`, `completed` or `incomplete` (a failed search).
type*enumType tag for [`ToolSearchCall`]; a single-variant enum (not a `String`) for the same untagged-enum disambiguation as [`ImageGenerationCallType`].tool_search_call

ToolSearchOutputobject

The tool definitions loaded by a completed tool search call.

call_idanyAlways `null`; present for OpenAI compatibility.
executionstringWhere the search ran. Always `server`.
id*stringThe unique ID of the tool search output item.
statusstringStatus of the item. Always `completed`.
toolsany[]The loaded tool definitions, echoed in the shape they were supplied in.
type*enumType tag for [`ToolSearchOutput`]. Serializes as `"tool_search_output"`. See [`ToolSearchCallType`] for why this is a single-variant enum.tool_search_output

TopLogProbobject

bytesanyThe ASCII encoding of the output character.
logprob*numberThe log probability of returning this token.format: float
token*stringThe token.

WebSearchActionobject | object | object

WebSearchCallobject

The output of a web search tool call.

action*object | object | objectAn object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find).
idstringThe unique ID of the web search tool call.
statusstringThe status of the web search tool call.
type*stringThe type of the web search tool call. Always `web_search_call`.

WebSearchFiltersobject

allowed_domainsanyList of website domains (without protocol specification or subdomains) to restrict search results to (e.g., ["example.com"]). A maximum of 5 websites can be allowed. Use this as a whitelist to limit results to only these specific sites; no other websites will …items ≤ 5
excluded_domainsanyList of website domains (without protocol specification or subdomains) to exclude from search results (e.g., ["example.com"]). Use this to prevent results from unwanted sites. A maximum of 5 websites can be excluded. This parameter cannot be set together with …items ≤ 5

WebSearchOptionsobject

filtersanyOnly included for compatibility.
search_context_sizeanyThis field included for compatibility reason with OpenAI's API. It is mapped to `max_search`.default: "medium"
user_locationanyOnly included for compatibility.

WebSearchSourceobject

type*stringThe type of source.
urlstringThe URL of the source.

WebSearchUserLocationobject

cityanyCity of the user's location.
countryanyTwo-letter ISO 3166-1 alpha-2 country code, like US, GB, etc.
regionanyRegion of the user's location.
timezoneanyTimezone of the user's location, IANA timezone like America/Chicago, Europe/London, etc.
type*stringType is always `"approximate"`.

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", …}]}