xAI

xAI is an AI research lab founded by Elon Musk. The xAI API exposes Grok foundation models for chat, function calling, vision, voice, image generation, and video generation, alongside research outputs from the Colossus training supercluster.

xAI publishes 1 API contract, indexed on the APIs.io network as 17 APIs, including Api Key API, Chat API, Complete API, and 14 more. Tagged areas include Artificial Intelligence, LLM, Foundation Models, Grok, and Generative AI.

The xAI catalog on APIs.io includes 1 event-driven AsyncAPI specification and 1 Spectral governance ruleset.

xAI’s developer surface includes engineering blog, authentication, documentation, and 11 more developer resources.

Pull xAI's APIs, OpenAPI, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
32.8/100 thin ▬ flat Agent 39/100 agent ready Front door AI 4/6 moderate Heartbeat 90/100 alive saas Full breakdown ↓
scored 2026-11-28 · rubric v0.30.0 · Show this score on your site →
xAI website screenshot
AccessPaid
1 published contract 1 MCP Servers
Artificial IntelligenceLLMFoundation ModelsGrokGenerative AIReal-TimeImage GenerationVideo Generation

What this lets a business do 2

Business capabilities this provider's published APIs can perform, derived from its own contracts. Browse all capabilities →

AI Model Services
AE-110
ChatCompleteCompletionsDocumentsEmbeddingsImages
POST /v1/chat/completions POST /v1/complete POST /v1/completions POST /v1/embeddings
Developer Platform & API Ecosystem Management
BC-4270
API Key
GET /v1/api-key

What people ask xAI 17

The questions people put to an LLM, and the jobs they hand an agent, that xAI's APIs answer — each one linked to the operation that does it. Generated by API Evangelist

xAI Files API List files in my team's storage “Which files have I uploaded to xAI storage?” Upload a file to storage “How do I upload a file so it expires automatically?” Get metadata for a file “What size and upload date does a stored file have?” Delete a stored file “How do I permanently delete a file from storage?”
xAI Videos API Edit an existing video with a prompt “How do I edit a video by describing what should change?” Extend a video with continuation content “Can I generate a continuation for a video that's already been made?” Generate a video from text and an optional image “How do I create a video from a text prompt?” Check a deferred video generation job “Did my video generation job finish successfully?”
xAI Responses API Generate a response from a prompt “How do I get a model to answer a question I give it?” Retrieve a stored response “Can I fetch a response I generated earlier?” Delete a stored response “Can I delete a response I stored earlier?”
xAI Video Generation Models API List video generation models “Which video generation models can my API key access?” Get a video generation model “What does a specific video generation model support?”
xAI Models API List models available to my key “Which models can I call with my API key?” Get a model's details “What does a particular model's endpoint and pricing look like?”
xAI Language Models API List available language models “Which chat and image understanding models can I use?” Get a language model's details “What does a specific model support, like context length?”
xAI Images API Edit an image with a prompt “How do I edit an existing image with a text prompt?” Generate an image from a prompt “How do I generate an image from a text prompt?”
xAI Embedding Models API List available embedding models “Which embedding models can my API key access?” Get an embedding model's details “What does a specific embedding model support, like its dimensions and context length?”
xAI Chat API Send a chat prompt and get a response “How do I send a chat prompt and get a Grok chat response?” Get a deferred chat response “How do I fetch the result of a chat completion I started earlier?”
xAI Image Generation Models API List image generation models “Which image generation models can I use with my API key?” Get an image generation model “What does a specific image generation model support, like its size limits?”
xAI Embeddings API Create text embeddings “How do I turn a piece of text into vector embeddings?”
xAI Complete API Generate a text completion (legacy) “Can I still use the legacy complete endpoint for text generation?”

