Skip to content
whichdevtool?
Categories ▾

Frameworks and UI

Frontend and full-stack frameworks Backend frameworks UI component libraries

Hosting

VPS and cloud servers App hosting and PaaS

Data

Managed databases File and object storage ORMs and database toolkits

AI

AI model APIs

Email

Transactional email APIs Email marketing and newsletters

Payments

Payments and billing

Domains and edge

Domain registrars CDN, DNS and edge security

Operations and identity

Monitoring, uptime and error tracking Auth and identity Background jobs, queues and workflows
Stacks Directory
Ctrl K

Search directory
Menu
StacksDirectory Pricing changes Glossary
VPS and cloud servers App hosting and PaaS Managed databases Transactional email APIs Email marketing and newsletters Domain registrars CDN, DNS and edge security Monitoring, uptime and error tracking Auth and identity Frontend and full-stack frameworks Backend frameworks UI component libraries AI model APIs File and object storage Payments and billing Background jobs, queues and workflows ORMs and database toolkits
  1. Home
  2. AI model APIs
  3. xAI API (Grok)

AI model API (model maker) · by xAI

xAI API (Grok)

xAI's pay-per-token API for Grok models, with prepaid credits or monthly invoicing and a long-context surcharge above 200K tokens.

Visit docs.x.ai ↗ Alternatives Paid
docs.x.ai
xAI API (Grok) homepage
§1

Overview

xAI sells API access to its Grok models. The current list includes grok-4.7, 4.6 and 4.5 (500K context), grok-4.3 and the grok-4.20-0309 reasoning, non-reasoning and multi-agent models (1M context), and grok-build-0.1, a coding model with a 256K window. Cached input is priced at a quarter or less of the input rate.

Prices are per million tokens and double once a request reaches 200K tokens, so long-document work costs more than the headline rate suggests. grok-4.3 costs $1.25 in and $2.50 out below that threshold; grok-4.7 costs $2 in and $6 out.

You can pay by buying credits in advance, which are drawn down per request, or by monthly invoice. Invoiced accounts start with a $0 monthly limit that you raise yourself, and the console warns at 80% of it; auto top-up of credits can also be capped per month. There is no published batch discount on the pages read, so large offline jobs cost the same per token as interactive calls.

§2

Pricing and plans

Plan Price What you get
grok-4.7 $2 in / $6 out per 1M Cached input $0.50; 500K context; $4 / $12 at 200K+ tokens
grok-4.5 $2 in / $6 out per 1M Cached input $0.30; 500K context
grok-4.3 $1.25 in / $2.50 out per 1M Cached input $0.20; 1M context
grok-4.20-0309 (reasoning / non-reasoning) $1.25 in / $2.50 out per 1M 1M context
grok-build-0.1 $1 in / $2 out per 1M Coding model; 256K context

Per 1M tokens in USD, read 2026-09-29 on docs.x.ai. Requests of 200K tokens or more are billed at double the input and output rates. Billing is prepaid credits or a monthly invoice; the invoiced spending limit defaults to $0 and warnings appear at 80% of the monthly limit. Third-party sites describe signup credits and a data-sharing credit programme, but these were not confirmed on xAI's own pages today, so they are not recorded. Batch pricing was not found on the pages read.

Source: docs.x.ai/docs/models · prices as published, excluding tax.

§3

What it does

Long context
Up to 1M tokens on grok-4.3 and grok-4.20 models; 500K on grok-4.5 to 4.7.
Cached input pricing
Repeated prompt prefixes billed from $0.20 per 1M tokens on grok-4.3.
Multi-agent model
grok-4.20-multi-agent-0309 is listed at the same price as the single-agent 4.20 models.
Prepaid or invoiced billing
Pre-purchase credits or receive a monthly invoice with a spending limit you control.
Spend warnings
Console warnings at 80% of the monthly spending limit; auto top-up can be capped.
§4

Strengths and limitations

Strengths

  • grok-4.3 pairs a 1M-token context window with a $2.50 per 1M output price.
  • Prepaid credits make it possible to cap exposure exactly.
  • Invoiced spending limit starts at $0, so there is no open-ended bill by default.

Limitations

  • No permanent free tier is published on xAI's pages.
  • Requests of 200K tokens or more cost twice the standard rate.
  • Only xAI's own Grok models are available.
  • No EU data-residency option was found on the pages read.
§5

Who it suits

Good for

  • Apps built specifically on Grok models
  • Long-context workloads under 200K tokens per request

Look elsewhere if

  • Hobby projects that need a free allowance
  • Teams needing EU-only processing
§6

Alternatives to xAI API (Grok)

Tool From Free option Stages
OpenRouter Model router (unified API)
— Free tier
Claude API AI model API (model maker)
Usage-based Trial
SG
Scaleway Generative APIs Inference provider (EU-hosted open-weight models)
Usage-based Trial
Replicate Model hosting API (image, video, audio and LLMs)
$0.09/hr Trial
Mistral API (Mistral Studio) AI model API (model maker)
Usage-based Free tier
OpenAI API AI model API (model maker)
Usage-based Paid

All AI model APIs →

§7

Questions

How much does the Grok API cost?

On 2026-09-29 grok-4.3 cost $1.25 per 1M input tokens and $2.50 per 1M output tokens below 200K tokens; grok-4.7 cost $2 and $6.

Does the xAI API have a free tier?

xAI's own model and billing pages read on 2026-09-29 do not list a free tier; credit offers mentioned elsewhere could not be confirmed there.

Can I prepay for the xAI API?

Yes. You can pre-purchase credits that API usage draws down, or choose monthly invoicing with a spending limit.

Sources read for this page

  • https://docs.x.ai/docs/models
  • https://docs.x.ai/docs/key-information/billing
Spec sheet
From
Usage-based
From $1 per 1M input tokens (grok-build-0.1)
Free tier
None
Stages
HobbyIndieStartupScale-upEnterprise Suits indie, startup, scale-up
Models
Grok 4.7, 4.5, 4.3, 4.20 (reasoning, multi-agent), grok-build
Free tier
None published on the pages read
Example price (per 1M tokens)
grok-4.3: $1.25 in / $2.50 out per 1M (<200K)
Open-weight models
No
Open source
No
Self-host
No
EU data
Not stated
Category
AI APIs
Visit docs.x.ai ↗

To report an out-of-date price or limit, use the correction form.

whichdevtool?

Developer and cloud tools compared on price, free tier and limits, each with its source. For side projects, solo developers and small teams.

Categories

  • VPS and cloud servers
  • App hosting and PaaS
  • Managed databases
  • Transactional email APIs
  • Email marketing and newsletters
  • Domain registrars
  • CDN, DNS and edge security
  • Monitoring, uptime and error tracking
  • Auth and identity
  • Frontend and full-stack frameworks
  • Backend frameworks
  • UI component libraries
  • AI model APIs
  • File and object storage
  • Payments and billing
  • Background jobs, queues and workflows
  • ORMs and database toolkits

Research

  • Directory
  • Stacks by project
  • Developer news
  • Pricing changes
  • Glossary

Site

  • About and methods
  • How we make money
  • Suggest a tool or fix
  • Privacy
© 2026 whichdevtool.com Prices change. Each tool page links to its source. We may earn a commission when you sign up through links on this site. How we make money