Skip to main content
xAI logo

xAI

First-party API for Grok models

Inference specialist🇺🇸 USInference APIFirst-party ModelsGrok

Last reviewed Sep 28, 2026

xAI develops the Grok family of models and sells first-party access to them through the xAI API, with text, image and video generation, and voice endpoints billed per token, image, second, or minute.

We're actively tracking prices for xAI. Check back soon, or browse other providers with current pricing.

Pros & Cons

Advantages

  • First-party access to Grok models
  • Cached-input rates published per model
  • Batch and priority tiers for cost or latency trade-offs
  • Also available through Google Cloud Vertex AI and Microsoft Foundry

Limitations

  • Only xAI's own models are offered
  • Long-context requests above the published prompt threshold are billed at a higher rate for the whole request
  • Server-side tool calls add per-invocation charges on top of tokens

Key Features

Grok text models

Chat Completions and Responses endpoints for the Grok models, with configurable reasoning and tool calling

Server-side tools

Web Search, X Search, code execution, file and collection search, and remote MCP tools billed per invocation on top of tokens

Imagine and Voice APIs

Image and video generation billed per image or second, and speech-to-speech, speech-to-text and text-to-speech endpoints

Batch API

Asynchronous processing with a discount on selected models, typically completed within 24 hours

Priority Processing

Higher scheduling priority for lower latency at a premium over standard token rates

Prompt caching

Cached prompt tokens are billed at a reduced rate

Pricing Options

OptionDetails
Per tokenInput, cached input, and output tokens billed per 1M, with a higher long-context rate above a prompt-size threshold
BatchDiscounted asynchronous processing for selected models
PriorityA premium over standard rates for higher scheduling priority

Availability & Support

Support

Documentation, status page, and console support

Getting Started

  1. 1

    Create an account

    Sign up on the xAI console and add credits

  2. 2

    Create an API key

    Generate a key in the console

  3. 3

    Call the API

    Send requests to api.x.ai with an OpenAI-compatible client or the xAI SDK

Frequently Asked Questions

Which models does xAI serve?

Check the pricing table above for the models xAI currently serves and their per-token rates.

How do I get started with xAI?

Create an account, Create an API key, Call the API

What are xAI's main advantages?

xAI's main advantages include: First-party access to Grok models, Cached-input rates published per model, Batch and priority tiers for cost or latency trade-offs, Also available through Google Cloud Vertex AI and Microsoft Foundry.

What are xAI's limitations?

xAI's main limitations include: Only xAI's own models are offered, Long-context requests above the published prompt threshold are billed at a higher rate for the whole request, Server-side tool calls add per-invocation charges on top of tokens.