Model Provider Integration Request
GLM (Zhipu AI) is a leading large language model provider offering a series of models based on the GLM (General Language Model) architecture. It provides an OpenAI-compatible API format, making integration straightforward. Both domestic (China) and international endpoints are available.
Models
| Model |
Description |
glm-4 |
Flagship model with complex reasoning, multi-turn dialogue, and tool calling |
glm-4-air |
Cost-effective version suitable for most applications |
glm-4-flash |
Ultra-fast response version for simple tasks |
glm-4v |
Multimodal model supporting image understanding |
glm-3-turbo |
Lightweight model for low-latency scenarios |
Key Features
- OpenAI-compatible API: RESTful API with OpenAI-compatible request/response format
- Tool Calling (Function Calling): Supports structured tool/function invocation
- Streaming: Supports SSE streaming output
- Multimodal: GLM-4V supports image inputs alongside text
Resources
Domestic (China)
International (Global)
- Official Site: https://z.ai
- API Docs: https://docs.z.ai
- Base URL:
https://api.z.ai/api/paas/v4/
- Authentication: API Key-based via
Authorization: Bearer {api_key} header
Integration Notes
Since Zhipu AI provides an OpenAI-compatible API, the existing OpenAI provider implementation could potentially be reused with the following adjustments:
- Allow custom
base_url pointing to the domestic (open.bigmodel.cn) or international (api.z.ai) endpoint
- Add GLM-specific model name mappings
- Handle any minor API differences between domestic and international versions (e.g., specific parameter support, rate limits)
Checklist
Model Provider Integration Request
GLM (Zhipu AI) is a leading large language model provider offering a series of models based on the GLM (General Language Model) architecture. It provides an OpenAI-compatible API format, making integration straightforward. Both domestic (China) and international endpoints are available.
Models
glm-4glm-4-airglm-4-flashglm-4vglm-3-turboKey Features
Resources
Domestic (China)
https://open.bigmodel.cn/api/paas/v4/International (Global)
https://api.z.ai/api/paas/v4/Authorization: Bearer {api_key}headerIntegration Notes
Since Zhipu AI provides an OpenAI-compatible API, the existing OpenAI provider implementation could potentially be reused with the following adjustments:
base_urlpointing to the domestic (open.bigmodel.cn) or international (api.z.ai) endpointChecklist