New: Nano Banana 2.1Try the model
API Stock

xAI

Grok API

xAI's Grok text models, both with a 500K-token context and image input.

At a glance

From
$2.1 / 1M tokens

Models in this family

ModelFromModesOpen
Grok 4.5xAI frontier model for coding, agentic tasks and knowledge work. 500K-token context, text and image input.$2.1/ 1M tokens—OpenDocs
Grok 4.6xAI upgrade over Grok 4.5, built for long-running multi-step agent tasks and interactive visual project creation. 500K-token context, text and image input.$2.1/ 1M tokens—OpenDocs

Pricing

ModelOptionPrice
Grok 4.5input$2.1/ 1M tokens
Grok 4.5output$6.3/ 1M tokens
Grok 4.5cacheRead$0.525/ 1M tokens
Grok 4.6input$2.1/ 1M tokens
Grok 4.6output$6.3/ 1M tokens
Grok 4.6cacheRead$0.525/ 1M tokens

Which one to pick

  • Grok 4.5

    Coding, agentic tasks and knowledge work at a low per-token price — the earlier model, and it costs the same as 4.6.

  • Grok 4.6

    Long-running multi-step agent runs and interactive visual project work — the newer model, at the same price as 4.5.

Strengths

  • A 500K-token context on both tiers, including the earlier one.
  • Image input on both tiers.
  • Both tiers are priced identically, so moving to the newer 4.6 costs nothing extra.
  • Prompt caching at a quarter of fresh input on both.

Limitations

  • The two models cost the same, so 4.5 has no price advantage — choose on behaviour rather than budget.
  • Only two tiers, with nothing between them.
  • Cache reads are discounted to a quarter, not a tenth as in the GPT, Claude and Gemini lines.

Frequently asked questions

How much does the Grok API cost?

API Stock bills per use from one prepaid balance, with no subscription. Current prices: Grok 4.5 — $2.1 per 1M input tokens and $6.3 per 1M output tokens; Grok 4.6 — $2.1 per 1M input tokens and $6.3 per 1M output tokens.

Which Grok model is the cheapest?

Grok 4.5 is the cheapest at $2.1 per 1M input tokens. The most expensive tier, Grok 4.6, costs $2.1 per 1M input tokens.

Does the Grok API support prompt caching?

Yes. Cached input tokens are billed at a lower rate: Grok 4.5 — $0.525 instead of $2.1 per 1M tokens; Grok 4.6 — $0.525 instead of $2.1 per 1M tokens.

Can I use the Grok API with the OpenAI or Anthropic SDK?

Yes. Grok models accept the OpenAI request format: set the SDK's base URL to https://api.api-stock.com/api/v1 and use your API Stock API key. Switching between models only changes the model id.

How do I get an API key for Grok?

Create an account and API key on API Stock, then fund your balance. The same key works with Grok and other catalog models.

The vendor's own description of this line: xAI — models