xAI API
API documentation for xAI's Grok models.
Key features
- Generate and stream text with reasoning and structured outputs
- Generate and edit images, including multi-image edits
- Generate, edit, and extend video from images or text
- Speech-to-speech, text-to-speech, and speech-to-text
- Function calling, web search, X search, and code execution
- Category
- LLM APIs
- Who it's for
- Developers building with the Grok API in their own tools.
- Tags
- apixaillm-apitool-callingnotes-docsvoice-speechimage-videosearch
- Website
- docs.x.ai
- Listed
- 2026-09-15
Frequently asked questions
Is xAI API free?
No. xAI API is a paid product with no free plan listed on its site.
What is xAI API used for?
API documentation for xAI's Grok models. Typical uses: generate and stream text with reasoning and structured outputs; generate and edit images, including multi-image edits; generate, edit, and extend video from images or text.
What are the best xAI API alternatives?
Alternatives in the same category include Mistral, OpenRouter, Replicate, DeepInfra, fal.
Related in LLM APIs
See all →- Amazon Bedrock AWS API for foundation models, including Anthropic and Amazon models.
- Anthropic Console Console and API for Claude models.
- Azure OpenAI OpenAI models hosted on Microsoft Azure.
- Cohere API for Cohere's command and embed models.
- DeepInfra Hosted inference API for open models.
- DeepSeek DeepSeek's models and API.