zai-sdk
A SDK library for accessing big model apis from Z.ai
Decision gist · record as of 2026-08-14
Yes, if you are actively using Z.ai's platform. The SDK is actively maintained, has low install friction, and provides a clean Python interface to Z.ai's APIs. However, verify the license terms before use in proprietary projects, since the license status is currently unclear in the package metadata.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid Z.ai API key; obtain from https://docs.z.ai/ (overseas) or https://www.bigmodel.cn/ (mainland China).
- Low install friction with a pure-Python wheel distribution.
- Active maintenance status with recent releases.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before using in proprietary or restricted contexts.
last release 2026-06-16 (59 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 119,579 downloads/mo, #12,064 on PyPI
Alternatives
Verify before relying
pip install zai-sdk
from zai import ZaiClient
client = ZaiClient(api_key="your-api-key")
response = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)- Actual license terms and restrictions—metadata shows no SPDX or raw license field
- Whether all advertised features (video generation, audio transcription, web search) are available in all API tiers
- Rate limits and quota policies for different model endpoints
What it is and what it does
The zai-sdk is the official Python client library for Z.ai's large model open platform. It wraps Z.ai's REST APIs into a Python interface, letting developers call chat models, generate embeddings, create videos from text or images, transcribe audio, and manage conversations without building HTTP requests manually. The SDK handles authentication via API keys, supports both synchronous and asynchronous operations, and includes streaming for real-time responses.
The package is built on httpx for HTTP transport, pydantic for request/response validation, and standard utilities like cachetools and pyjwt. It targets Python 3.8 and later across Windows, macOS, and Linux. Typical use cases include integrating Z.ai's GLM models into chatbots, building multimodal applications that process images, and batch-processing embeddings or video generation requests.
Use it for
- Build a chatbot or conversational AI using Z.ai's GLM models with streaming responses.
- Generate vector embeddings for text data to power semantic search or similarity matching.
- Create videos programmatically from text prompts or images using the video generation API.
- Transcribe audio files to text using Z.ai's speech recognition capabilities.
- Implement tool-calling workflows where the model can invoke functions or web search during conversations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are actively using Z.ai's platform.
The SDK is actively maintained, has low install friction, and provides a clean Python interface to Z.ai's APIs. However, verify the license terms before use in proprietary projects, since the license status is currently unclear in the package metadata.
Install
zai-sdk on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance status with recent releases. Standard dependencies (httpx, pydantic, cachetools, pyjwt) are well-established.
Requires a valid Z.ai API key; obtain from https://docs.z.ai/ (overseas) or https://www.bigmodel.cn/ (mainland China).
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before using in proprietary or restricted contexts.
Quickstart
pip install zai-sdk
from zai import ZaiClient
client = ZaiClient(api_key="your-api-key")
response = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)
Verify before relying
- Actual license terms and restrictions—metadata shows no SPDX or raw license field
- Whether all advertised features (video generation, audio transcription, web search) are available in all API tiers
- Rate limits and quota policies for different model endpoints
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release !=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagescachetoolshttpxpydanticpydantic-corepyjwtsniffio |
| Maintenance | Actively maintained 59 days since the last release |
| First released | |
| Downloads | 119,579 / month, #12,064 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: zai_sdk-0.2.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “z.ai api client”
- zai-sdkOfficial Python SDK for Z.ai's large model APIs, providing access to…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also dashscope · zhipuai · ai21 · gigachat · foundry-local-sdk · vlmrun · qianfan · honcho-ai · mistralai · elevenlabs