Showing 12 of 17 APIs with phrasing — see every API.

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-11-28 · rubric v0.30.0
Regulatory Posture applies to this provider. Its tags matched the AI & Biometrics regime, so Regulatory Posture carries 15 points of the composite. If this regime is wrong for your business, say so on your provider repo — the applicability map is public and we will correct it.
Create-or-Update Ergonomics applies to this provider. This API accepts writes, so it carries 10 points of the composite. It is scored from the published contracts themselves: whether a caller can create-or-update in one call, whether the write accepts a key the caller already holds, and whether the response says which branch ran. Without that, every write needs a search-and-branch in front of it, and the first time that check is skipped a duplicate record is created. Scored against the observed mean rather than raw — a provider at the catalog average is unchanged by this facet, not penalised by it.
The six quality facets above are damped to 75 points between them, because the conditional facet above carries the other 25. That is why each facet's contribution is shown against a damped maximum: raising a quality facet moves the composite by 75% of its nominal weight, not 100%. The full arithmetic is at apis.io/rating/.
Show this score on your site. Kin Score badge preview for xAI It updates itself when the score changes. Paste this where you link to your API docs:
<a href="https://apis.io/providers/xai/"><img src="https://apis.io/badge/xai/card.svg" alt="xAI on APIs.io — Kin Score by API Evangelist"></a>
Other styles, a README pill and a shields.io endpoint are on the badge page.
Raise your score.
Agent readiness — checks not met, largest first (exact, from this profile):
5 more unmet checks in the Agent Readiness table above.
Kin Score — facets with the most composite points still available (weight × headroom):
Each check links to what satisfies it. Publish the artifact, or tell us where it already lives, and the score moves on the next scoring run.
Not sure how this applies to your stack? Ask about any one item. Kin Lane reads every question, looks at your profile and your situation, and replies with what a fix would take — scoped to that one area, priced up front, yours whether you ship it or not. Ask a question →
Ask about:
Xai · a person reads this and replies by email.
or email info@apis.io
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. Every facet and dimension name above is a link: it opens that measurement's own page — what it means, the exact checks that feed it, how the whole catalog distributes on it, and the providers at the top of it. This rating is computed from the provider profile at artifacts.apis.io/xai/apis.yml: open an issue on github.com/api-evangelist/xai to ask a question or point us at an artifact you publish. Submit an artifact on GitHub — free → Manage your own listing — the Influence plan, $499/mo →

Markets this provider is in provisional

The Kin Score Market layer reads a provider inside its market: its position, and how deep its integrations go. Depth is only comparable within a position. Provisional and unweighted: not part of the Kin Score or agent readiness.

Depth is one figure for the provider, the mean of its strongest integrations, so it repeats on every row. It differs by market only where an assurance register's own evidence applies.

Registered MCP server and declares compatibility are report only — not weighted. Undeclared means we found nothing we can read, so there is no number: we never infer integrations.

Used by apps

10 of the reference apps in Applications, across 8 categories, integrate with this provider, read from each app's own code, build or integrations page.

Standards implemented 5

Standards this provider implements or carries. De facto ones are profiled and measured by the API Commons; formal ones come from the standards directory and are linked by the provider's own tags. The evidence column says how each claim was established — not that it was made.

declared — publishes a spec that declares them
2 core of 244 operations graded · api-commons/models
The OpenAI Interface reaches extended
declared — publishes a spec that declares them
2 core of 338 operations graded · api-commons/models
measured — observed by APIs.io (verified)
measured — observed by APIs.io (published)
measured — observed by APIs.io (served)

APIs 17

Individual APIs this provider publishes, each with its own machine-readable definition.

xAI Api Key API

The Api Key API from xAI — 1 operation(s) for api key.

xAI Chat API

The Chat API from xAI — 2 operation(s) for chat.

xAI Complete API

The Complete API from xAI — 1 operation(s) for complete.

xAI Completions API

The Completions API from xAI — 1 operation(s) for completions.

xAI Documents API

The Documents API from xAI — 1 operation(s) for documents.

xAI Embedding Models API

The Embedding Models API from xAI — 2 operation(s) for embedding models.

xAI Embeddings API

The Embeddings API from xAI — 1 operation(s) for embeddings.

xAI Files API

The Files API from xAI — 3 operation(s) for files.

xAI Image Generation Models API

The Image Generation Models API from xAI — 2 operation(s) for image generation models.

xAI Images API

The Images API from xAI — 2 operation(s) for images.

xAI Language Models API

The Language Models API from xAI — 2 operation(s) for language models.

xAI Messages API

The Messages API from xAI — 1 operation(s) for messages.

xAI Models API

The Models API from xAI — 2 operation(s) for models.

xAI Responses API

The Responses API from xAI — 2 operation(s) for responses.

xAI Tokenize Text API

The Tokenize Text API from xAI — 1 operation(s) for tokenize text.

xAI Video Generation Models API

The Video Generation Models API from xAI — 2 operation(s) for video generation models.

xAI Videos API

The Videos API from xAI — 4 operation(s) for videos.

Scroll for all 17

Open Collections 2

Open, tool-agnostic API collections (OpenAPI-derived and Bruno).

xAI's REST v1 API

OPEN COLLECTION

xAI's REST API

OPEN COLLECTION

MCP Servers 1

Model Context Protocol servers that expose these APIs to AI agents.

xAI MCP Server

