GLM 5.2 live now

GLM 5.2 API for builders who need lower cost

GLM 5.2 API at 40% off official

Run the model everyone is talking about through flatkey: 60% of the official price, on dedicated self-hosted compute. Compatible with OpenAI SDK and Claude Code CLI. One line to switch.

No card to start · OpenAI SDK + Claude Code CLI compatible · Switch in one line

200 ok
POSThttps://router.flatkey.ai/v1/messages
Claude Code CLI routing
# ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://router.flatkey.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_FLATKEY_KEY",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "API_TIMEOUT_MS": "3000000"
  }
}
Use the OpenAI SDK pattern or route Claude Code CLI usage through flatkey.flatkey 60% · official 100%

Why flatkey for GLM 5.2

Two reasons, no catch

-40%

60% of the official price

Same GLM 5.2 API surface, billed at 60% of what you would pay official. Transparent per-token pricing, no minimums, pay as you go.

Dedicated self-hosted compute

We run GLM 5.2 on owned GPU capacity, not a thin reseller layer. That gives teams a clearer operating path before they move campaign traffic into production.

Pricing

Pay 60%. Get 100%.

Exact same GLM 5.2 request shape. You just pay less on every call.

Official GLM 5.2

100%

GLM 5.2 on flatkey

60%
Save 40% on every GLM 5.2 call

Pricing claim follows the campaign offer. Recheck the live billing configuration before launch.

Drop-in code

Switch with one base URL

Keep the OpenAI SDK or Claude Code CLI workflow. Point traffic to flatkey and set the model name.

API example
OpenAI SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://router.flatkey.ai/v1",
    api_key="YOUR_FLATKEY_KEY",
)

client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "..."}],
)
Claude Code CLI
# ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://router.flatkey.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_FLATKEY_KEY",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "API_TIMEOUT_MS": "3000000"
  }
}

Built for paid traffic that converts

Everything a developer expects before trying a model

OpenAI SDK + Claude Code CLI

Use chat completions in code, or route Claude Code CLI usage through the same flatkey account.

Own GPU capacity

A dedicated GLM lane gives volume campaigns more predictable headroom.

40% cheaper

Market the value clearly: flatkey bills GLM 5.2 at 60% of official.

Pay USD or local

Simple top-ups and account billing without chasing separate provider accounts.

40+ other models

One key can test GLM, GPT, Claude, Gemini, video, image, and more.

Free credit to start

Let developers create a key and make the first GLM 5.2 call quickly.

Launch GLM 5.2 without reworking your stack

Create one flatkey API key, point your OpenAI-compatible client at our router, and start testing GLM 5.2 on dedicated compute.

Get your GLM 5.2 key

Is this the same model as official GLM 5.2?

The page targets GLM 5.2 compatible API usage through flatkey. Confirm exact runtime availability in the dashboard before production rollout.

Do I need to rewrite my OpenAI SDK code?

No. Use the OpenAI-compatible base URL, keep the SDK, and set the model to glm-5.2. Claude Code CLI traffic can also route through flatkey.

Who is this page for?

Developers arriving from Google, Reddit, and regional campaigns who want a cheaper GLM 5.2 API key with a familiar integration path.