GLM 5.4 API

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.

Z.ai Textgenerierung 1M Kontext Veröffentlicht 2. Dez. 2026 Singapore Proprietärer Endpoint Neu

Über GLM 5.4

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

Auch bekannt als Z.ai GLM 5.4

reasoning vision video understanding document understanding function calling web search

GLM 5.4 Spezifikationen

Modell-ID
glm-5-4
Autor
Z.ai
Kategorie
Textgenerierung
Veröffentlicht
2. Dez. 2026
Kontextfenster
1M Token
Max. Ausgabe
131.072 Token
Eingabe
TextBildVideoDatei
Ausgabe
Text
Strukturierte Ausgabe
JSON-Modus
Region
Singapore
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/glm-5-4:generateContent
Alternative Modell-IDs
glm-5.4zai/glm-5.4zhipu/glm-5.4

GLM 5.4 API-Preise

Live Pay-as-you-go-Preise aus dem EmpirioLabs-Katalog. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen.

Typ
Spezifikation
Preis
Eingabe
per 1M prompt tokens
$1.40
Ausgabe
per 1M generated tokens
$4.40
Web search
per request
$0.033
Auf der vollständigen Preisseite vergleichen

So rufst du die GLM 5.4 API auf

GLM 5.4 bedient die OpenAI-kompatible Chat Completions API. Richte ein beliebiges OpenAI SDK mit deinem EmpirioLabs API-Schlüssel auf https://api.empiriolabs.ai/v1 und verwende die Modell-ID glm-5-4. Hol dir einen API-Schlüssel im EmpirioLabs Dashboard.

cURL
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."}
    ]
  }'
Python (OpenAI SDK)
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)
Vollständige GLM 5.4 API-Referenz

GLM 5.4 API-Parameter

Request-Parameter, die die GLM 5.4 API auf EmpirioLabs unterstützt. Standardwerte gelten, wenn ein Feld weggelassen wird.

ParameterTypStandardBereich / WerteBeschreibung
max_tokensinteger655361 bis 131072Maximum number of output tokens to generate.
temperaturenumber10 bis 1Controls randomness. Lower values make responses more deterministic.
top_pnumber0.950.01 bis 1Nucleus sampling cutoff.
reasoning_effortenummaxlow, high, maxThis 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_thinkingbooleanfalse-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_samplebooleantrue-Enable sampling. Turn off for greedy deterministic output (temperature and top_p are ignored).
tool_web_searchbooleanfalse-Enable built-in web search. Adds $0.033 per request when used.
search_recency_filterenumnoLimitoneDay, oneWeek, oneMonth, oneYear, noLimitLimit web search results to a recency window.
countinteger101 bis 50Number of web search results to retrieve when web search is enabled.
search_domain_filterstring--Restrict web search to a specific domain.
search_promptstring--Optional prompt used to summarize retrieved web search results.
search_resultbooleantrue-Return web search result metadata in the response when web search is enabled.
tool_streambooleanfalse-Stream function-call arguments incrementally when streaming.
toolsarray[]-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.
3 weitere Parameter in den Docs

GLM 5.4 im Blog

Ankündigungen, Prompt-Tests und Vergleiche, die dieses Modell abdecken.

GLM 5.4 API: häufige Fragen

Wie viel kostet die GLM 5.4 API?

Auf EmpirioLabs wird GLM 5.4 nach Verbrauch abgerechnet: Eingabe $1.40 per 1M prompt tokens; Ausgabe $4.40 per 1M generated tokens; Web search $0.033 per request. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen. Die Live-Preistabelle auf dieser Seite entspricht immer dem, was die API berechnet.

Welche Eingaben und Ausgaben unterstützt GLM 5.4?

GLM 5.4 nimmt Text, Bild, Video, Datei als Eingabe an und gibt Text aus.

Wie groß ist das Kontextfenster von GLM 5.4?

GLM 5.4 unterstützt ein Kontextfenster von 1M Token mit bis zu 131.072 Ausgabe-Token pro Antwort.

Ist die GLM 5.4 API OpenAI-kompatibel?

Ja. GLM 5.4 bedient die OpenAI-kompatible Chat Completions API. Bestehende OpenAI SDKs funktionieren, indem du base_url auf https://api.empiriolabs.ai/v1 setzt und als Modell-ID glm-5-4 verwendest.

Wie lautet die Modell-ID von GLM 5.4?

Sende glm-5-4 als Modell in deinem Request. Die alternativen IDs glm-5.4, zai/glm-5.4, zhipu/glm-5.4 funktionieren ebenfalls.

Wann wurde GLM 5.4 veröffentlicht?

Z.ai hat GLM 5.4 am 2. Dez. 2026 veröffentlicht.

Von wo wird GLM 5.4 bereitgestellt?

GLM 5.4 auf EmpirioLabs wird aus Singapore bereitgestellt.

Kann ich GLM 5.4 im Browser testen, bevor ich integriere?

Ja. Der EmpirioLabs Playground führt GLM 5.4 im Browser mit denselben Parametern aus, die die API bietet. So kannst du Prompts testen, bevor du Code schreibst.

Wie bekomme ich einen GLM 5.4 API-Schlüssel?

Erstelle ein EmpirioLabs-Konto und generiere dann einen Schlüssel unter API Keys im Dashboard. Die Abrechnung erfolgt über Pay-as-you-go-Guthaben, du zahlst also nur für deine Requests. Du kannst auch einen Plan mit wöchentlichen Kontingenten wählen.

GLM 5.4 mit anderen Modellen vergleichen

Alle Modellvergleiche

Bereit, bessere Endpunkte zu nutzen?

Schauen Sie sich unsere Preise an oder kontaktieren Sie uns, wenn Sie Ihr eigenes Modell auf unserem Stack implementieren möchten.