Skip to navigation

GLM 4.5 Flash

GLM 4.5 Flash
Z.ai · Text Generation
POST /v1/chat/completions

Free lightweight GLM-4.5 text model for reasoning, coding, long-form chat, and general language tasks.

See GLM 4.5 Flash pricing and specs or try it in the Playground.

At a glance

FieldValue
Model idglm-4-5-flash
Model release date2025-07-28
Input modalitiesText
Output modalitiesText
Context window128K
Weight precision-
Max output tokens98,304
RegionSingapore
Featuresreasoning, function_calling, web_search
Native inferenceNo
NewNo
Structured outputJSON Mode
Supported endpointsPOST /v1/chat/completions, POST /v1/responses, POST /v1/messages, POST /v1beta/models/glm-4-5-flash:generateContent
Alternate model idsglm-4.5-flash, zai/glm-4.5-flash, zhipu/glm-4.5-flash

Pricing

ChargeSpecRate
Inputper 1M prompt tokensFree
Outputper 1M generated tokensFree
Implicit cache readper 1M cached input tokensFree
Web searchper request when enabled$0.033

Example request

curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model": "glm-4-5-flash", "messages": [{"role":"user","content":"Hello"}]}'

Parameters

ParameterTypeRequiredDefaultDescription
temperaturenumberno0.6Sampling temperature. Lower values are more deterministic. · Range: 0 – 1
top_pnumberno0.95Nucleus sampling cutoff. · Range: 0.01 – 1
max_tokensnumberno4096Maximum output tokens. · Range: 1 – 98304
stoparrayno-Stop word list. Z.AI currently supports one stop string in array form.
do_samplebooleannotrueEnable sampling. When false, temperature and top_p do not affect generation.
enable_thinkingbooleannotrueTurns thinking on or off. On by default; when on, the model decides whether to think.
thinkingobjectno-Advanced thinking object. Use {“type”:“enabled”} or {“type”:“disabled”}. When enabled, the model decides whether to think.
toolsarrayno-Function tools and the built-in web_search tool are supported.
tool_choiceenumno"auto"Only auto is supported. Omit tools to disable tool use. · Allowed: auto
tool_web_searchbooleannofalseEnable built-in web search. Adds $0.033 per request when enabled.
search_resultbooleannotrueReturn structured web search result metadata when web search is enabled.
search_promptstringno-Optional instruction for summarizing retrieved web search results.
countnumberno10Number of web search results to retrieve. · Range: 1 – 50
search_domain_filterstringno-Optional domain whitelist for web search results.
search_recency_filterenumno"noLimit"Optional web search recency window. · Allowed: oneDay, oneWeek, oneMonth, oneYear, noLimit
response_formatenumno-Return the output as a valid JSON object (JSON mode). Describe the fields you want in your prompt.

Notes

Base token use is free. Built-in web search is optional through tool_web_search and adds $0.033 per request when enabled.


Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/glm-4-5-flash.