relay.fast
RU Sign in

Grok models and API prices

This page lists all xAI models you can call with one relay.fast key. The tables are built from the live catalog, so the prices and the model list are current.

Grok API prices

Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.

ModelModel IDOfficial input / output per 1M tokensrelay.fast from, input / outputCache read fromContext
Grok 4.5grok-4.5$2 / $6$0.0333 / $0.1 (−98%)$0.00833500K
Grok 4.6
requests above 200K input tokens cost more
grok-4.6$2 / $6$0.0333 / $0.1 (−98%)$0.00833500K
Grok 4.7
requests above 200K input tokens cost more
grok-4.7$2 / $6$0.0133 / $0.04 (−99%)$0.00333500K

Specifications

Release month, limits and features are as published by xAI.

ModelReleasedContextMax outputInputFeatures
Grok 4.5July 2026500K—text, images, filestool calling, reasoning, structured output, image input, prompt caching
Grok 4.6August 2026500K—text, images, filestool calling, reasoning, structured output, image input, prompt caching
Grok 4.7September 2026500K—text, images, filestool calling, reasoning, structured output, image input, prompt caching

Image, video and speech models

ModelModel IDList pricePrice from
Grok Imagine Image 2.0grok-imagine-image-2.0$1.2 per image$0.04 per image (−96%)
Grok Imagine Video 1.5grok-imagine-video-1.5$0.036 per second of video$0.036 per second of video
Grok Voicegrok-voice$0.032 per request$0.032 per request

Example request

Keep the key in the RELAY_FAST_API_KEY environment variable. Any model ID from the table works in the same request.

curl https://relay.fast/v1/chat/completions \
  -H "Authorization: Bearer $RELAY_FAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"grok-4.5","messages":[{"role":"user","content":"Hello"}]}'

How to connect

Create a relay.fast account, add funds and generate an API key. OpenAI-compatible clients use the base URL https://relay.fast/v1. Anthropic-compatible clients use https://relay.fast with the Messages API. Requests are charged to your balance for the tokens or units they use.

There are setup guides for the coding tools Claude Code, Codex, Cursor, Cline and OpenCode. Each model name in the tables links to its own page with prices, limits and an example request.

How pricing works

The official price is the list price published by xAI. The relay.fast price depends on the source a request uses, and the tables show the lowest current price. Prices and the model list can change at any time, so check the pricing page before you plan a budget.

Frequently asked questions

Do I need an account with xAI to use Grok models here?

No. You use a relay.fast account and API key. relay.fast is an independent API gateway and is not affiliated with xAI.

Can I keep my existing SDK or coding tool?

Yes, if it lets you set a custom base URL and key. Point it at relay.fast and pick a model ID from the tables.

Where is the full list of models and prices?

The pricing page at https://relay.fast/pricing lists every model. The same data is available as JSON at https://relay.fast/pricing.json.

Start with relay.fast