Back to models
GLM-4-9B-0414
Developed by Zhipu AI, GLM-4-9B-0414 is a 9B dense open-weight chat model from the 0414 generation optimized for single-GPU bilingual dialogue, structured extraction, coding, and tool invocation.
What you can do
- Single-GPU enterprise RAG question answering
- API function parameter extraction
- Business document drafting and translation
Input & output
- Input
- Bilingual dialogue prompts, enterprise RAG passages, and JSON function-calling schemas
- Output
- Natural bilingual responses, structured JSON payloads, summaries, and code snippets
Try a prompt like this
请从以下采购合同条款中抽取甲乙双方名称、付款账期、违约金比例与争议管辖地,并严格按 JSON Schema 输出。
Things to know
MIT license; fits comfortably on a single 24 GB GPU (~18–20 GB VRAM in BF16); complex multi-step math proofs perform better on GLM-Z1 variants.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
ZhipuAI/GLM-4-9B-0414
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="ZhipuAI/GLM-4-9B-0414",
messages=[{"role": "user", "content": "请从以下采购合同条款中抽取甲乙双方名称、付款账期、违约金比例与争议管辖地,并严格按 JSON Schema 输出。"}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide