llms.txt Content
===/overview===
# Get started
Build with Grok — intelligent, fast, and cost-effective models across code, text, voice, image, and video.
## Models
We offer a range of models supporting multiple use cases and modalities.
### [Code API](/build/overview)
Agentic coding with Grok Build (\{\{LATEST\_CODE\_MODEL\_NAME}}), our coding model, on the API and CLI.
* Agentic coding workflows
* Powers Grok Build
* Available on the API in early access
### [Responses API](/developers/model-capabilities/text/generate-text)
Generate text, have conversations, use tools, and build AI-powered applications.
* Generate text
* Multi-turn chat
* Function calling
### [Voice API](/developers/model-capabilities/audio/text-to-speech)
Convert text to natural speech or transcribe audio with our voice models.
* Text to speech
* Speech to text
* Real-time voice
### [Imagine API (Images)](/developers/model-capabilities/images/generation)
Generate stunning images from text, edit existing images, and understand visual content.
* Generate images
* Edit images
* Precise control
### [Imagine API (Video)](/developers/model-capabilities/video/generation)
Bring an image to life, start from a simple text prompt, or refine a complex cinematic sequence.
* Generate videos
* Edit videos
* Precise control
## Quick Start
```python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_XAI_API_KEY",
base_url="https://api.x.ai/v1",
)
response = client.responses.create(
model="grok-4.5",
input="Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}",
)
print(response.output_text)
```
```bash
curl https://api.x.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4.5",
"input": "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}"
}'
```
## Get Started
* [Quickstart guide](/developers/quickstart)
* [Grok Build overview](/bu
OpenAPI Spec (preview)
{"openapi":"3.1.0","info":{"title":"xAI's REST API","description":"REST API for xAI compatible with other providers.","license":{"name":""},"version":"1.0.0"},"paths":{"/v1/api-key":{"get":{"tags":["v1"],"summary":"Get information about an API key, including name, status, permissions and users who created or modified this key.","operationId":"handle_get_api_key_info_request","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}