Musk's xAI model interface provides Grok series calls, supports real-time information access, function calls, and image understanding, charges by token, can serve as a multi-vendor backup solution, has relatively simple documentation, and allows fast mode

By xAI

What is xAI API?

Musk's xAI model interface provides Grok series calls, supports real-time information access, function calls, and image understanding, charges by token, can serve as a multi-vendor backup solution, has relatively simple documentation, and allows fast model version iterations.

Developers building on Grok models through the xAI API.

What you can do

  • Paid — Charges are charged by subscription or usage, with no free quota
  • A bit of a threshold is needed — Before getting started, it's recommended to read the official documentation first
  • Web version — You can use it directly with the browser, no client installation required

Where it fits

Useful for

  • Grok model API
  • Vision and voice endpoints
  • Image and video generation

Before you choose

  • Individual users without free quotas who just want to try it out are not very suitable.
  • Features and limits vary by plan; check the official pricing page before subscribing.

Capabilities

Text chat

A playground lets you chat with models; the product itself is an API, not a chatbot.

File upload & analysis

File inputs are supported by some models and endpoints.

Image generation

No image generation endpoint.

Image understanding & editing

Vision models read images through the API.

Video generation

Video generation is available through the Grok Imagine API.

Voice & audio

No voice endpoints.

Web search

Web search is available through a dedicated endpoint.

Code generation & execution

Code execution or code models are available through the API.

Reasoning & deep research

Reasoning models are available through the API.

Autonomous agent

Agent frameworks and tool-calling are supported through the API.

API access

Core product: a developer API with usage-based pricing.

Pricing & plans

Prices checked 11/25/2026

Pay as you go

Usage-based per month
  • Token-based billing with no monthly fee; Grok 4.7, 4.6, 4.5, 4.3 and 4.20 models; Batch API 20% off
  • 按量计费,无年付折扣
Plan details ↗

API pricing

USD per 1M tokens

Model / serviceInputOutputCache readCache write
Grok 4.7$2.00$6.00$0.50—
Grok 4.6$2.00$6.00$0.50—
Grok 4.3$1.25$2.50$0.20—

Grok 4.7 $2/$6 每百万 tokens;长上下文(≥200K)双倍计费;免费 API 档已于 2025 年取消 按 token 计费;Grok 4.7/4.6 $2.00/$6.00,Grok 4.3 $1.25/$2.50 每百万 tokens;提示 ≥200K tokens 时全量双倍计费;Batch API 8 折

Official pricing ↗

Questions and answers

How much does the xAI API cost?

The xAI API is a paid product with no free quota. Specific tiers and prices are based on the official website settlement page.

Who is it suitable for?

Adjust models, compare prices, and deploy fine-tuning yourself. Check the context length, concurrency limit, and whether invoices can be issued. It requires some learning curve to get started.

Explore similar tools

OpenRouter

AI Dev Platforms

A single key calls hundreds of models, real-time price and availability comparison, supports automatic failover and cost-based routing, unified billing, suitable for multi-model access and backup solutions, and some smal…

Free / FreemiumWeb · API
14

Hugging Face

AI Dev Platforms

Open-source model and dataset hub with inference APIs.

Free / FreemiumWeb · iOS · Android
14

Scikit Learn

AI Dev Platforms

The most popular open-source machine learning library, complete with classic algorithms and unified APIs, covering everything from classification regression to clustering and dimensionality reduction, with abundant docum…

FreeWindows · macOS · Linux
13

PaddlePaddle

AI Dev Platforms

Baidu's open-source deep learning framework, free to use.

FreeWindows · macOS · Linux
13
Comments Be the First to Comment

Please log in to comment

    No comments yet