GET

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

kind outputactivity chathash fdc0f3f6…extracted Sep 20, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
04a3a2d03a8279009e24e16710d4f54931867b30702aaf837fc0cb7d66838967
{
  "fetchedAt": 1789881070,
  "extractorVersion": "1",
  "verifiedAt": null
}

Response body

7 properties · 5 required · 5 $defs
propertytypedescriptionconstraints
choices*SampleChoice[]A list of response choices from the model. The length corresponds to the `n` in request body (default to 1).
created*integerThe chat completion creation time in Unix timestamp.format: int64
id*stringID of the request.
model*stringModel to be used.
object*stringObject type of the response. This is always `"text_completion"`.
system_fingerprintanySystem fingerprint, used to indicate xAI system configuration changes.
usageUsageToken usage information.nullable

Types

5 $defs

CompletionUsageDetailobject

Details of completion usage.

accepted_prediction_tokens*integerThe number of tokens in the prediction that appeared in the completion.format: int32
audio_tokens*integerAudio input tokens generated by the model.format: int32
reasoning_tokens*integerTokens generated by the model for reasoning.format: int32
rejected_prediction_tokens*integerThe number of tokens in the prediction that did not appear in the completion.format: int32

PromptUsageDetailobject

Details of prompt usage.

audio_tokens*integerAudio prompt token used.format: int32
cached_tokens*integerToken cached by xAI from previous requests and reused for this request.format: int32
image_tokens*integerImage prompt token used.format: int32
text_tokens*integerTotal text prompt token used (cached + non-cached text tokens).format: int32

SampleChoiceobject

finish_reason*stringFinish reason. `"stop"` means the inference has reached a model-defined or user-supplied stop sequence in `stop`. `"length"` means the inference result has reached models' maximum allowed token length or user defined value in `max_tokens`. `"end_turn"` or `nul…
index*integerIndex of the choice.format: int32
text*stringText response.

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

Usageobject

completion_tokens*integerTotal completion token used.format: int32
completion_tokens_details*CompletionUsageDetailBreakdown of completion token usage of different types.
cost_in_usd_ticks*integerAccurate 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
num_sources_used*integerNumber of individual live search source used.format: int32
prompt_tokens*integerTotal prompt token used.format: int32
prompt_tokens_details*PromptUsageDetailBreakdown of prompt token usage of different types.
server_side_tool_usage_detailsServerSideToolUsageDetailsDetails about the server side tool usage.nullable
total_tokens*integerTotal token used, the sum of prompt token and completion token amount.format: int32

Validate a payload

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