Grok 4.7 API — xAI's latest Grok 4.7 flagship with sharp reasoning, 500K context, and direct technical clarity
xAI Grok 4.7 with transparent per-1M-token pricing (Input 500 cr / $2.50, Output 1,500 cr / $7.50). Known for crisp first-principles engineering answers, witty copy, and strong analytical synthesis.
Key capabilities of Grok 4.7
Supported through the same request schema.
500K Context Window — available on every request to /v1/market/text/grok-4-7.
First-Principles Reasoning — available on every request to /v1/market/text/grok-4-7.
Input 500 cr · Output 1,500 cr / 1M — available on every request to /v1/market/text/grok-4-7.
Sync, Polling & Webhooks — available on every request to /v1/market/text/grok-4-7.
Parameters
| Parameter | Type | Default / values | Description |
|---|---|---|---|
promptrequired | textarea | — | Prompt or message sent to the text model. |
wait | boolean | true | Return result immediately (default true), or set false for async polling + webhook. |
callback_url | string | — | Optional HTTPS URL notified via POST when complete. |
Pricing
| Tier | Credits / 1M tok | USD / 1M tok | Notes |
|---|---|---|---|
| Base Output | 500 credits | ≈ $2.50 | Standard rate |
How to get started
- 1Create an API key
Open the dashboard and create a key for your project.
API keys → - 2POST /v1/market/text/grok-4-7
Send the same JSON you built in the playground with your key as a Bearer token.
- 3Read the output directly
Synchronous models return the output directly in the response, or pass wait: false to poll.
Docs →
FAQ
How is Grok 4.7 billed?
Input 500 cr ($2.50) · Output 1500 cr ($7.50) / 1M tok. Metered per million input and output tokens — unused credit reservations are automatically released back to your balance, and the playground shows the estimated credit cost before each run.
What if a generation fails?
Credits are reserved when the task starts and refunded automatically if the provider errors, times out or the task is cancelled.
Is the response synchronous?
Yes — this endpoint supports returning the completed result directly when wait is true, or set wait: false to receive a taskId for polling and webhooks.
Where are outputs stored?
Outputs are copied to durable CDN storage and returned as HTTPS URLs on the task, so links stay valid after the provider's temporary URL expires.



