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.
- عدة إصدارات لمستويات مختلفة من السرعة / الجودة
- يتضمن model skill التوثيق والـschemas وملاحظات الإعداد
- يعمل مع workflows موجهة لتطوير التطبيقات
- لا يتم احتساب رسوم على عمليات التوليد الفاشلة
قارن جميع إصدارات API
نقاط نهاية API لـ GLM
استخدم SDK OpenAI أو Anthropic مع مفتاح RunAPI. لا حاجة لـ SDK إضافي.
| Endpoint | Protocol |
|---|---|
| /v1/chat/completions | OpenAI compatible |
من model skill إلى أول نتيجة في أربع خطوات
اختر النموذج
اختر النموذج والإصدار المناسبين لنوع المخرجات ومستوى الجودة وزمن الاستجابة المستهدف.
الإعداد
اضبط مفتاح RunAPI وثبّت model skill في مساحة عمل الكود.
التنفيذ
استخدم تعليمات المهارة لإضافة ميزة النموذج داخل تطبيقك.
الاستلام
استعلم عبر task ID أو استخدم البث عند دعمه أو عالج webhook callback.
ما هي GLM API؟
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.
لماذا تستخدم GLM API عبر RunAPI
مصادقة واحدة لكل مزود
مفتاح RunAPI واحد يفتح الوصول إلى الكتالوج بالكامل. لا حسابات منفصلة، ولا تدوير مفاتيح لكل تكامل.
تسعير وفوترة موحّدان
تسعير لكل استدعاء بالدولار الأمريكي، ويُفوتر شهريًا. لا تُحتسب التوليدات الفاشلة.
Skill مع schemas
تأتي الـschemas المعرّفة وملاحظات الإعداد داخل model skill حتى يبدأ التنفيذ من العقد الصحيح.
أسئلة شائعة
أي نسخة ينبغي أن أبدأ بها؟
اختر أرخص نسخة تفي بمعيار الجودة لديك. يبدأ معظم الفرق بالنسخة السريعة ثم ينتقلون إلى pro للإنتاج.
هل توجد خطة مجانية؟
تحصل الحسابات الجديدة على أول طلبات مجانية على كل نموذج. بعد ذلك، الدفع حسب كل طلب.
هل تدعمون البث المباشر للنتائج؟
حيث يتوفر البث المباشر، يوفّر RunAPI البث من البداية إلى النهاية.
كيف يتم احتساب الرسوم عند الفشل؟
لا يتم تحصيل رسوم على عمليات التوليد الفاشلة.
هل يتم تخزين المخرجات مؤقتًا؟
يتم حفظ المخرجات المولدة ويمكن استرجاعها بواسطة task ID. لا يتم تخزين المدخلات مؤقتًا.
هل يمكنني الاستخدام تجاريًا؟
نعم — يشمل كل إصدار الاستخدام التجاري ما لم يقيّده ترخيص النموذج صراحةً، ويُشار إلى ذلك في صفحة الإصدار.
ماذا عن حدود المعدل؟
تتدرج حدود المعدل لكل مفتاح وفق فئة الاستخدام. راجع صفحة الأسعار للاطلاع على الحدود الحالية.
أين يمكنني الإبلاغ عن المشاكل؟
افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.