- Tool type
- Developer API for Grok models
- Made for
- Developers building applications
- Runs on
- Remote API endpoint (api.x.ai)
- Requests are sent over HTTP to api.x.ai from code run by the developer.
What it does
The SpaceXSI API takes text prompts and other inputs in the form of HTTP requests and returns model output such as generated text, and separately offers voice (speech-to-text and text-to-speech) and image and video generation through its Imagine and Voice APIs. Grok 4.7 is the flagship chat and coding model, with a 500k-token context window, configurable reasoning, and support for agentic tool calling.
Developers typically create an API key in the console, export it as an environment variable, install an SDK such as the OpenAI-compatible client or the Vercel AI SDK provider, and send requests to the responses endpoint. Server-side Web Search and X Search tools can add realtime data, since the models otherwise have a knowledge cutoff of May 2026.
This suits developers building applications or coding workflows against a metered API. Access requires an account at console.x.ai, loaded with credits, and an API key. Pricing is per token for text models and per minute, character, or unit for voice and media. Models do not access current events without enabling search tools, and some models do not support Batch API requests.
What it can do
- Text and code generation through the responses endpoint with the grok-4.7 model
- Agentic tool calling and configurable reasoning
- Image input for jpg/jpeg and png files up to 20MiB
- Real-time speech-to-text (batch and streaming) and text-to-speech via the Voice API
- Image and video generation and editing through the Imagine API
- Server-side Web Search and X Search tools for realtime data
Works with
- OpenAI-compatible client libraries (base URL https://api.x.ai/v1)
- Vercel AI SDK via @ai-sdk/xai
- xai-sdk Python package
Example workflows
- Code fix explanation
- Input: a function with a bug, sent as a prompt to grok-4.7 via the responses endpoint. Steps: set XAI_API_KEY, install an SDK, call responses.create with model grok-4.7. Output: model text that fixes the function and explains the bug.
- Voice transcription pipeline
- Input: an audio file for batch transcription or a live audio stream. Steps: choose the batch or streaming speech-to-text endpoint and send audio through the Voice API. Output: transcribed text, billed per hour of audio.
Before you choose
- Grok models have no access to current events unless server-side Web Search or X Search tools are enabled.
- logprobs and top_logprobs are not supported by grok-4.20 and newer; they are silently ignored.
- Some models do not accept Batch API requests; check each model page.
Listed under
Get started
Sign up at console.x.ai, load credits, then generate an API key.
- Create an account at console.x.ai and load credits.
- Generate an API key on the API Keys page and export it as XAI_API_KEY or store it in a .env file.
- Install an SDK (openai, @ai-sdk/xai with ai and zod, or xai-sdk) and send a request to https://api.x.ai/v1.
Plans and prices
Prices in USDGrok 4.7 is priced at $2.00 per 1M input tokens and $6.00 per 1M output tokens. Voice and Imagine APIs are priced per minute, character, image, or second. The published information does not confirm a free tier or trial. Check the pricing page for tool and Batch API rates.
- 500k context window
- Configurable reasoning
Source: docs.x.ai/developers/models, checked 28 Oct 2026. Prices can change; check before you buy.
Sources for this overview
Product pages, documentation, and pricing checked 28 Oct 2026. Each source supports part of the overview; availability and prices can change.
Ratings and reviews
No ratings for SpaceXSI API yet.
What’s changed
Free accountSignals
Free accountData and security
Free accountCompare with similar tools
Free accountWhere this comes from
How we research- Company website
- x.ai: product, pricing and policy pages
- Web archive
- When the site first appeared
- YC directory mirror
- Batch and company name
- Web search
- Confirms the official site
- Social accounts
- Accounts the company links, and its posts on X
- Human review
- Checked by a person
- knowledge_base
Last checked 28 Oct 2026. Every field keeps its source and date; unknown means we couldn’t confirm it.