Remote MCP server at docs.x.ai over HTTP; 4 tools listed.

MCP SERVER

xAI API pricing

Not yet checked against xAI's own pricing page. Compiled by API Evangelist on 2026-05-08 from x.ai/; confirm before you rely on a figure.

PlanPrice
Pay-as-you-go (API) usage —
Batch API usage —
Enterprise / Custom enterprise —

Plan details, limits and sources →

Rate limits

Compiled by API Evangelist, not yet checked against xAI's documentation. Rate-limit details →

Pricing Plans 1

Published pricing tiers and plan structures.

xAI Plans Pricing

3 plans

PLANS

Rate Limits 1

Documented rate limits and quota policies.

xAI Rate Limits

3 limits

RATE LIMITS

FinOps 1

Cost, billing, and metering signals for API financial operations.

xAI Finops

FINOPS

Event Specifications 1

AsyncAPI definitions for this provider's event-driven and streaming APIs.

xAI Realtime WebSocket APIs

AsyncAPI 2.6 description of xAI's documented WebSocket APIs: - Real-time Speech-to-Text (STT) streaming at wss://api.x.ai/v1/stt - Voice Agent (bidirectional speech-to-speech) a...

ASYNCAPI

Spectral Rules 1

Spectral governance rulesets for linting and validating these APIs. Counts are the severity each rule declares, not results of running them.

xAI — asyncapi rules

8 rules · 1 error-severity 7 warn-severity

SPECTRAL

OpenAPI Overlays 17

Overlays applied on top of this provider's contracts. Each card says who wrote it: a document the provider publishes, or one API Evangelist derived or generated.

xAI Api Key Api Phrasing Overlay

2 actions · phrasing · xai-api-key-api-openapi.yml

GENERATED

xAI Chat Api Phrasing Overlay

3 actions · phrasing · xai-chat-api-openapi.yml

GENERATED

xAI Complete Api Phrasing Overlay

2 actions · phrasing · xai-complete-api-openapi.yml

GENERATED

xAI Completions Api Phrasing Overlay

2 actions · phrasing · xai-completions-api-openapi.yml

GENERATED

xAI Documents Api Phrasing Overlay

2 actions · phrasing · xai-documents-api-openapi.yml

GENERATED

xAI Embedding Models Api Phrasing Overlay

3 actions · phrasing · xai-embedding-models-api-openapi.yml

GENERATED

xAI Embeddings Api Phrasing Overlay

2 actions · phrasing · xai-embeddings-api-openapi.yml

GENERATED

xAI Files Api Phrasing Overlay

6 actions · phrasing · xai-files-api-openapi.yml

GENERATED

xAI Image Generation Models Api Phrasing Overlay

3 actions · phrasing · xai-image-generation-models-api-openapi.yml

GENERATED

xAI Images Api Phrasing Overlay

3 actions · phrasing · xai-images-api-openapi.yml

GENERATED

xAI Language Models Api Phrasing Overlay

3 actions · phrasing · xai-language-models-api-openapi.yml

GENERATED

xAI Messages Api Phrasing Overlay

2 actions · phrasing · xai-messages-api-openapi.yml

GENERATED

xAI Models Api Phrasing Overlay

3 actions · phrasing · xai-models-api-openapi.yml

GENERATED

xAI Responses Api Phrasing Overlay

4 actions · phrasing · xai-responses-api-openapi.yml

GENERATED

xAI Tokenize Text Api Phrasing Overlay

2 actions · phrasing · xai-tokenize-text-api-openapi.yml

GENERATED

xAI Video Generation Models Api Phrasing Overlay

3 actions · phrasing · xai-video-generation-models-api-openapi.yml

GENERATED

xAI Videos Api Phrasing Overlay

5 actions · phrasing · xai-videos-api-openapi.yml

GENERATED

Scroll for all 17

Security Posture 4

Authentication, domain security, vulnerability disclosure, and trust-center signals.

xAI Authentication

http · 1 scheme

SECURITY

xAI Domain Security

TLSv1.3 · HSTS · DMARC

SECURITY

xAI Vulnerability Disclosure

security.txt · contact published

SECURITY

xAI Trust Center

HIPAA, GDPR

SECURITY

Agentic Access (API Evangelist recommendations) 1

Recommended x-agentic-access execution contracts for AI agents.

xAI Agentic Access

33 operations · 15 acting

33 operations · 15 acting

AGENTIC

Resources

Documentation 1

Reference material describing how the API behaves

Agent Surfaces 1

MCP servers, agent skills, and machine-readable catalogs

Build 1

