xAI API
Hosted API for the Grok models, billed per token.
What it does
- Text generation
- Code generation
- Image generation
- Video generation
How it compares
-
Grok
Grok Models & Pricing | SpaceXAI Docs
Official documentation · 5 Sep 2026 -
Claude API
Can I use the OpenAI or Anthropic SDK with Grok? Yes. Point your existing SDK at base URL https://api.x.ai/v1 with your SpaceXAI API key.
Official documentation · 19 Sep 2026 -
OpenAI API
Can I use the OpenAI or Anthropic SDK with Grok? Yes. Point your existing SDK at base URL https://api.x.ai/v1 with your SpaceXAI API key.
Official documentation · 19 Sep 2026
Sources
- Pricing
- Sold within
-
Official documentation · 30 Sep 2026
xAI's API pricing page states "All prices are in USD." and lists per-model token rates, e.g. grok-4.7 at "$2.00" input and "$6.00" output per 1M tokens, plus Imagine and Voice API rates.
- Interfaces
-
Official documentation · 28 Sep 2026
Docs show REST calls to https://api.x.ai/v1 with a bearer API key (x.ai/api itself returned 403, so the docs subdomain was used).
Also from xAI
-
Grok Application
Assistant for chat, real-time web and X search, image generation and voice, on the web and in the X apps.
-
Grok Bot AI agent
Persistent AI teammate agents that retain context and learn from prior work across sessions, for delegated business tasks (e.g. account management).
-
Grok Build AI agent
Terminal-based coding agent powered by Grok 4.6 with plan mode, subagents, skills, plugins and MCP-server support for software development workflows.
-
Grok Imagine API API service
API for generating and editing images and video via Grok Imagine, distinct from the consumer Imagine surface inside the Grok app.
-
Grokipedia Application
AI-generated reference encyclopedia, freely browsable without sign-in, listed in x.ai's own top-level Products nav.
-
Grok Voice API service
Voice agent builder and API suite from xAI: real-time speech-to-speech conversational agents, speech-to-text transcription, text-to-speech, voice cloning and (upcoming) live translation, built on Grok.
Something wrong here? Send a correction — quote this product id: xai-api.