GET

/v1/schemas/grok/chat/v1/responses?kind=output

kind outputactivity chathash b77de6bb…extracted Oct 29, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
73606db143eb2355fc0f17278caa369c28ea11a058ddd630babc05f70b69a20e
{
  "fetchedAt": 1793250623,
  "extractorVersion": "1",
  "verifiedAt": null
}

Response body

32 properties · 18 required · 42 $defs
propertytypedescriptionconstraints
background*booleanOpenResponses compatibility fields. Not used at the moment. Just for OpenResponses compatibility. Whether to process the response asynchronously in the background.default: false
created_at*integerThe Unix timestamp (in seconds) for the response creation time.format: int64
frequency_penalty*number(NOT SUPPORTED in Responses API) Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.format: float
id*stringUnique ID of the response.
metadata*anyOnly included for compatibility.
model*stringModel name used to generate the response.
object*stringThe object type of this resource. Always set to `response`.
output*ModelOutput[]The response generated by the model.
parallel_tool_calls*booleanWhether to allow the model to run parallel tool calls.
presence_penalty*number(NOT SUPPORTED in Responses API) Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.format: float
service_tier*enumSpecifies the processing tier used for serving the request.default | priority | fast
status*stringStatus of the response. One of `completed`, `in_progress` or `incomplete`.
store*booleanWhether to store the input message(s) and model response for later retrieval.default: true
text*ModelResponseConfigurationSettings for customizing a text response from the model.
tool_choice*string | objectControls which (if any) tool is called by the model. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function…
tools*ModelTool[]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_logprobs*integerAn integer between 0 and 8 specifying the number of most likely tokens to return at each token position.format: int32
truncation*stringThe truncation strategy to use for the model response.default: "disabled"
completed_atanyThe Unix timestamp (in seconds) for the response completion time. Only set when the response is completed.format: int64
erroranyAn error object returned when the model fails to generate a response.
incomplete_detailsobject | object | object | …Details about why the response is incomplete.nullable
instructionsanyA system (or developer) message inserted into the model's context.
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).format: int32
max_tool_callsanyThe maximum number of tool calls allowed for this response.format: int32
previous_response_idanyThe ID of the previous response from the model.
prompt_cache_keyanyThe cache key used for the prompt for routing to the correct engine.
reasoningReasoningConfigurationReasoning configuration. Only for reasoning models.nullable
safety_identifieranyA stable identifier used to help detect users of your application that may be violating xAI's usage policies.
temperatureanySampling temperature echoed from the request, or the model's default when the request omits it. Between 0 and 2. Sampling uses at most 1, so a sent value above 1 is echoed here and sampled as 1.0 ≤ n ≤ 2 · format: float · default: 1
top_panyNucleus sampling `top_p` echoed from the request, or the model's default when the request omits it. Sampling uses at most the model's default `top_p`, so a higher sent value is echoed here and sampled as that default.0 < n ≤ 1 · format: float · default: 1
usageModelUsageToken usage information.nullable
useranyA unique identifier representing your end-user, which can help xAI to monitor and detect abuse.

Types

42 $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

ContextDetailsobject

Token counts for the latest context window seen by the model.

input_tokens*integerPrompt tokens in the latest context (sourced from `SamplingUsage.context_prompt_tokens`).format: int32
output_tokens*integerCompletion + reasoning tokens in the latest context (sourced from `SamplingUsage.context_output_tokens`).format: int32

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.

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

IncompleteDetailsobject | object | object | …

Details about why a response is incomplete.

InputTokensDetailsobject

cached_tokens*integerToken cached by xAI from previous requests and reused for this request.format: int32

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`.

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.

ModelUsageobject

context_detailsContextDetailsToken counts for the **latest context** sent to / produced by the model. For agentic responses this reflects the most recent step rather than the cumulative total. Informational only — not used for billing.nullable
cost_in_nano_usdanyCost in nano US dollars for this request.format: int64
cost_in_usd_ticksanyAccurate cost of this request in USD ticks, where "tick" is defined as follows: TICKS_IN_USD_CENT: i64 = 100_000_000 which means there is 10'000'000'000 ticks in one *dollar*.format: int64
input_tokens*integerNumber of input tokens used.format: int32
input_tokens_details*InputTokensDetailsBreakdown of the input tokens.
num_server_side_tools_used*integerNumber of server side tools used.format: int32
num_sources_used*integerNumber of sources used (for live search).format: int32
output_tokens*integerNumber of output tokens used.format: int32
output_tokens_details*OutputTokensDetailsBreakdown of the output tokens.
server_side_tool_usage_detailsServerSideToolUsageDetailsDetails about the server side tool usage.nullable
total_tokens*integerTotal tokens used.format: int32

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

OutputTokensDetailsobject

reasoning_tokens*integerTokens generated by the model for reasoning.format: int32

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`.

ServerSideToolUsageDetailsobject

code_interpreter_calls*integerNumber of code interpreter calls.format: int32
document_search_calls*integerNumber of document search calls.format: int32
file_search_calls*integerNumber of file search calls.format: int32
image_generation_calls*integerNumber of image generation calls.format: int32
mcp_calls*integerNumber of MCP calls.format: int32
web_search_calls*integerNumber of web search calls.format: int32
x_posts_fetched*integerNumber of X posts fetched across all X search calls, including nested parent/quote posts and every post of a fetched thread, without de-duplication. X search is billed per fetched item.format: int32
x_search_calls*integerNumber of X search calls.format: int32
x_users_fetched*integerNumber of X user profiles fetched across all X search calls, without de-duplication. X search is billed per fetched item.format: int32

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`.

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