
Flagship coding and agentic model with a 1M token context, 128K output, image, video, and file input, always-on reasoning at low, high, or max effort, native web search, and tool calling.
Flagship coding and agentic model with a 1M token context, 128K output, image, video, and file input, always-on reasoning at low, high, or max effort, native web search, and tool calling.
Notes: - Context window: 1M tokens - Maximum output: 128K tokens - Accepts text, image, video, and file input - Always reasons; thinking cannot be disabled - Reasoning effort: low, high, or max (max recommended for complex coding) - A request for a different effort, or to turn thinking off, is served at the nearest supported level - Built-in web search adds $0.033 per request when used - Supports function calling (tool choice auto or none), structured output (JSON mode), and streaming
Também conhecido como Z.ai GLM 5.4
glm-5-4/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/glm-5-4:generateContentglm-5.4zai/glm-5.4zhipu/glm-5.4Tarifas pay-as-you-go ao vivo do catálogo EmpirioLabs. Você também pode escolher um plano com franquias semanais.
GLM 5.4 atende a API Chat Completions compatível com OpenAI. Aponte qualquer SDK OpenAI para https://api.empiriolabs.ai/v1 com sua chave de API EmpirioLabs e use o id de modelo glm-5-4. Obtenha uma chave de API no painel EmpirioLabs.
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5-4",
"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-5-4",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)Parâmetros de requisição suportados pela API GLM 5.4 na EmpirioLabs. Os padrões valem quando um campo é omitido.
| Parâmetro | Tipo | Padrão | Intervalo / valores | Descrição |
|---|---|---|---|---|
| max_tokens | integer | 65536 | 1 a 131072 | Maximum number of output tokens to generate. |
| temperature | number | 1 | 0 a 1 | Controls randomness. Lower values make responses more deterministic. |
| top_p | number | 0.95 | 0.01 a 1 | Nucleus sampling cutoff. |
| reasoning_effort | enum | max | low, high, max | This model always reasons and cannot be turned off. low is lightweight, high is enhanced, and max is deep reasoning. max is recommended for complex coding. |
| preserve_thinking | boolean | false | - | Include the reasoning of earlier assistant turns in the model's input on /v1/chat/completions. Return each turn's reasoning unchanged in that assistant message's... |
| do_sample | boolean | true | - | Enable sampling. Turn off for greedy deterministic output (temperature and top_p are ignored). |
| tool_web_search | boolean | false | - | Enable built-in web search. Adds $0.033 per request when used. |
| search_recency_filter | enum | noLimit | oneDay, oneWeek, oneMonth, oneYear, noLimit | Limit web search results to a recency window. |
| count | integer | 10 | 1 a 50 | Number of web search results to retrieve when web search is enabled. |
| search_domain_filter | string | - | - | Restrict web search to a specific domain. |
| search_prompt | string | - | - | Optional prompt used to summarize retrieved web search results. |
| search_result | boolean | true | - | Return web search result metadata in the response when web search is enabled. |
| tool_stream | boolean | false | - | Stream function-call arguments incrementally when streaming. |
| tools | array | [] | - | OpenAI-compatible function calling tool definitions. A web_search tool sent here keeps its own search options as written, with count from 1 to 50. |
Anúncios, testes de prompts e comparações que cobrem este modelo.
Na EmpirioLabs, GLM 5.4 é cobrado por uso: Entrada $1.40 per 1M prompt tokens; Saída $4.40 per 1M generated tokens; Web search $0.033 per request. Você também pode escolher um plano com franquias semanais. A tabela de tarifas ao vivo desta página sempre corresponde ao que a API cobra.
O GLM 5.4 recebe Texto, Imagem, Vídeo, Arquivo como entrada e retorna Texto.
GLM 5.4 suporta uma janela de contexto de 1M tokens com até 131.072 tokens de saída por resposta.
Sim. GLM 5.4 atende a API Chat Completions compatível com OpenAI, então SDKs OpenAI existentes funcionam apontando base_url para https://api.empiriolabs.ai/v1 e definindo o id de modelo glm-5-4.
Envie glm-5-4 como modelo na sua requisição. Os IDs alternativos glm-5.4, zai/glm-5.4, zhipu/glm-5.4 também funcionam.
Z.ai lançou o GLM 5.4 em 2 de dez. de 2026.
No EmpirioLabs, o GLM 5.4 é servido a partir de Singapore.
Sim. O playground da EmpirioLabs executa GLM 5.4 no navegador com os mesmos parâmetros que a API expõe, para você testar prompts antes de escrever código.
Crie uma conta EmpirioLabs e gere uma chave em API Keys no painel. A cobrança usa créditos pay-as-you-go, então você paga apenas pelas requisições que faz. Você também pode escolher um plano com franquias semanais.
Confira nossos preços ou entre em contato se quiser que seu próprio modelo seja implementado em nossa pilha.