SDKs, sample code, and the tooling you integrate with

Access & Security 4

Authentication, authorization, and security posture

Operate 1

Status, limits, changes, and where to get help

Commercial 2

Pricing, plans, and the legal terms of use

Company 3

The organization behind the API

Other 1

Properties that don't map to a standard resource type

Source (apis.yml)

apis.yml Raw ↑
aid: xai
url: https://raw.githubusercontent.com/api-evangelist/xai/refs/heads/main/apis.yml
name: xAI
kind: company
description: xAI is an AI research lab founded by Elon Musk. The xAI API exposes Grok foundation models for chat, function
  calling, vision, voice, image generation, and video generation, alongside research outputs from the Colossus training supercluster.
deliveryModel:
  model: saas
  open_source: false
  commercial: true
  callable_host: true
  label: Hosted service · you call their endpoint
  confidence: high
  source:
  - openapi
  - pricing
  generated: '2026-08-28'
  method: derived
accessModel:
  pricing: paid
  onboarding: unknown
  trial: false
  try_now: false
  public: false
  label: Paid
  confidence: medium
  source:
  - plans
  - authentication
  - security
  generated: '2026-11-28'
  method: derived
image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/icons/xai.png
tags:
- Artificial Intelligence
- LLM
- Foundation Models
- Grok
- Generative AI
- Real-Time
- Image Generation
- Video Generation
tags_raw:
- AI
- LLM
- Foundation Models
- Grok
- Generative AI
- Real-Time
- Image Generation
- Video Generation
created: '2026-05-08'
modified: '2026-10-06'
specificationVersion: '0.23'
apis:
- aid: xai:xai-api-key-api
  name: xAI Api Key API
  description: The Api Key API from xAI — 1 operation(s) for api key.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - APIKeys
  tags_raw:
  - Api Key
  properties:
  - type: OpenAPI
    url: openapi/xai-api-key-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-chat-api
  name: xAI Chat API
  description: The Chat API from xAI — 2 operation(s) for chat.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Chat
  properties:
  - type: OpenAPI
    url: openapi/xai-chat-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-complete-api
  name: xAI Complete API
  description: The Complete API from xAI — 1 operation(s) for complete.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Complete
  properties:
  - type: OpenAPI
    url: openapi/xai-complete-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-completions-api
  name: xAI Completions API
  description: The Completions API from xAI — 1 operation(s) for completions.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Completions
  properties:
  - type: OpenAPI
    url: openapi/xai-completions-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-documents-api
  name: xAI Documents API
  description: The Documents API from xAI — 1 operation(s) for documents.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Documents
  properties:
  - type: OpenAPI
    url: openapi/xai-documents-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-embedding-models-api
  name: xAI Embedding Models API
  description: The Embedding Models API from xAI — 2 operation(s) for embedding models.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Embedding Models
  properties:
  - type: OpenAPI
    url: openapi/xai-embedding-models-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-embeddings-api
  name: xAI Embeddings API
  description: The Embeddings API from xAI — 1 operation(s) for embeddings.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Embeddings
  properties:
  - type: OpenAPI
    url: openapi/xai-embeddings-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-files-api
  name: xAI Files API
  description: The Files API from xAI — 3 operation(s) for files.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - File
  tags_raw:
  - Files
  properties:
  - type: OpenAPI
    url: openapi/xai-files-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-image-generation-models-api
  name: xAI Image Generation Models API
  description: The Image Generation Models API from xAI — 2 operation(s) for image generation models.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Image Generation Models
  properties:
  - type: OpenAPI
    url: openapi/xai-image-generation-models-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-images-api
  name: xAI Images API
  description: The Images API from xAI — 2 operation(s) for images.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Image
  tags_raw:
  - Images
  properties:
  - type: OpenAPI
    url: openapi/xai-images-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-language-models-api
  name: xAI Language Models API
  description: The Language Models API from xAI — 2 operation(s) for language models.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Language Models
  properties:
  - type: OpenAPI
    url: openapi/xai-language-models-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-messages-api
  name: xAI Messages API
  description: The Messages API from xAI — 1 operation(s) for messages.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Message
  tags_raw:
  - Messages
  properties:
  - type: OpenAPI
    url: openapi/xai-messages-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-models-api
  name: xAI Models API
  description: The Models API from xAI — 2 operation(s) for models.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Models
  properties:
  - type: OpenAPI
    url: openapi/xai-models-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-responses-api
  name: xAI Responses API
  description: The Responses API from xAI — 2 operation(s) for responses.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Responses
  properties:
  - type: OpenAPI
    url: openapi/xai-responses-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-tokenize-text-api
  name: xAI Tokenize Text API
  description: The Tokenize Text API from xAI — 1 operation(s) for tokenize text.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Tokenize Text
  properties:
  - type: OpenAPI
    url: openapi/xai-tokenize-text-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-video-generation-models-api
  name: xAI Video Generation Models API
  description: The Video Generation Models API from xAI — 2 operation(s) for video generation models.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Video Generation Models
  properties:
  - type: OpenAPI
    url: openapi/xai-video-generation-models-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
