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.

Operacional · 7 variants · a 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
VISÃO GERAL

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 para diferentes metas de qualidade e latência
  • API key unificada
  • O model skill inclui documentação, schemas e notas de setup
  • Gerações com falha não são cobradas
VARIANTES

Variantes

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

Endpoints da API GLM

Use o SDK OpenAI ou Anthropic com sua chave RunAPI. Nenhum SDK extra necessário.

Endpoint Protocol
/v1/chat/completions OpenAI compatible
COMO FUNCIONA

Como construir com este model skill

01

Escolha o modelo

Selecione o modelo e a variante que combinam com seu tipo de saída, meta de qualidade e latência.

02

Autentique uma vez

Use sua chave RunAPI para todos os modelos compatíveis.

03

Instale o skill

Adicione o model skill ao workspace de código antes de implementar a funcionalidade.

04

Receba a saída

Consulte por task ID ou trate o callback quando a geração terminar.

CONTEXTO

Onde GLM se encaixa

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
POR QUE RUNAPI

Por que usar GLM pela RunAPI

Uma API key

Use as mesmas credenciais entre modelos e provedores.

Pronto para skills

O model skill inclui schemas, notas de setup, contexto de preços e IDs de modelo.

Cobrança previsível

O preço por uso fica visível antes da chamada.

FAQ

Perguntas frequentes

Como chamo este modelo?

Instale o model skill e siga as notas de setup com sua chave RunAPI.

Gerações com falha custam dinheiro?

Gerações com falha não são cobradas

Posso chamar a partir da minha aplicação?

Sim. Instale o model skill no workspace de código e use durante a implementação da funcionalidade.

COMEÇAR

Comece a construir com GLM.