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 — the official OpenAI SDK, pointed at Verlon:
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 reasoning_effort:
Because reasoning tokens are billed as output and count against your output cap, Verlon automatically reserves extra headroom on top of your max_tokens for reasoning models — so a small max_tokens won’t get consumed entirely by thinking, leaving no room for the answer. reasoning_effort is portable: Verlon passes the same value straight through to OpenAI, maps it to a thinking-token budget on Anthropic and Google, and ignores it for Mistral. Switching models doesn’t require changing your code.

SDK compatibility

Any SDK with a Verlon drop-in endpoint can reach every model on this page — 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. The quickstart above is all it takes. The Verlon SDK isn’t needed for inference — its home is agent tracing, observability, and the model registry.

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.
response_format with json_object or a json_schema works the same as on OpenAI.
reasoning_effort maps to xAI’s reasoning.effort. See Reasoning above.
temperature, max_tokens, top_p, and stop are passed through. Note that frequency_penalty and presence_penalty are rejected outright by Grok’s reasoning models — Verlon strips them for you rather than letting the request fail.
Grok Imagine image models are available through the drop-in /v1/images/generations route. Video generation is served through the drop-in /v1/videos async surface (openai.videos.create() → poll → download). 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 generation — 3 models
  • video generation — 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. Video generation runs through the drop-in /v1/videos async surface — create a job with openai.videos.create(), poll it, download the result.

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 OpenAI SDK it surfaces as a thrown APIError:

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 generation

Video generation