Claude Opus 5.5 is live on SeedRouter
LogoSeedRouter

Search models by name, e.g. 'nano banana'

Search models by name, e.g. 'nano banana'

Text

Grok 4.7

View Markdown

Call Grok 4.7 with native Chat Completions, Responses or Messages requests. Parameters, streaming, usage and current capability limits.

Use grok-4.7 with one of the three formats below. Authentication uses your SeedRouter API key. The model page includes a playground and current token prices; the pricing guide explains cached input and reasoning.

Quick start

curl https://api.seedrouter.ai/v1/responses \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"grok-4.7","input":"What is 2 + 2?","reasoning":{"effort":"low"},"max_output_tokens":64,"store":false}'

The JSON response includes output items and usage. Retain all output items when building conversation history, including reasoning and tool items.

Request formats

FormatEndpointRequired fields
ResponsesPOST /v1/responsesmodel, input
Chat CompletionsPOST /v1/chat/completionsmodel, messages
MessagesPOST /v1/messagesmodel, messages, max_tokens

Use Content-Type: application/json and Authorization: Bearer $SEEDROUTER_API_KEY. Messages clients can also send anthropic-version: 2023-06-01.

Parameters and constraints

The OpenAPI specification contains the full nested request and response schemas. The tables below list every supported top-level request field. Unknown fields and parameters officially ignored by this model are discarded. A supported parameter with an invalid value remains invalid.

Optional nullable fields accept explicit null; leaving a field out uses its API default. The playground hides user and fixes model to grok-4.7. API clients can still send user.

  • Context: 500,000 tokens, including the conversation and output.
  • Reasoning effort: low, medium, high, xhigh; default high.
  • max_completion_tokens and max_output_tokens default to 128,000 visible output tokens. Reasoning and function-call tokens are outside that visible-output limit. This is a default, not a maximum output capability claim.
  • Output limits must be positive integers. The API also enforces its existing integer safety ceiling of 1,073,741,823; context capacity still applies.
  • temperature: 0 through 2, default 1. top_p: greater than 0 and at most 1, default 1. Responses min_p: 0 through 1; top_k: integer at least 1.
  • Up to 350 tool definitions. stream_options requires stream: true.
  • instructions and previous_response_id cannot be combined. Reasoning summaries are always detailed.

Responses parameters

FieldTypeRule
includearray or nullArray of additional response fields to include.
input (required)object or alternativeText string or complete input-item array.
instructionsstring or nullSystem instructions; cannot be combined with previous_response_id.
max_output_tokensinteger or nullVisible-output limit; default 128,000.
max_turnsinteger or nullInteger maximum number of agent turns.
min_pnumber or nullNumber from 0 to 1.
model (required)stringFixed to grok-4.7.
parallel_tool_callsboolean or nullBoolean; default true.
previous_response_idstring or nullString response ID; continuation by ID is currently unavailable.
prompt_cache_keystring or nullString cache key.
reasoningobjectReasoning configuration; effort defaults to high.
reasoning_effortstring or nulllow, medium, high, xhigh; default high.
safety_identifierstring or nullOptional caller-supplied safety identifier.
search_parametersobjectSearch configuration.
service_tierstringauto, default, priority, fast; priority and fast double token rates.
storeboolean or nullBoolean; default true. Stored-response operations are currently unavailable.
streamboolean or nullBoolean; default false.
temperaturenumber or nullNumber from 0 to 2; default 1.
textobjectText response configuration, including format.
tool_choiceobject or alternativeAutomatic, disabled, required or a selected tool; syntax depends on the format.
toolsarray or nullTool definitions; at most 350.
top_kinteger or nullInteger; Responses requires at least 1.
top_pnumber or nullNumber greater than 0 and at most 1; default 1.
userstring or nullOptional caller-supplied identifier; hidden in the playground.

Chat Completions parameters

FieldTypeRule
deferredboolean or nullBoolean; default false. Deferred completion is currently unavailable.
max_completion_tokensinteger or nullVisible-output limit; default 128,000.
max_tokensinteger or nullPositive visible-output limit. Required for Messages.
messages (required)arrayConversation messages in this format.
model (required)stringFixed to grok-4.7.
ninteger or nullInteger at least 1; default 1.
parallel_tool_callsboolean or nullBoolean; default true.
prompt_cache_keystring or nullString cache key.
reasoning_effortstring or nulllow, medium, high, xhigh; default high.
response_formatobject or alternativeText, JSON object or JSON schema output.
safety_identifierstring or nullOptional caller-supplied safety identifier.
search_parametersobjectSearch configuration.
seedinteger or nullInteger sampling seed.
service_tierstringauto, default, priority, fast; priority and fast double token rates.
streamboolean or nullBoolean; default false.
stream_optionsobjectOptions for streaming; requires stream: true.
temperaturenumber or nullNumber from 0 to 2; default 1.
tool_choiceobject or alternativeAutomatic, disabled, required or a selected tool; syntax depends on the format.
toolsarray or nullTool definitions; at most 350.
top_pnumber or nullNumber greater than 0 and at most 1; default 1.
userstring or nullOptional caller-supplied identifier; hidden in the playground.
web_search_optionsobjectCompatibility search options.

