Chinese model APIs on one OpenAI-compatible key. Browse models
Z.ai / GLM logo on the SmarToken GLM API hub
GLM / Zhipu

glm api

GLM API: choose speed, generation, or vision on purpose

“GLM API” searches fail when every Zhipu name lands in one paragraph. This hub forces a speed vs quality vs vision decision, then verifies Live vs Integrating before you paste an ID into production.

Map workload to Flash, 5.x text, or 5V vision — then verify whether that row is Live or still Integrating.

2 Live · 2 Integrating · Base URL https://thesmartoken.com/v1

Reading Z.ai rows without vendor fog

Zhipu / Z.ai naming shifts across consoles, blogs, and gateway aliases. Your production config should not depend on nickname archaeology — only on apiModelId values from this catalog or GET /v1/models.

glm-4-flash is the latency/cost oriented entry for snappy assistants and classification-like tasks. Measure p95 latency before chasing newer 5.x names.

glm-5.2 and glm-5.3 are newer text candidates when Flash quality ceilings show up. Promote the smallest upgrade that clears your gate.

glm-5v-turbo is vision-oriented. Sending images to a text-only ID and calling it a “GLM failure” wastes a week.

DeepSeek currently carries Live canaries on SmarToken for many teams. Use GLM when your eval says Flash/5.x/5V wins on the workloads you ship — especially Chinese enterprise-style assistants — not because the brand feels safe.

Catalog rows for this vendor

ModelAPI IDContextIn / OutStatusDetail
GLM-5.2glm-5.21M$1.4 / $4.4LiveOpen
GLM-5.3glm-5.31M$1.4 / $4.4LiveOpen
GLM-4 Flashglm-4-flash128K$0.8 / $3.2IntegratingOpen
GLM-5V Turboglm-5v-turbo200K$1.2 / $4IntegratingOpen

Flash vs 5.x vs Vision

DimensionSpeed / cost (Flash)Quality / vision upgrades
Default probeglm-4-flashglm-5.2 / 5.3 or glm-5v-turbo by need
Optimize forLatency and unit costHarder text quality or image inputs
Risk if wrongQuality ceiling on hard tasksPaying more when Flash already passed
Vision?No — text-oriented5V Turbo only for image loops

Workload → first pick

WorkloadFirst pickWhy
Interactive assistantsglm-4-flashProve p95 and error rate before upgrading.
Harder reasoning / writing5.2 / 5.3 bake-offSmallest upgrade that clears the gate wins.
Screenshots / docs as imagesglm-5v-turboVision fixtures only — do not mix scoring.
OpenRouter alias cleanupMap to catalog IDsSee /openrouter-alternative; stop billing aliases forever.

GLM decision tree

  1. Step 1

    Need interactive latency → Flash

    Measure p95 and errors on top intents before chasing 5.x.

  2. Step 2

    Flash fails quality → 5.2 / 5.3

    Identical prompts. Promote the smallest upgrade that passes.

  3. Step 3

    Images in the loop → 5V Turbo only

    Confirm vision capabilities in docs for your parameters.

  4. Step 4

    Normalize aliases → catalog IDs

    Long-term logs and invoices should show SmarToken model IDs.

Billing notes

Flash traffic should be cheap per turn — if it is not, inspect prompt bloat before upgrading models.

Vision tokens and image payloads change cost curves; forecast with real fixtures.

Integrating rows are not production invoice lines until Live usage appears in the wallet.

Cross-check /pricing and this hub’s status column on every release.

Minimal request shape

Default example uses glm-4-flash. Switch explicitly if bake-off selected 5.x or 5V. Current example ID: glm-5.2 (Live).

const client = new OpenAI({
  apiKey: process.env.SMTOKEN_API_KEY,
  baseURL: "https://thesmartoken.com/v1",
});

const result = await client.chat.completions.create({
  model: "glm-5.2",
  messages: [{ role: "user", content: "Return one sentence confirming the model id." }],
});

Full protocol notes live in /docs#quickstart. Confirm Live IDs with GET /v1/models before raising concurrency.

Ops notes

  • Keep Zhipu-direct and SmarToken keys labeled separately.
  • When quality drops, check which generation ID logs show — alias maps drift.
  • Vision failures: verify payload encoding before swapping models again.
  • 402 handling: stop retries, top up, resume — same as other Live routes.

GLM pitfalls

  • Confusing Zhipu console IDs with SmarToken apiModelId values.
  • Using OpenRouter-style aliases forever instead of catalog IDs.
  • Judging vision models with text-only benchmarks.
  • Ignoring Integrating status because GLM branding feels enterprise-safe.
  • Upgrading to 5.x without proving Flash failed the gate.

When another page is better

  • Live DeepSeek canary — /models/deepseek.
  • Long-context Moonshot story — /models/kimi.
  • Alias migration playbook — /openrouter-alternative.

FAQ

Is Z.ai the same as Zhipu here?
For filtering, yes — this hub uses vendorFilter Z.ai. Cards still show the human vendor label from the catalog.
Should GLM replace DeepSeek for me?
Only if your eval says so. DeepSeek currently carries Live canaries; GLM may still be Integrating depending on the row.
Where do aliases get normalized?
See /openrouter-alternative. Long term, log and bill against the SmarToken model ID.
Flash or 5.x for a new chatbot?
Start Flash. Upgrade only when measured quality gates fail.