Skip to main content
xAI’s Grok lineup — Grok 4.5 (flagship reasoning), Grok 4.3 and the Grok 4.20 line (1M context), Grok Build (code, also known as grok-code-fast-1), and Grok Imagine (image and video) — is routable through Verlon in whichever SDK you already use. No xAI-specific SDK required.

Chat models

This table is auto-generated from the Verlon model registry on every sync — see the live registry for pricing, benchmarks, and deprecation dates.
xAI also publishes aliases that track the newest release of a line — grok-4.5-latest, grok-latest, grok-code-fast-1. Those resolve on xAI’s side, so you can use them here too; pin a dated ID when you need version stability.

Long-context pricing

Grok is the first provider on Verlon that re-prices an entire request once its prompt gets large. Every current Grok text model doubles its rates — input, cached input, and output alike — when the prompt reaches 200,000 tokens: Three things worth knowing:
  • The trigger is prompt size only. A long response never moves you into the higher tier.
  • It applies to the whole request, not just the tokens past the threshold. A 201K-token prompt bills every one of those tokens at the doubled rate.
  • Verlon bills this correctly for you. The cost field on every response already reflects whichever tier applied, so you don’t need to compute it yourself.
If you’re near the boundary and cost-sensitive, trimming a prompt from 205K to 195K tokens roughly halves the bill for that call.

Quickstart

First time? Create a gate and grab an API key — the examples below need a GATE_ID and VERLON_API_KEY.
The fastest path — Verlon SDK, one call:
Any chat model from the table above works — swap grok-4.5 for grok-4.3, grok-build-0.1, or any other ID.

Reasoning

Grok reasons by default and reasoning cannot be turned off. You can control how much of it happens with reasoningEffort:
Because reasoning tokens are billed as output and count against your output cap, Verlon automatically reserves extra headroom on top of your maxTokens for reasoning models — so a small maxTokens won’t get consumed entirely by thinking, leaving no room for the answer. reasoningEffort is portable: the same value maps to reasoning_effort on OpenAI, a thinking-token budget on Anthropic and Google, and is ignored by Mistral. Switching models doesn’t require changing your code.

SDK compatibility

The Verlon SDK is the native path to every model on this page — the quickstart above is all it takes. Already on another SDK? Any SDK with a Verlon drop-in endpoint can reach these models too — today that’s the OpenAI SDK and the Anthropic SDK: point it at Verlon, reference a gate that routes here, and your code stays unchanged.

Streaming

What’s supported

Full support for stream: true in every supported SDK — identical semantics to the source SDK.
Fully supported. Verlon translates the tool-call shape between OpenAI / Anthropic / xAI native formats.
Every Grok chat model accepts image input alongside text. Max 20MiB per image, JPEG or PNG, no limit on image count.
responseFormat with json_object or a json_schema works the same as on OpenAI.
reasoningEffort maps to xAI’s reasoning.effort. See Reasoning above.
temperature, maxTokens, topP, and stop are passed through. Note that frequencyPenalty and presencePenalty are rejected outright by Grok’s reasoning models — Verlon strips them for you rather than letting the request fail.
Grok Imagine models are available through verlon.image() and verlon.video(). See Other modalities.
Every response includes token usage plus Verlon’s cost field with per-call dollar amount, already reflecting the correct pricing tier.

Not available

  • Embeddings. xAI publishes no embeddings model. Use OpenAI, Google, or Mistral embeddings and route your chat traffic to Grok — that mix is exactly what gates are for.
  • Text-to-speech. xAI’s voice models are realtime/websocket-only and aren’t reachable through the standard TTS surface.
  • OCR. No xAI equivalent; Mistral’s OCR line is the recommended path.

Other modalities

  • image — 2 models
  • video — 2 models
Image generation is billed per image (0.02forgrokimagineimage,0.02 for `grok-imagine-image`, 0.05 for grok-imagine-image-quality); video is billed per second of output.

How it works

  1. You send a request in your chosen SDK’s format
  2. Verlon receives — validates the gate, applies routing rules
  3. Verlon translates to xAI’s format and dispatches to xAI’s API
  4. xAI responds with its raw response
  5. Verlon normalizes back to your SDK’s expected shape
  6. You receive a response in the format your code already handles, with an added cost field
Your existing code doesn’t know it’s talking to xAI.

Errors

The error shape always matches the SDK you’re calling with. Through the Verlon SDK it surfaces as a thrown Error:

Full non-chat model list

Every non-chat xAI model Verlon routes to, grouped by modality. Chat models are in the table near the top of this page.

Image

Video