Messages parameters

FieldTypeRule
max_tokens (required)integerPositive visible-output limit. Required for Messages.
messages (required)arrayConversation messages in this format.
metadataobjectMessages metadata object.
model (required)stringFixed to grok-4.7.
stop_sequencesarray or nullArray of stop strings.
streamboolean or nullBoolean; default false.
systemobject or alternativeSystem string or content blocks.
temperaturenumber or nullNumber from 0 to 2; default 1.
tool_choiceobject or alternativeAutomatic, disabled, required or a selected tool; syntax depends on the format.
toolsarray or nullTool definitions; at most 350.
top_kinteger or nullInteger; Responses requires at least 1.
top_pnumber or nullNumber greater than 0 and at most 1; default 1.

Streaming

Set stream to true. Chat emits completion chunks; Responses emits named response events; Messages emits message and content-block events. Read the final usage event as well as text deltas. Tool calls and reasoning can be separate output items; do not reduce the stream to visible text when retaining history.

{
  "model": "grok-4.7",
  "input": "Explain a mutex in one sentence.",
  "reasoning": { "effort": "low" },
  "max_output_tokens": 128,
  "store": false,
  "stream": true
}

Tools and structured output

Use the tool definition for your chosen format. Chat uses response_format; Responses uses text.format. Functions, web search, X search, code interpreter and MCP calls have been exercised with this model. Shell returns a client-executed call; it does not run a command on your computer automatically. The full schema also describes other tool types; a schema entry alone is not evidence that a particular external service is configured.

{
  "model": "grok-4.7",
  "input": "Use the code interpreter once to compute 13*17. Return the number.",
  "tools": [{ "type": "code_interpreter" }],
  "tool_choice": "required",
  "max_turns": 1,
  "reasoning": { "effort": "low" },
  "max_output_tokens": 32,
  "store": false
}

Tool usage is charged separately from tokens. Web search and code interpreter use call counts. X search uses fetched post and profile counts, including repeated fetched items; the number of X search calls is not its billable unit. Inspect usage.server_side_tool_usage_details and your account usage records.

Usage and pricing

Prices depend on total input length. Below 200,000 input tokens, use the standard tier. At 200,000 or more, use the long-context tier for the entire request; cached input is included when selecting the tier. service_tier: "priority" and "fast" double token rates in both tiers. auto and default select standard service. Tool charges are calculated separately and are not doubled by this token multiplier.

FormatInput accountingOutput accounting
Responsesinput_tokens includes input_tokens_details.cached_tokensoutput_tokens includes reasoning; do not add the reasoning breakdown again
Chatprompt_tokens includes prompt_tokens_details.cached_tokensxAI reports visible completion_tokens separately; total billable output is total_tokens - prompt_tokens, including reasoning
Messagesinput_tokens excludes cache_read_input_tokens; add cache fields to obtain total inputoutput_tokens is the output total

Public responses include usage counters, not monetary cost fields. Your usage records show the final charge. Failed requests are not charged.

Conversation history and current limits

For stateless continuation, send the previous input, every returned output item, and the next user message as the new input. With Chat or Messages, send the complete message history in that format. Preserve encrypted reasoning and tool items unchanged where returned.

The current service cannot continue using previous_response_id, retrieve or delete a stored response, list stored input items, or return deferred Chat completions. store: true may be accepted on creation, but that does not establish response storage or retrieval support. These fields remain in the official contract and the playground; this limitation is not a replacement definition of their behavior.

File attachments have not worked with the tested inline-text and PDF URL inputs. Image-generation requests returned text without images, and tool search did not complete server-side discovery. These capabilities are not verified as available. Collections search also requires a valid collection resource and has not been verified.

Chat ignores frequency_penalty, presence_penalty, logit_bias, stop, logprobs and top_logprobs. Responses ignores background, context_management, metadata, truncation, logprobs and top_logprobs. They are not forwarded or offered as active controls.

Errors

An invalid request returns an error instead of a completed answer. Check the field values and the public error reference. Requests that return an error are not charged.