LLM APIs · A-tier

xAI API

API for Grok models. Use this when the product should call Grok, not the grok.com chat app.

Best for

Products that specifically want Grok models behind their own UI.

What it is

The xAI API serves Grok models to applications. It is separate from the grok.com consumer app. Use it when you want Grok’s style or its live-data features inside your own product. Billing is usage-based.

apigrokusage-basedLLM APIs

Score breakdown

  • Capability 40%82
  • Ease 25%76
  • Value 20%74
  • Momentum 15%86

Pricing

Paid

Starting price: check site

Usage-based API billing. Consumer Grok plans are a different checkout. Check docs.x.ai for token prices.

Dates

Released 2024 (year precision).

Added to StackPick 14 Oct 2026.

Alternatives

Questions

What is xAI API best for?

Products that specifically want Grok models behind their own UI.

How much does xAI API cost?

Paid. Starting price: check site. Usage-based API billing. Consumer Grok plans are a different checkout. Check docs.x.ai for token prices.

What are alternatives to xAI API?

OpenAI API, Anthropic API, Grok are the alternatives we file next to it. Open a comparison when one exists.

How do model leaderboards relate to xAI API?

xAI API is scored here as a product. OpenRouter rankings (https://openrouter.ai/rankings) inform momentum from token usage. Arena (https://arena.ai) informs capability from blind votes on the models it serves. Figures stay on those sites.