API des Modells z-ai/glm-5.2 bei OpenRouter, $0.007 / $5.8 pro Million Tokens, Kontext 1.048.576 Tokens. Beispiele in curl, Python und JavaScript, Live-Test.
Im Katalog testen und bewerten
GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering,...
- Typ
- Modell
- Anbieter
- OpenRouter
- Modell-ID
z-ai/glm-5.2- Preis
- Kostenpflichtig
- Preis Eingabe / Ausgabe
- $0.007 / $5.8 pro Million Tokens
- Zugang ohne Schlüssel
- Nein
- Schlüsselvariable
OPENROUTER_API_KEY- Basis-URL (OpenAI-kompatibel)
https://openrouter.ai/api/v1- Kontext
- 1.048.576 Tokens
- Eingaben
- Text
- Funktionen
- Reasoning, JSON-Ausgabe, Tool-Aufrufe
- Entwicklerbewertung
- Noch nicht bewertet
- Dokumentation
- https://openrouter.ai/z-ai/glm-5.2
Codebeispiele
cURL
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"model":"z-ai/glm-5.2","messages":[{"role":"user","content":"Hallo, stell dich in einem Satz vor."}]}'Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[{"role": "user", "content": "Hallo, stell dich in einem Satz vor."}],
)
print(r.choices[0].message.content)JavaScript
// npm install openai
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY })
const r = await client.chat.completions.create({
model: 'z-ai/glm-5.2',
messages: [{ role: 'user', content: 'Hallo, stell dich in einem Satz vor.' }],
})
console.log(r.choices[0].message.content)
Beliebte Suchen
Häufige Fragen
Ist die API von Z.ai: GLM 5.2 kostenlos?
Nein: Z.ai: GLM 5.2 ist eine kostenpflichtige API ($0.007 / $5.8 pro Million Tokens).
Wie rufe ich Z.ai: GLM 5.2 aus meinem Code auf?
Z.ai: GLM 5.2 bietet eine OpenAI-kompatible API unter https://openrouter.ai/api/v1: Verwenden Sie ein beliebiges OpenAI-SDK (Python, JavaScript …) mit dieser Basis-URL. Modellkennung: z-ai/glm-5.2. Fertiger Code (Streaming, JSON, Wiederholungen) steht im Werkzeugkasten für Entwickler bereit.
Wie groß ist das Kontextfenster von Z.ai: GLM 5.2?
Z.ai: GLM 5.2 verarbeitet bis zu 1.048.576 Tokens Kontext (Nachricht und Verlauf).
Welche Alternativen gibt es zu Z.ai: GLM 5.2?
Ähnliche APIs im Katalog: Z.ai: GLM 5.4, Z.ai: GLM 5.3 FlashX Legal, Z.ai: GLM 5.3 Prime, Z.ai: GLM 5.3 FlashX, Z.ai: GLM Flash Latest.
Alternativen
- Z.ai: GLM 5.4 — Kostenpflichtig
- Z.ai: GLM 5.3 FlashX Legal — Kostenpflichtig
- Z.ai: GLM 5.3 Prime — Kostenpflichtig
- Z.ai: GLM 5.3 FlashX — Kostenpflichtig
- Z.ai: GLM Flash Latest — Kostenpflichtig
- Z.ai: GLM Flash Latest (TEE) — Kostenpflichtig
- Z.ai: GLM 5.3 Flash — Kostenpflichtig
- Z.ai: GLM 5.3 Flash (batch) — Kostenpflichtig
- Z.ai: GLM 5.3 Flash (TEE) — Kostenpflichtig
- Z.ai: GLM Latest — Kostenpflichtig
- Z.ai: GLM 5.3 — Kostenpflichtig
- Z.ai: GLM 5.3 (batch) — Kostenpflichtig