
High-speed GLM-4.7 text model for coding, reasoning, long-context writing, and chat, with 200K context, function calling, and web search.
High-speed GLM-4.7 text model for coding, reasoning, long-context writing, and chat, with 200K context, function calling, and web search.
Built-in web search is optional through tool_web_search and adds $0.033 per request when enabled. Supports function tools, tool_choice auto, JSON response_format, thinking controls, tool_stream, temperature, top_p, do_sample, max_tokens, stop, and streaming.
Also known as GLM FlashX, Z.ai GLM 4.7 FlashX
glm-4-7-flashx/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/glm-4-7-flashx:generateContentglm-4.7-flashxzai/glm-4.7-flashxzhipu/glm-4.7-flashxLive pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
GLM 4.7 FlashX serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id glm-4-7-flashx. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4-7-flashx",
"messages": [
{"role": "user", "content": "Write a haiku about the ocean."}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
response = client.chat.completions.create(
model="glm-4-7-flashx",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)Request parameters supported by the GLM 4.7 FlashX API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| temperature | number | 1 | 0 to 1 | Sampling temperature. Lower values are more deterministic. |
| top_p | number | 0.95 | 0.01 to 1 | Nucleus sampling cutoff. |
| max_tokens | number | 4096 | 1 to 131072 | Maximum output tokens. |
| stop | array | - | - | Stop word list. Z.AI currently supports one stop string in array form. |
| do_sample | boolean | true | - | Enable sampling. When false, temperature and top_p do not affect generation. |
| enable_thinking | boolean | true | - | Turns thinking on or off. On by default, and the model thinks; turn it off for simple low-latency turns. |
| thinking | object | - | - | Advanced thinking object. Use {"type":"enabled"} or {"type":"disabled"}. The model thinks when enabled. |
| tools | array | - | - | Function tools and the built-in web_search tool are supported. |
| tool_choice | enum | auto | auto | Only auto is supported. Omit tools to disable tool use. |
| tool_stream | boolean | false | - | Stream function-call tool output when stream is true. Z.AI documents tool_stream for GLM-4.6 and newer models. |
| tool_web_search | boolean | false | - | Enable built-in web search. Adds $0.033 per request when enabled. |
| search_result | boolean | true | - | Return structured web search result metadata when web search is enabled. |
| search_prompt | string | - | - | Optional instruction for summarizing retrieved web search results. |
| count | number | 10 | 1 to 50 | Number of web search results to retrieve. |
Built-in web search is optional through tool_web_search and adds $0.033 per request when enabled.
On EmpirioLabs, GLM 4.7 FlashX is billed pay as you go: Input $0.07 per 1M prompt tokens; Output $0.40 per 1M generated tokens; Implicit cache read $0.063 per 1M cached input tokens; Web search $0.033 per request when enabled. The live rate card on this page always matches what the API charges.
GLM 4.7 FlashX supports a 200K-token context window with up to 131,072 output tokens per response.
Yes. GLM 4.7 FlashX serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to glm-4-7-flashx.
Yes. The EmpirioLabs playground runs GLM 4.7 FlashX in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.