- aid: xai:xai-videos-api
  name: xAI Videos API
  description: The Videos API from xAI — 4 operation(s) for videos.
  humanURL: https://docs.x.ai/docs/api-reference
  baseURL: https://api.x.ai/v1
  tags:
  - Video
  tags_raw:
  - Videos
  properties:
  - type: OpenAPI
    url: openapi/xai-videos-api-openapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/overview
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#chat-completions
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#responses
  - type: Documentation
    url: https://docs.x.ai/docs/guides/image-generations
  - type: APIReference
    url: https://docs.x.ai/docs/api-reference#image-generations
  - type: Documentation
    url: https://docs.x.ai/docs/guides/video-generation
  - type: Documentation
    url: https://docs.x.ai/docs/guides/voice
  - type: AsyncAPI
    url: asyncapi/xai-asyncapi.yml
  - type: Documentation
    url: https://docs.x.ai/docs/guides/embeddings
  - type: Documentation
    url: https://docs.x.ai/docs/api-reference#models
  - type: Documentation
    url: https://docs.x.ai/docs/guides/batch
common:
- type: CapabilityMap
  url: capabilities/xai-capability-edges.yml
  name: xAI Business Capability Map
- url: https://x.ai/news
  type: Blog
- type: AgenticAccess
  url: agentic-access/xai-agentic-access.yml
- type: TrustCenter
  url: security/xai-trust-center.yml
- type: VulnerabilityDisclosure
  url: security/xai-vulnerability-disclosure.yml
- type: DomainSecurity
  url: security/xai-domain-security.yml
- type: Authentication
  url: authentication/xai-authentication.yml
- type: GitHubOrganization
  url: https://github.com/xai-org
- type: LinkedIn
  url: https://www.linkedin.com/company/x-ai
- type: Website
  url: https://x.ai/
- type: Documentation
  url: https://docs.x.ai/
- type: Plans
  url: plans/xai-plans-pricing.yml
- type: RateLimits
  url: rate-limits/xai-rate-limits.yml
- type: FinOps
  url: finops/xai-finops.yml
maintainers:
- FN: Kin Lane
  email: kin@apievangelist.com

xAI API — frequently asked questions

Does xAI have an API?

Yes. APIs.io lists 17 APIs from xAI, including xAI Api Key API, xAI Chat API and xAI Complete API, and 14 more.

Is there an OpenAPI specification for the xAI API?

Yes. APIs.io indexes 17 OpenAPI specifications for xAI, each linked for download from this page.

How do I authenticate with the xAI API?

xAI uses bearer-token authentication (http · 1 scheme). The details are profiled on APIs.io as xAI Authentication.

How much does the xAI API cost?

APIs.io lists 3 pricing plans for xAI, with each plan's price, limits and inclusions under Pricing on this page.

Does xAI have an MCP server?

Yes. APIs.io lists 1 MCP server for xAI: Remote MCP server at docs.x.ai over HTTP; 4 tools listed.

Is the xAI API ready for AI agents?

xAI has a Kin Score of 32.8 out of 100 (thin) and an Agent Readiness score of 39.4 (agent-ready), scored by API Evangelist on 2026-11-28.

Work with this as data

Every provider here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for providers

9 MCP tools reach this
  • find_providersBrowse and filter every provider in the catalog.
  • get_provider_artifactsEvery artifact this provider publishes, grouped by type.
  • get_provider_operationsEvery operation across all of their OpenAPIs — one call instead of parsing every spec.
  • get_provider_toolsEvery MCP tool they ship, with the operation each wraps.
  • get_provider_evidenceHow each part of their score was established. Free — the basis for a claim should not sit behind it.
  • get_provider_ratingPRO — composite, band, trend and facet scores.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This provider
curl "https://apis.io/api/v1/providers/xai"
All providers
curl "https://apis.io/api/v1/providers?limit=25"
Every operation they expose
curl "https://apis.io/api/v1/providers/xai/operations?limit=25"
How their score was established
curl "https://apis.io/api/v1/providers/xai/evidence"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.