APIMart
Back to all models

Grok 4.7 API

xAIModel ID grok-4.7Text modelReleased September 21, 2026

Use Grok 4.7 to check a voltage divider’s output under load, find the clauses in an NDA that work against you, or list every place an endpoint needs to change to add pagination.

Max input
500,000 tokens
Max output
128,000 tokens
Input → output
Text, Image → Text
Knowledge cutoff
May 2026
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

Grok 4.7 API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on Grok 4.7.

Try Grok 4.7 with your own material

Checking engineering calculations

Send the circuit or design notes with the load conditions, and have Grok 4.7 work out the actual values step by step, show where they differ from the design intent, and suggest a fix. Confirm critical parameters with simulation or measurement.

Example: Is this voltage divider still right under load?

Material

Design notes
5 V input, top resistor R1 = 10 kΩ, bottom resistor R2 = 20 kΩ, output to an ADC pin, expected 3.3 V.
Load
The ADC pin has an input impedance of 20 kΩ.

PromptUsing the design notes and the load, calculate the output voltage with and without the load, say how far off it is and why, and suggest a fix.

Sample answer · written by hand to show the reasoning

Unloaded, the output is 5 × 20 ÷ (10 + 20) ≈ 3.33 V. With the 20 kΩ load, the bottom leg becomes 20 kΩ in parallel with 20 kΩ = 10 kΩ, and the output drops to 5 × 10 ÷ (10 + 10) = 2.5 V, about 0.83 V below the target. Use 1 kΩ and 2 kΩ for the divider, which cuts the loading error to about 3%, or add a voltage follower after the divider.

About the Grok 4.7 API

  • xAI’s most capable model

    xAI released Grok 4.7 on September 21, 2026 for coding, agentic tasks, and knowledge work. xAI says it works longer on difficult tasks and checks its own work more carefully.

  • Same price and speed as Grok 4.6

    Grok 4.7 uses a larger base model than Grok 4.6 at the same price and speed. In xAI’s published results, CursorBench 4.0 rises from 40.4% to 46.3%.

  • Reasoning always on, four effort levels

    Reasoning effort can be low, medium, high or xhigh, with high as the default. According to xAI’s docs, reasoning models cannot use the presence_penalty, frequency_penalty and stop parameters.

  • Grok 4.7 API key and access

    You don’t need a separate Grok 4.7 API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID grok-4.7.

Grok 4.7 official benchmark results

Selected results xAI published at launch.

  • CursorBench 4.0 (xhigh)

    46.3%

    Longer-running coding tasks. Ahead of Grok 4.6 (40.4%) and GPT-5.6 Sol (41.7%), behind Claude Fable 5.1 (51.8%).

  • DeepSWE v1.1 (high)

    71.0%

    A software engineering evaluation. Ahead of Grok 4.6 (65.2%) and Claude Fable 5.1 (70.0%), slightly behind GPT-5.6 Sol (72.7%).

  • EEBench (xhigh)

    64.0%

    An electrical engineering evaluation. Ahead of Claude Fable 5.1 (56.4%), Grok 4.6 (53.0%) and GPT-5.6 Sol (39.4%).

  • Harvey Legal Agent Benchmark (xhigh)

    19.6%

    A legal work evaluation. Ahead of Grok 4.6 (15.8%), Claude Fable 5.1 (6.7%) and GPT-5.6 Sol (2.5%).

  • AA Briefcase v1.1 (xhigh)

    1,657

    Multi-hour office work drawn from tasks done by professionals such as lawyers, nurses and financial analysts. Ahead of Grok 4.6 (1,546) and GPT-5.6 Sol (1,487), slightly behind Claude Fable 5.1 (1,678).

  • HealthBench Professional (xhigh)

    56.7%

    A clinical reasoning evaluation. Ahead of Grok 4.6 (48.5%), behind GPT-5.6 Sol (60.5%) and Claude Fable 5.1 (62.1%).

How to call the Grok 4.7 API

To call Grok 4.7, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-4.7",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

Grok 4.7 access details

Model IDgrok-4.7
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

Grok 4.7 API request parameters

Grok 4.7 uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use grok-4.7 for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

Grok 4.7 API pricing

The Grok 4.7 API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input16Credits~$1.615.2Credits~$1.5214.4Credits~$1.4420Credits~$220%
Cached input4Credits~$0.43.8Credits~$0.383.6Credits~$0.365Credits~$0.520%
Output48Credits~$4.845.6Credits~$4.5643.2Credits~$4.3260Credits~$620%

Prices are for reference only. View full pricing

Why call Grok 4.7 API through APIMart

  • 20% below official pricing

    Grok 4.7 API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below xAI's official prices, and cached input costs just $0.4 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    Grok 4.7, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try Grok 4.7 with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Grok 4.7 FAQ

How is Grok 4.7 different from Grok 4.6?

Grok 4.7 uses a larger base model than Grok 4.6, and Grok 4.7 pricing and speed are the same. In xAI’s published results it rises from 40.4% to 46.3% on CursorBench 4.0 and from 53.0% to 64.0% on EEBench; the context window is unchanged. To switch from Grok 4.6, set model to grok-4.7 and rerun your own prompts to check the output.

How is input of 200K tokens or more billed?

Under xAI’s pricing rules, when a request’s prompt reaches 200,000 tokens, every token in that request is billed at the higher tier: input, cached input and output all cost 2x the base tier. The pricing table on this page shows the base tier; the higher-tier prices are on the pricing page.

Can I turn off reasoning on Grok 4.7?

No. According to xAI’s docs, reasoning on Grok 4.7 cannot be disabled; effort can be low, medium, high or xhigh, with high as the default. The docs also say reasoning models cannot use the presence_penalty, frequency_penalty and stop parameters, and requests that include them return an error.

Can Grok 4.7 access real-time information?

Not by itself. According to xAI’s docs, Grok 4.7 has a knowledge cutoff of May 2026 and has no access to later events without search tools; real-time information comes from xAI’s server-side search tools (Web Search and X Search). The examples on this page do not include search tools, so when you need current information, put the relevant material in the request.

Why is the APIMart output limit different from xAI’s documentation?

xAI does not specify a fixed text output limit in its documentation. For calls through APIMart, use the limit shown on this page: 128,000 tokens per request.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select Grok 4.7 in the text category to start exploring.

Which model ID does the Grok 4.7 API use?

Set model to grok-4.7. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of Grok 4.7?

On APIMart, Grok 4.7 accepts up to 500,000 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

Grok 4.7 can output up to 128,000 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the Grok 4.7 API cost?

The Grok 4.7 API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.6 per million input tokens and $4.8 per million output tokens. Diamond: $1.44 per million input tokens and $4.32 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.