GLM API
Z.ai GLM API access via RunAPI — MIT-licensed MoE models with up to 200K context, leading open-weight coding benchmarks.
# Base URL
https://runapi.ai
# Endpoints
POST /v1/chat/completions
curl https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Read this multi-file repository, find the failing integration test, and propose a patch with an explanation of the root cause."
}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://runapi.ai/v1",
api_key="your-runapi-key"
)
response = client.chat.completions.create(
model="glm-5.1",
messages=[{"role": "user", "content": "Read this multi-file repository, find the failing integration test, and propose a patch with an explanation of the root cause."}]
)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://runapi.ai/v1",
apiKey: "your-runapi-key"
});
const response = await client.chat.completions.create({
model: "glm-5.1",
messages: [{ role: "user", content: "Read this multi-file repository, find the failing integration test, and propose a patch with an explanation of the root cause." }]
});
GLM is Z.ai's family of MIT-licensed Mixture-of-Experts language models. GLM-4.5 (355B total / 32B active, 128K context) introduced the open-weight MoE line with a flagship and a lighter Air tier. GLM-4.6 and 4.7 extend to 200K context with stronger code generation — 4.7 reaches 73.8% on SWE-bench. The GLM-5 series (744B / 40B active, 200K context) pushes further to 77.8% SWE-bench Verified, and GLM-5.1 holds the top open-weight score on SWE-bench Pro at 58.4%. All are available through RunAPI with one key and per-token billing.
- Modellvarianten für verschiedene Qualitäts- und Latenzziele
- Einheitlicher API Key
- Model Skill enthält Docs, Schemas und Setup-Hinweise
- Fehlgeschlagene Generierungen werden nicht berechnet
Varianten
GLM API-Endpunkte
Nutze das OpenAI- oder Anthropic-SDK mit deinem RunAPI-Key. Kein zusätzliches SDK nötig.
| Endpoint | Protocol |
|---|---|
| /v1/chat/completions | OpenAI compatible |
Mit diesem Model Skill bauen
Modell wählen
Wähle Modell und Variante passend zu Ausgabetyp, Qualitätsziel und Latenz.
Einmal authentifizieren
Nutze deinen RunAPI Key für jedes unterstützte Modell.
Skill installieren
Füge den Model Skill deinem Coding-Workspace hinzu, bevor du das Feature implementierst.
Ergebnis empfangen
Frage per Task ID ab oder verarbeite den Callback, wenn die Generierung abgeschlossen ist.
Wo GLM passt
GLM models from Z.ai are MIT-licensed MoE LLMs spanning 128K–200K context. GLM-5.1 leads open-weight models on SWE-bench Pro. Through RunAPI they share a single API key with pay-as-you-go token billing, callable from the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages surfaces.
Warum GLM über RunAPI nutzen
Ein API Key
Nutze dieselben Zugangsdaten über Modelle und Anbieter hinweg.
Skill-ready
Der Model Skill enthält Schemas, Setup-Hinweise, Preiskontext und Modell-IDs.
Planbare Abrechnung
Nutzungsbasierte Preise sind vor dem Aufruf sichtbar.
Häufige Fragen
Wie rufe ich dieses Modell auf?
Installiere den Model Skill und folge den Setup-Hinweisen mit deinem RunAPI Key.
Kosten fehlgeschlagene Generierungen Geld?
Fehlgeschlagene Generierungen werden nicht berechnet
Kann ich es aus meiner Anwendung aufrufen?
Ja. Installiere den Model Skill im Coding-Workspace und nutze ihn beim Einbau des Modell-Features.