GLM 4.7 Flash API pricing
Call GLM 4.7 Flash through one OpenAI-compatible endpoint, billed $0.0242 per 1M input tokens, 60% below Z.ai’s list price. Routes are verified before they serve you and re-checked continuously.
- Context window
- 198k tokens
- Type
- Text
- Capabilities
- chat
- Availability
- Callable now
- Model id
- z-ai/glm-4.7-flash
- Input, per 1M tokens
- $0.0242was
$0.0605 - Output, per 1M tokens
- $0.16was
$0.40
Same model, same tokens, less to pay. Billed per request from prepaid credits; every response reports the cost.
Point the OpenAI SDK at OSMEXO and use z-ai/glm-4.7-flash
The base URL and the key are the only changes. Streaming, tool calls, structured output and vision behave as they do upstream, and every response carries the billed cost beside the list price.
from openai import OpenAI
client = OpenAI(
base_url="https://api.osmexo.com/v1", # was the vendor's URL
api_key="osm-...",
)
r = client.chat.completions.create(
model="z-ai/glm-4.7-flash",
messages=[{"role": "user", "content": "Hello"}],
)
Check it is the real GLM 4.7 Flash, with your own key
The same battery we run before a route goes live: tokenizer fingerprint, knowledge cutoff, hidden-prompt probe and exact-output tasks, scored 0 to 100 against the vendor’s own API. One OpenRouter key verifies any text model; a direct Z.ai key works too. Exit code 0 means the same model.
curl -fsSLO https://dashboard.osmexo.com/verify.mjs
OSMEXO_API_KEY=osm-... VENDOR_API_KEY=sk-or-... node verify.mjs --model z-ai/glm-4.7-flash --vendor openrouter
About GLM 4.7 Flash on OSMEXO
- How much does GLM 4.7 Flash cost through OSMEXO?
- $0.0242 per 1M input tokens and $0.16 per 1M output tokens, billed per request from prepaid credits. That is 60% below Z.ai’s list price of $0.0605 / $0.40. The price on this page refreshes from the catalog every few minutes.
- Is this the same GLM 4.7 Flash as calling Z.ai directly?
- Yes. Every route for GLM 4.7 Flash is probed against the vendor’s own API before it serves anyone: tokenizer fingerprint, knowledge cutoff, a hidden-prompt probe and exact-output tasks, scored 0 to 100 with 85 as the approval threshold. You can run the same check from your machine with your own vendor key; the command is on this page.
- How do I call GLM 4.7 Flash with the OpenAI SDK?
- Point the official OpenAI SDK at https://api.osmexo.com/v1 with your OSMEXO key and use the model id z-ai/glm-4.7-flash. Streaming, tool calls, structured output and vision work as they do upstream. Coding agents such as OpenCode, Cline, Roo Code, Continue and Aider take the same base URL and key.
- What happens if a provider for GLM 4.7 Flash goes down?
- The gateway retries and falls back to the next verified route for GLM 4.7 Flash before the first token is sent, so your users see a slower answer instead of an error. Every response reports which route answered, what it cost, and what the same tokens would have cost at list price.