questions/Pricing

How much does Grok 4.5 cost?

Grok 4.5 (xai/grok-4.5) is priced at $1.00/M input and $1.00/M output tokens through AIgateway. 500,000-token context window. AIgateway charges pass-through on the underlying xAI rate, with no monthly minimum. Add a card (no charge) for $1 in credit across a curated trial catalog led by GLM-5.2.

How it works

Pass-through on the underlying provider

AIgateway bills at the same per-token rate xAI publishes. There's no inflated sticker price; the model-vendor's invoice and your gateway invoice agree on the token count and unit cost. Usage is aggregated to the nearest fraction of a cent in D1 and surfaced live in your dashboard.

A flat 5% platform fee per call

The only margin on top is a flat 5% platform fee, added to the provider cost on every API call. Cached requests (when you use prompt caching or semantic cache) get a 50% discount on the uncached cost, so long-context agent workloads often run net cheaper than calling xAI directly. A separate 5% covers card processing when you top up — shown before you pay.

$1 free credit + pay-as-you-go

No subscription and no monthly minimum. A payment method is required to call the API — adding a card is free, never charges you, and grants $1 in credit across a curated trial catalog of 15 models led by GLM-5.2. The $1 expires 30 days after you add the card. Top up from $5 with no auto-renew to unlock the full catalog — topups never expire. BYOK (bring your own xAI key) is supported on Enterprise if you already have a direct contract you want to preserve.

Code example

Python
# pip install aigateway-py openai
# aigateway-py: sub-accounts, evals, replays, jobs, webhook verify.
# openai SDK: chat/embeddings/images/audio — drop-in compat per our SDK's own guidance.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aigateway.sh/v1",
    api_key="sk-aig-...",
)

r = client.chat.completions.create(
    model="xai/grok-4.5",
    messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
)
print(r.choices[0].message.content)
Node / TypeScript
// npm i aigateway-js openai
// aigateway-js: sub-accounts, evals, replays, jobs, webhook verify.
// openai SDK: chat/embeddings/images/audio — drop-in compat.
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aigateway.sh/v1",
  apiKey: process.env.AIGATEWAY_KEY,
});

const r = await client.chat.completions.create({
  model: "xai/grok-4.5",
  messages: [{ role: "user", content: "Explain vector databases in two sentences." }],
});
console.log(r.choices[0].message.content);

Related

FAQ

How much does Grok 4.5 cost per token?

Input is $1/M tokens, output is $1/M tokens. A typical 1K-in / 500-out chat turn costs about $0.00150.

Is Grok 4.5 covered by the free credit?

Grok 4.5 is not on the $1 card-credit trial catalog — that credit covers 15 curated picks led by GLM-5.2. The full catalog starts at a $5 top-up.

Does Grok 4.5 support prompt caching?

Not natively. AIgateway's semantic cache can still hit duplicate prompts and gives a 50% discount on cached requests.

Are there volume discounts on Grok 4.5?

Pass-through pricing means you automatically get whatever tier discount xAI publishes. AIgateway doesn't mark up; the 5% platform fee applies flat regardless of volume. Enterprise customers can negotiate committed-use discounts on top.

How is Grok 4.5 usage metered?

Every call returns usage.prompt_tokens and usage.completion_tokens in the response body, same as OpenAI. We also write the exact cost into x-aigateway-cost response header. Full audit log is in the dashboard.

TRY IT NOW

One key, every model. $1 free to start.

Get an AIgateway keyOpen the playground