Text · Z.ai

GLM API

Z.ai GLM API access via RunAPI — MIT-licensed MoE models with up to 200K context, leading open-weight coding benchmarks.

Opérationnel · 7 variants · à partir de $0.010
runapi.ai
# 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." }]
});
https://runapi.ai /v1/chat/completions
APERÇU

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.

  • Variantes de modèle pour différents objectifs de qualité et de latence
  • API key unifiée
  • Le model skill inclut docs, schémas et notes de setup
  • Les générations échouées ne sont pas facturées
VARIANTES

Variantes

Variant Billing From
glm-4.5 1K tokens $0.020 Voir →
glm-4.5-air 1K tokens $0.010 Voir →
glm-4.6 1K tokens $0.020 Voir →
glm-4.7 1K tokens $0.020 Voir →
glm-5 1K tokens $0.020 Voir →
glm-5-turbo 1K tokens $0.020 Voir →
glm-5.1 1K tokens $0.030 Voir →
API

Points d'accès API GLM

Utilisez le SDK OpenAI ou Anthropic avec votre clé RunAPI. Aucun SDK supplémentaire requis.

Endpoint Protocol
/v1/chat/completions OpenAI compatible
FONCTIONNEMENT

Construire avec ce model skill

01

Choisir le modèle

Sélectionnez le modèle et la variante adaptés au type de sortie, au niveau de qualité et à la latence cible.

02

S'authentifier une fois

Utilisez votre clé RunAPI pour tous les modèles pris en charge.

03

Installer le skill

Ajoutez le model skill à votre workspace de code avant d'implémenter la fonctionnalité.

04

Recevoir la sortie

Interrogez par task ID ou traitez le callback quand la génération se termine.

CONTEXTE

Où utiliser GLM

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.

Provider
Z.ai
Modality
Text
POURQUOI RUNAPI

Pourquoi utiliser GLM via RunAPI

Une API key

Utilisez les mêmes identifiants pour les modèles et les fournisseurs.

Prêt pour les skills

Le model skill inclut schémas, notes de setup, contexte tarifaire et IDs de modèle.

Facturation prévisible

Les tarifs à l'usage sont visibles avant l'appel.

FAQ

Questions fréquentes

Comment appeler ce modèle ?

Installez le model skill et suivez ses notes de setup avec votre clé RunAPI.

Les générations échouées coûtent-elles quelque chose ?

Les générations échouées ne sont pas facturées

Puis-je l'appeler depuis mon application ?

Oui. Installez le model skill dans votre workspace de code et utilisez-le pendant l'ajout de la fonctionnalité.

COMMENCER

Commencez à construire avec GLM.