Skip to content

OpenAI-compatible · Latest open models · Transparent pricing

The fastest way to ship with the latest open-weight models

Kimi K3, GLM-5.2, DeepSeek V4 and open video models — at 30–50% off official pricing. One OpenAI-compatible API.

  • No markup
  • OpenAI SDK compatible
  • Pay as you go
  • Cancel anytime
Live pricingper 1M tokens
ModelOursSave
Kimi K2.6$0.55 / $2.3042%
Kimi K3$1.85 / $9.0040%
GLM-5.2$0.82 / $2.5542%
Cached input billed separately, from $0.11/M
$5 in free creditsNo credit card required30–50% below official pricingOpenAI SDK compatibleCached input published, not buriedOpen licenses onlyNo platform feeNew models within 24 hours

Prices updated 5 days ago · See full pricing →

01

Every open model behind one key

Text, video and image. One endpoint, one bill, one dashboard — instead of four provider accounts and four invoices to reconcile.

02

Cut inference cost 30–50%

We publish the official rate next to ours on every row, including cached input. The saving is checkable, not asserted.

03

Scale without surprise bills

Spending caps per account and per key, set before your first request. Hit the limit and requests pause — they do not silently keep billing.

Switch in one line

If your project already uses the OpenAI SDK, this is the only change you need to make.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://router.xark.io/api/v1"   # ← the only line that changes
)

response = client.chat.completions.create(
    model="z-ai/glm-5.2",
    messages=[{"role": "user", "content": "Hello"}]
)

Full migration guide

Works with the tools developers already build with

LangChainLlamaIndexDifyCursorContinueAnythingLLMVercel AI SDK

Any client that speaks the OpenAI chat-completions format works without a plugin.

Questions people actually ask

The things worth knowing before you move production traffic to a smaller provider.

What is AI Token Router?

AI Token Router is an OpenAI-compatible API gateway for open-weight AI models. Point your existing OpenAI SDK at one endpoint and you get Kimi K3, GLM-5.2, DeepSeek V4 and open-source video models like Wan 2.2 and LTX-2.5, at 30-50% below official pricing. One key, one bill, and the official rate printed next to ours on every row.

How can you be 30-50% cheaper than official pricing?

We buy inference capacity in bulk, run it at high utilisation, and pass most of that discount through instead of keeping it as margin. There is no platform fee and no surcharge on top of the per-token rate you see. It is also why we only carry open-weight models: their licenses permit third-party hosting, so we control the cost base rather than reselling someone else's API at a markup.

Do I have to rewrite my code to switch?

No. The API is OpenAI-compatible, so if you already use the OpenAI SDK -- or any framework built on it, which is most of them -- switching is a one-line change to your base URL. Request shapes, streaming frames, the usage block and the error envelope all match what your code already handles.

Which models do you support?

Open-weight text models including Kimi K3 and K2.6, GLM-5.2 and GLM-5.2 Air, DeepSeek V4 Pro and Flash, Qwen3, MiniMax M2, Llama 4, Mistral Large 3 and GPT-OSS. On video: Wan 2.2 text-to-video and image-to-video, LTX-2.5, HunyuanVideo 1.5, CogVideoX and Mochi 1. On images: FLUX.2 schnell, Qwen-Image, Stable Diffusion 3.5 and HiDream-I1. New open-weight releases go live within 24 hours at a published price.

How does cached-token pricing work?

When you resend the same prefix -- a long system prompt, a fixed tool schema, a document you keep querying -- it is served from the model's KV cache and billed at the cached-input rate, typically 80-90% below the standard input rate. It happens automatically with no header to set, and a cache entry lives about five minutes after its last use. For agent loops this is usually the largest line on the bill, which is why the cached rate has its own column on the pricing table instead of a footnote.

Are there hidden fees?

No. The per-model rate is the whole price. No platform fee, no minimum spend, no card-processing surcharge at checkout, and no charge for failed requests. Worth checking when you compare: OpenRouter adds roughly 5.5% on credit purchases, which does not appear on their per-model pricing table.

What stops a runaway agent from running up a huge bill?

Your prepaid balance is a hard ceiling, enforced by the gateway on every request — a runaway agent stops at what you have already paid, never at an invoice. Unlike a configured cap, it cannot be misconfigured. Automatic recharge is off by default, and when enabled it is bounded too: a fixed amount, capped at three recharges in any 24 hours, switched off after three consecutive declines. Per-key limits are on the roadmap.

What happens if a model provider has an outage or rate-limits me?

Eligible requests fall back to another available model rather than failing outright, and the fallback is recorded in your request log so you can see when it happened and what it cost. You can also pin a request to a single model when substitution would be wrong for that workload.

How do you handle my prompts and data?

We do not train on your prompts or completions, ever. By default request bodies are retained for 30 days so you can debug from the request log, and you can turn that off in settings for zero data retention, where prompts and completions are discarded as soon as the response is returned. Usage metadata -- model, token counts, latency, cost -- is always kept, because that is what the dashboard and your invoice are built from.

Can I bring my own provider API key?

Yes. If you already have a contract with a provider, connect that key and route through us anyway. You keep your negotiated rate and still get routing, request logs, spending caps and per-key cost attribution. There is no charge for BYOK traffic.

How is this different from OpenRouter?

OpenRouter is a router across 500+ models including closed frontier models like GPT, Claude and Gemini, with multi-provider failover. If you need those, OpenRouter is the better fit and we say so on our comparison page. We are narrower on purpose: open-weight models only, roughly 22 of them chosen deliberately, with no platform fee, published cached-input rates, and open video generation treated as a first-class category rather than something we do not carry.

Why only open-weight models?

Because reselling closed-weight model access frequently violates the origin provider's terms of service, and that is a risk we will not take on or expose customers to. Open licenses permit third-party hosting, which is what lets us run the inference ourselves, control the price, and publish it. It is also why we do not serve Sora 2, Veo 3.1, Runway Gen-4, Kling, or Wan 2.5/2.6 -- the last of which is API-only, with weights never released, despite the open Wan 2.1/2.2 lineage.

Can I try it without signing up?

Yes. The Playground gives you 3 free runs with no account and no credit card, using representative sample responses so you can see the request and response shape before signing up. Live inference against the models starts the moment you have a key. Every model page also carries a copy-paste-runnable snippet with the model id pre-filled.

Do I need a credit card to start?

No. Sign up with GitHub or Google -- no password to set, nothing to leak -- and you get $5 in credits plus 2M free tokens on any open-weight model. You only add a payment method when the free credit runs out, and there is no subscription -- it is pay as you go with no minimum spend, cancel anytime.

Do you offer volume or enterprise pricing?

Yes. Accounts spending $1,000+ per month qualify for custom rates, with deeper discounts, priority support and dedicated SLAs at higher tiers. We reply within 24 hours.

Still deciding? See how we compare to OpenRouter — including where they win.

Start building in 5 minutes

$5 in free credits, no credit card required.

Set a spending cap before your first request. Cancel anytime.