# SpaceXSI API Documentation > Official SpaceXSI (xAI) developer documentation at https://docs.x.ai — Grok models, REST API reference, SDKs, guides, pricing, and app docs. The API is served at https://api.x.ai. Every documentation page is available as markdown: append `.md` to its URL, or request the page URL with an `Accept: text/markdown` header. Add the programming language you want code examples in to the `Accept-Language` header (for example `Accept-Language: en, python`) to receive only that language’s examples. Pin an SDK with a subtag: `python-xai`, `python-openai`, `javascript-ai-sdk`, `javascript-openai`. ## API - [Get Started](https://docs.x.ai/developers/quickstart.md) - [Get Started — Overview](https://docs.x.ai/overview.md) - [Get Started — Grok 4.7](https://docs.x.ai/developers/grok-4-7.md) - [Get Started — Models](https://docs.x.ai/developers/models.md) - [Get Started — Pricing](https://docs.x.ai/developers/pricing.md) - [Get Started — Release Notes](https://docs.x.ai/developers/release-notes.md) - [Text](https://docs.x.ai/developers/model-capabilities/text/generate-text.md) - [Text — Streaming](https://docs.x.ai/developers/model-capabilities/text/streaming.md) - [Text — Reasoning](https://docs.x.ai/developers/model-capabilities/text/reasoning.md) - [Text — Structured Outputs](https://docs.x.ai/developers/model-capabilities/text/structured-outputs.md) - [Text — Image Understanding](https://docs.x.ai/developers/model-capabilities/images/understanding.md) - [Text — Multi Agent](https://docs.x.ai/developers/model-capabilities/text/multi-agent.md) - [Text — Best Practices Guide](https://docs.x.ai/developers/model-capabilities/text/best-practices.md) - [Imagine](https://docs.x.ai/developers/model-capabilities/imagine.md) - [Imagine — Image Generation](https://docs.x.ai/developers/model-capabilities/images/generation.md) - [Imagine — Image Editing](https://docs.x.ai/developers/model-capabilities/images/editing.md) - [Imagine — Multi-Image Editing](https://docs.x.ai/developers/model-capabilities/images/multi-image-editing.md) - [Imagine — Image Prompting Guide](https://docs.x.ai/developers/model-capabilities/images/prompting-guide.md) - [Imagine — Video Generation](https://docs.x.ai/developers/model-capabilities/video/generation.md) - [Imagine — Video Overview](https://docs.x.ai/developers/model-capabilities/video/overview.md) - [Imagine — Image-to-Video](https://docs.x.ai/developers/model-capabilities/video/image-to-video.md) - [Imagine — Reference-to-Video](https://docs.x.ai/developers/model-capabilities/video/reference-to-video.md) - [Imagine — Video Editing](https://docs.x.ai/developers/model-capabilities/video/editing.md) - [Imagine — Video Extension](https://docs.x.ai/developers/model-capabilities/video/extension.md) - [Voice](https://docs.x.ai/developers/model-capabilities/audio/voice.md) - [Voice — Speech to Speech](https://docs.x.ai/developers/model-capabilities/audio/speech-to-speech.md) - [Voice — Speech to Speech — SIP Phone Calls](https://docs.x.ai/developers/model-capabilities/audio/speech-to-speech/sip.md) - [Voice — Speech to Speech — Prompting Guide](https://docs.x.ai/developers/model-capabilities/audio/speech-to-speech/prompting-guide.md) - [Voice — Text to Speech](https://docs.x.ai/developers/model-capabilities/audio/text-to-speech.md) - [Voice — Speech to Text](https://docs.x.ai/developers/model-capabilities/audio/speech-to-text.md) - [Voice — Custom Voices](https://docs.x.ai/developers/model-capabilities/audio/custom-voices.md) - [Voice — Ephemeral Tokens](https://docs.x.ai/developers/model-capabilities/audio/ephemeral-tokens.md) - [Files & Collections](https://docs.x.ai/developers/files.md) - [Files & Collections — Managing Files](https://docs.x.ai/developers/files/managing-files.md) - [Files & Collections — Public URLs](https://docs.x.ai/developers/files/public-urls.md) - [Files & Collections — Chat with Files](https://docs.x.ai/developers/model-capabilities/files/chat-with-files.md) - [Files & Collections — Collections](https://docs.x.ai/developers/files/collections.md) - [Files & Collections — Collections via API](https://docs.x.ai/developers/files/collections/api.md) - [Files & Collections — Collection Metadata](https://docs.x.ai/developers/files/collections/metadata.md) - [Files & Collections — Generated Media](https://docs.x.ai/developers/model-capabilities/imagine/files.md) - [Files & Collections — Generated Media — Referencing Files as Input](https://docs.x.ai/developers/model-capabilities/imagine/files/inputs.md) - [Files & Collections — Generated Media — Persisting Generated Output](https://docs.x.ai/developers/model-capabilities/imagine/files/outputs.md) - [Tools](https://docs.x.ai/developers/tools/overview.md) - [Tools — Function Calling](https://docs.x.ai/developers/tools/function-calling.md) - [Tools — Web Search](https://docs.x.ai/developers/tools/web-search.md) - [Tools — X Search](https://docs.x.ai/developers/tools/x-search.md) - [Tools — Code Execution](https://docs.x.ai/developers/tools/code-execution.md) - [Tools — Image Generation](https://docs.x.ai/developers/tools/image-generation.md) - [Tools — Collections Search (RAG)](https://docs.x.ai/developers/tools/collections-search.md) - [Tools — Remote MCP Tools](https://docs.x.ai/developers/tools/remote-mcp.md) - [Tools — In Depth](https://docs.x.ai/developers/tools/citations.md) - [Tools — In Depth — Streaming & Sync](https://docs.x.ai/developers/tools/streaming-and-sync.md) - [Tools — In Depth — Tool Usage Details](https://docs.x.ai/developers/tools/tool-usage-details.md) - [Tools — In Depth — Advanced Usage](https://docs.x.ai/developers/tools/advanced-usage.md) - [Advanced API Usage](https://docs.x.ai/developers/rate-limits.md) - [Advanced API Usage — Prompt Caching](https://docs.x.ai/developers/advanced-api-usage/prompt-caching.md) - [Advanced API Usage — Prompt Caching — How It Works](https://docs.x.ai/developers/advanced-api-usage/prompt-caching/how-it-works.md) - [Advanced API Usage — Prompt Caching — Maximizing Cache Hits](https://docs.x.ai/developers/advanced-api-usage/prompt-caching/maximizing-cache-hits.md) - [Advanced API Usage — Prompt Caching — What Breaks Caching](https://docs.x.ai/developers/advanced-api-usage/prompt-caching/multi-turn.md) - [Advanced API Usage — Prompt Caching — Usage & Pricing](https://docs.x.ai/developers/advanced-api-usage/prompt-caching/usage-and-pricing.md) - [Advanced API Usage — Prompt Caching — Best Practices & FAQ](https://docs.x.ai/developers/advanced-api-usage/prompt-caching/best-practices.md) - [Advanced API Usage — Context Compaction](https://docs.x.ai/developers/advanced-api-usage/context-compaction.md) - [Advanced API Usage — Priority Processing](https://docs.x.ai/developers/advanced-api-usage/priority-processing.md) - [Advanced API Usage — Batch API](https://docs.x.ai/developers/advanced-api-usage/batch-api.md) - [Advanced API Usage — Deferred Completions](https://docs.x.ai/developers/advanced-api-usage/deferred-chat-completions.md) - [Advanced API Usage — Async Requests](https://docs.x.ai/developers/advanced-api-usage/async.md) - [Advanced API Usage — WebSocket Mode](https://docs.x.ai/developers/advanced-api-usage/websocket-mode.md) - [Advanced API Usage — mTLS Authentication](https://docs.x.ai/developers/advanced-api-usage/mtls.md) - [Advanced API Usage — Regional Endpoints](https://docs.x.ai/developers/advanced-api-usage/regions.md) - [Advanced API Usage — Cost Tracking](https://docs.x.ai/developers/cost-tracking.md) - [Advanced API Usage — Debugging Errors](https://docs.x.ai/developers/debugging.md) - [Platforms](https://docs.x.ai/developers/community.md) - [Platforms — Google Cloud Vertex AI](https://docs.x.ai/developers/community/google-cloud-vertex-ai.md) - [Platforms — Microsoft Foundry](https://docs.x.ai/developers/community/microsoft-foundry.md) - [Platforms — Docs MCP](https://docs.x.ai/developers/docs-mcp.md) - [Migration Guides](https://docs.x.ai/developers/migration/imagine-image-quality-nov-2.md) - [Migration Guides — Model Retirement (May 15, 2026)](https://docs.x.ai/developers/migration/may-15-retirement.md) - [Migration Guides — Migrating to Responses API](https://docs.x.ai/developers/model-capabilities/text/comparison.md) - [Migration Guides — Chat Completions (Legacy)](https://docs.x.ai/developers/model-capabilities/legacy/chat-completions.md) - [FAQ](https://docs.x.ai/developers/faq/security.md) - [FAQ — General](https://docs.x.ai/developers/faq/general.md) ## API Reference - [Inference API](https://docs.x.ai/developers/rest-api-reference/inference.md) - [Inference API — Responses](https://docs.x.ai/developers/rest-api-reference/inference/responses.md) - [Inference API — Chat Completions](https://docs.x.ai/developers/rest-api-reference/inference/chat-completions.md) - [Inference API — Images](https://docs.x.ai/developers/rest-api-reference/inference/images.md) - [Inference API — Videos](https://docs.x.ai/developers/rest-api-reference/inference/videos.md) - [Inference API — Voice](https://docs.x.ai/developers/rest-api-reference/inference/voice.md) - [Inference API — Files](https://docs.x.ai/developers/rest-api-reference/files.md) - [Inference API — Files — Upload a file](https://docs.x.ai/developers/rest-api-reference/files/upload.md) - [Inference API — Files — List files](https://docs.x.ai/developers/rest-api-reference/files/manage.md) - [Inference API — Files — Get file content](https://docs.x.ai/developers/rest-api-reference/files/download.md) - [Inference API — Batches](https://docs.x.ai/developers/rest-api-reference/inference/batches.md) - [Inference API — Models](https://docs.x.ai/developers/rest-api-reference/inference/models.md) - [Inference API — Account](https://docs.x.ai/developers/rest-api-reference/inference/other.md) - [Inference API — Legacy & Deprecated](https://docs.x.ai/developers/rest-api-reference/inference/legacy.md) - [Collections API](https://docs.x.ai/developers/rest-api-reference/collections.md) - [Collections API — Collection Management](https://docs.x.ai/developers/rest-api-reference/collections/collection.md) - [Collections API — Search in Collections](https://docs.x.ai/developers/rest-api-reference/collections/search.md) - [Management API](https://docs.x.ai/developers/rest-api-reference/management.md) - [Management API — Using Management API](https://docs.x.ai/developers/management-api-guide.md) - [Management API — Accounts and Authorization](https://docs.x.ai/developers/rest-api-reference/management/auth.md) - [Management API — Billing Management](https://docs.x.ai/developers/rest-api-reference/management/billing.md) - [Management API — Audit Logs](https://docs.x.ai/developers/rest-api-reference/management/audit.md) ## Grok Build - [Get Started](https://docs.x.ai/build/overview.md) - [Get Started — Modes and Commands](https://docs.x.ai/build/modes-and-commands.md) - [Get Started — Keyboard Shortcuts](https://docs.x.ai/build/keyboard-shortcuts.md) - [Features](https://docs.x.ai/build/features/skills-plugins-marketplaces.md) - [Features — AGENTS.md](https://docs.x.ai/build/features/project-rules.md) - [Features — MCP Servers](https://docs.x.ai/build/features/mcp-servers.md) - [Features — Hooks](https://docs.x.ai/build/features/hooks.md) - [Features — Sessions](https://docs.x.ai/build/features/sessions.md) - [Features — Plan Mode](https://docs.x.ai/build/features/plan-mode.md) - [Features — Permissions](https://docs.x.ai/build/features/permissions.md) - [Features — Sandbox](https://docs.x.ai/build/features/sandbox.md) - [Features — Subagents](https://docs.x.ai/build/features/subagents.md) - [Features — Worktrees](https://docs.x.ai/build/features/worktrees.md) - [Features — Background Tasks](https://docs.x.ai/build/features/background-tasks.md) - [Features — Agent Dashboard](https://docs.x.ai/build/features/dashboard.md) - [Features — Status Line](https://docs.x.ai/build/features/status-line.md) - [Features — Theming](https://docs.x.ai/build/features/theming.md) - [Settings](https://docs.x.ai/build/settings.md) - [Settings — Reference](https://docs.x.ai/build/settings/reference.md) - [Settings — ZDR Video Storage](https://docs.x.ai/build/settings/zdr-video-storage.md) - [CLI](https://docs.x.ai/build/cli/headless-scripting.md) - [CLI — Reference](https://docs.x.ai/build/cli/reference.md) - [CLI — Terminal Support](https://docs.x.ai/build/cli/terminal-support.md) - [Enterprise](https://docs.x.ai/build/enterprise.md) ## Grok Bot - [Get Started](https://docs.x.ai/grok-bot/overview.md) - [Get Started — Get started](https://docs.x.ai/grok-bot/get-started.md) - [Get Started — Use cases](https://docs.x.ai/grok-bot/use-cases.md) - [Get Started — Grok Bot for Mobile](https://docs.x.ai/grok-bot/mobile.md) - [Work with Grok Bot](https://docs.x.ai/grok-bot/bots.md) - [Work with Grok Bot — Team Bots](https://docs.x.ai/grok-bot/team-bots.md) - [Work with Grok Bot — Message and collaborate](https://docs.x.ai/grok-bot/chat-and-collaboration.md) - [Work with Grok Bot — Tag @bot on X](https://docs.x.ai/grok-bot/tag-on-x.md) - [Work with Grok Bot — Files and results](https://docs.x.ai/grok-bot/files-and-results.md) - [Work with Grok Bot — Use the computer and apps](https://docs.x.ai/grok-bot/computer-and-apps.md) - [Work with Grok Bot — Skills and routines](https://docs.x.ai/grok-bot/skills-routines-and-automations.md) - [Manage and protect](https://docs.x.ai/grok-bot/settings-and-notifications.md) - [Manage and protect — Approvals, security, and privacy](https://docs.x.ai/grok-bot/approvals-security-and-privacy.md) - [Manage and protect — Teams and enterprises](https://docs.x.ai/grok-bot/teams-and-enterprises.md) - [Manage and protect — Teams and enterprises — Deploy to your organization](https://docs.x.ai/grok-bot/deployment.md) - [Manage and protect — Teams and enterprises — Identity and access](https://docs.x.ai/grok-bot/identity-and-access.md) - [Manage and protect — Teams and enterprises — Private networks](https://docs.x.ai/grok-bot/private-networks.md) - [Manage and protect — Teams and enterprises — TLS-inspecting proxies](https://docs.x.ai/grok-bot/proxies.md) - [Manage and protect — Teams and enterprises — Manage computers](https://docs.x.ai/grok-bot/computers.md) - [Manage and protect — Teams and enterprises — Inference hooks](https://docs.x.ai/grok-bot/inference-hooks.md) - [Manage and protect — Teams and enterprises — Grok Bot security](https://docs.x.ai/grok-bot/security.md) - [Manage and protect — Teams and enterprises — Grok Bot security FAQ](https://docs.x.ai/grok-bot/security-faq.md) - [Help](https://docs.x.ai/grok-bot/troubleshooting.md) - [Help — FAQ](https://docs.x.ai/grok-bot/faq.md) ## Grok - [Get Started](https://docs.x.ai/grok/overview.md) - [Help & FAQ](https://docs.x.ai/grok/faq.md) - [Connectors](https://docs.x.ai/grok/connectors.md) - [Connectors — Google Drive](https://docs.x.ai/grok/connectors/google-drive.md) - [Connectors — Gmail & Google Calendar](https://docs.x.ai/grok/connectors/gmail-google-calendar.md) - [Connectors — Outlook Mail & Calendar](https://docs.x.ai/grok/connectors/outlook.md) - [Connectors — SharePoint](https://docs.x.ai/grok/connectors/sharepoint.md) - [Connectors — OneDrive](https://docs.x.ai/grok/connectors/onedrive.md) - [Connectors — Microsoft Teams](https://docs.x.ai/grok/connectors/microsoft-teams.md) - [Connectors — Salesforce](https://docs.x.ai/grok/connectors/salesforce.md) - [Connectors — Custom MCP Tunneling](https://docs.x.ai/grok/connectors/custom-mcp-tunneling.md) - [Business & Enterprise](https://docs.x.ai/grok/user-guide.md) - [Business & Enterprise — License & User Management](https://docs.x.ai/grok/management.md) - [Business & Enterprise — Connector Management](https://docs.x.ai/grok/connector-management.md) - [Business & Enterprise — Organization Management](https://docs.x.ai/grok/organization.md) ## The X Subscription - [Get Started](https://docs.x.ai/x-subscription/overview.md) - [Get Started — Do I have to switch?](https://docs.x.ai/x-subscription/do-i-have-to-switch.md) - [Get Started — Who can combine accounts?](https://docs.x.ai/x-subscription/eligibility.md) - [Get Started — How to unify accounts](https://docs.x.ai/x-subscription/unify-accounts.md) - [Get Started — I have more than one Cursor account](https://docs.x.ai/x-subscription/multiple-cursor-accounts.md) - [Get Started — X Premium customers](https://docs.x.ai/x-subscription/x-premium.md) - [Get Started — Enterprise account unification](https://docs.x.ai/x-subscription/enterprise.md) - [Plans and usage](https://docs.x.ai/x-subscription/pricing.md) - [Plans and usage — Usage limits](https://docs.x.ai/x-subscription/usage-limits.md) - [Plans and usage — Extra usage credits and top-ups](https://docs.x.ai/x-subscription/extra-usage.md) - [Plans and usage — Prepaid balance and automatic top-ups](https://docs.x.ai/x-subscription/prepaid-balance.md) - [Plans and usage — Spending caps and alerts](https://docs.x.ai/x-subscription/spending-caps.md) - [Plans and usage — Cursor Token Rate](https://docs.x.ai/x-subscription/cursor-token-rate.md) - [Manage your subscription](https://docs.x.ai/x-subscription/manage.md) - [Manage your subscription — Upgrade or downgrade](https://docs.x.ai/x-subscription/upgrade-or-downgrade.md) - [Manage your subscription — Team plans, seats, and invites](https://docs.x.ai/x-subscription/team-plans.md) - [Manage your subscription — Payment methods](https://docs.x.ai/x-subscription/payment-methods.md) - [Manage your subscription — Invoices & Refunds](https://docs.x.ai/x-subscription/invoices-and-refunds.md) - [Manage your subscription — Cancel your subscription](https://docs.x.ai/x-subscription/cancel.md) - [Manage your subscription — App Store subscriptions](https://docs.x.ai/x-subscription/app-store.md) - [Manage your subscription — Google Play subscriptions](https://docs.x.ai/x-subscription/google-play.md) - [Sign-in](https://docs.x.ai/x-subscription/sign-in.md) - [Sign-in — Sign-in domains](https://docs.x.ai/x-subscription/sign-in-domains.md) - [Grok Bot](https://docs.x.ai/x-subscription/grok-bot.md) - [Grok Bot — Grok Bot sign-in](https://docs.x.ai/x-subscription/grok-bot-sign-in.md) - [Help](https://docs.x.ai/x-subscription/faq.md) ## Cookbook - [Article to Read-Along](https://docs.x.ai/cookbook/examples/article-to-read-along.md): Turn any article into audio that highlights each word as it's spoken, using the per-character timestamps from text to speech, and click a word to jump there. - [Live Interpreter](https://docs.x.ai/cookbook/examples/live-interpreter.md): Speak one language and hear Grok say it in another a moment later, from a page that connects straight to the realtime voice API with a short-lived token. - [Photo to Talking Character](https://docs.x.ai/cookbook/examples/photo-to-talking-character.md): Make a drawing, a mascot, or a pet photo talk in a voice you pick, and have a second character answer, with Grok Imagine reference-to-video. - [Podcast from a Link](https://docs.x.ai/cookbook/examples/podcast-from-a-link.md): Turn an article or a PDF into a two-host podcast episode, and watch it being written and recorded live in a small web app. - [Screenshot to React Component](https://docs.x.ai/cookbook/examples/screenshot-to-component.md): Turn a screenshot of a UI into a React component styled with Tailwind, then have Grok compare the result with the original and fix what doesn't match. - [Company to Call Brief](https://docs.x.ai/cookbook/examples/company-to-call-brief.md): Prep for a sales call with a one-page brief, as Grok searches the web and 𝕏 and looks up the account through CRM functions that run in your app. - [CSV to Answers](https://docs.x.ai/cookbook/examples/csv-to-answers.md): Drop in a CSV and ask questions about it. Grok writes and runs pandas in a sandbox, shows the code it ran, and answers with computed numbers and a chart. - [Database over MCP](https://docs.x.ai/cookbook/examples/database-over-mcp.md): Serve a SQLite database as a small MCP server that only reads, and watch Grok list its tables, read their schemas, and run SQL through it to answer a question. - [Docs to Cited Answers](https://docs.x.ai/cookbook/examples/docs-to-cited-answers.md): Ask questions about a folder of documents and get answers that cite the passages they came from, with a metadata filter that decides which documents count. - [Mobile Voice Apps](https://docs.x.ai/cookbook/examples/voice-agent-mobile.md): Native iOS and Android apps for real-time voice conversations with Grok, plus text-to-speech on iOS. - [Phone Voice Agent](https://docs.x.ai/cookbook/examples/voice-agent-phone.md): A voice agent you can call on the phone, using Twilio. - [Photo to Time-Lapse](https://docs.x.ai/cookbook/examples/photo-to-time-lapse.md): Turn one photo into a time-lapse, like a street through the four seasons, by editing it for each stage and pinning every edit in one Grok Imagine video. - [Product Photo to Video Ad](https://docs.x.ai/cookbook/examples/product-video-ad.md): Turn one product photo into a vertical video ad with a voiceover, as Grok writes the brief, places the product in three scenes, picks one, and animates it. - [Prompt Caching](https://docs.x.ai/cookbook/examples/prompt-caching.md): Play one 30-message chat three ways to see what the prompt cache saves, how the time at the top of the system prompt breaks it, and what compaction costs. - [Prompt Injection Defenses](https://docs.x.ai/cookbook/examples/prompt-injection-defenses.md): Watch poisoned pages try to make an agent leak private data, see each of four defenses miss an attack another catches, and stop all ten with all four on. - [Reasoning Effort Evals](https://docs.x.ai/cookbook/examples/reasoning-effort-evals.md): Run a prompt's test cases at every reasoning effort, grade the answers with code checks and a judge, and find the cheapest effort that's still good enough. - [Receipts to Spreadsheet](https://docs.x.ai/cookbook/examples/receipts-to-spreadsheet.md): Turn receipt photos and PDF invoices into a spreadsheet that adds up, with Grok reading each one twice and flagging the cells where the reads disagree. - [Reviews to Themes](https://docs.x.ai/cookbook/examples/reviews-to-themes.md): Turn a thousand app reviews into ranked themes with counts, trends, and quotes by labeling every review in one Batch API job. - [Storyboard to Short Film](https://docs.x.ai/cookbook/examples/storyboard-to-film.md): Turn a one-line premise into a four-shot short film with Grok Imagine keyframes, image-to-video, and narration, and watch it being made in a small web app. - [Topics to Morning Briefing](https://docs.x.ai/cookbook/examples/topics-to-morning-briefing.md): Turn a few topics into a two-minute spoken briefing from 𝕏 and the web, with Grok skipping the stories it already told you about and a cost cap on every run. - [Web Voice Agent](https://docs.x.ai/cookbook/examples/voice-agent-web.md): A React client with swappable Python and Node.js backends that talk to the Voice Agent API over WebSocket. - [𝕏 Post to Fact-Check](https://docs.x.ai/cookbook/examples/x-post-fact-check.md): Paste a link to a post on 𝕏, and Grok checks each claim on the web and on 𝕏 at the same time and writes a note where every sentence cites a source. - [𝕏 Sentiment Tracker](https://docs.x.ai/cookbook/examples/x-sentiment-tracker.md): Score the sentiment about any topic from live 𝕏 posts with Grok's X Search tool, on a dashboard with a score for every post and the sentiment day by day. - [Bug Report to Fix](https://docs.x.ai/cookbook/examples/bug-report-to-fix.md): Describe a bug in a small repo, and watch Grok reproduce it with a failing test, fix it, and rerun the tests, checking every command before it runs. - [Meeting to Action Items](https://docs.x.ai/cookbook/examples/meeting-to-action-items.md): Caption a call live by speaker, keep a running list of decisions and action items, and ask questions whose answers link to the moment in the transcript. - [Refund Agent with Human Approval](https://docs.x.ai/cookbook/examples/refund-agent-human-approval.md): Build a support agent that stops before a refund, waits for a person to approve it, and resumes the same run from a stored response, even after a restart. - [Video Dubbing](https://docs.x.ai/cookbook/examples/video-dubbing.md): Dub a video into another language, with each line timed to the original speech, shortened by Grok when it runs long, and mixed over the original background. - [WebRTC Voice Agent](https://docs.x.ai/cookbook/examples/voice-agent-webrtc.md): A low-latency browser voice agent that uses WebRTC between the browser and a server, which connects to xAI over WebSocket. ## Machine-readable resources - [OpenAPI specification](https://docs.x.ai/openapi.json): OpenAPI schema for the xAI REST API (https://api.x.ai) - [API catalog](https://docs.x.ai/.well-known/api-catalog): RFC 9727 linkset for the xAI API - [MCP server](https://docs.x.ai/api/mcp): Model Context Protocol server with docs search and retrieval tools - [MCP server card](https://docs.x.ai/.well-known/mcp/server-card.json): connection metadata for the MCP server - [Sitemap](https://docs.x.ai/sitemap.xml): all documentation page URLs - [Authentication reference](https://docs.x.ai/developers/rest-api-reference/management/auth.md): API keys and short-lived management-API tokens ## Optional - [llms-full.txt](https://docs.x.ai/llms-full.txt): every documentation page concatenated into one markdown file (large)