--- id: zhipuai version: "2.1.5.20250825" license: unclear license_treatment: unclear maintenance: aging --- # zhipuai — A SDK library for accessing big model apis from ZhipuAI License: unclear · Maintenance: aging · Downloads: 342.9K/mo ## What it is and what it does This is the official Python SDK for ZhipuAI's large model API platform. It wraps HTTP calls to ZhipuAI's endpoints (chat completions, multimodal models, video generation, and assistants) behind a typed Python client interface. The SDK handles authentication via API keys, supports both standard and streaming responses, and includes connection pooling and token caching. Developers use it to integrate ZhipuAI's models (like glm-4 and charglm-3) into Python applications without writing raw HTTP requests. It supports chat completions with tools, multimodal input (text and images), video generation, and character role-playing modes. The package requires Python 3.8+ and depends on httpx for HTTP transport and pydantic for request/response validation. Use it for: - Build a chatbot or conversational AI system using glm-4 or charglm-3 models with streaming responses. - Integrate multimodal capabilities (text + image analysis) into an application via glm-4v. - Generate videos from text prompts using the cogvideox-2 model for content creation workflows. - Implement an assistant-based system with custom knowledge or tools via the assistant endpoint. - Add web search or tool-calling capabilities to chat completions for real-time information retrieval. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Official Python SDK for ZhipuAI's large model APIs, providing type-safe client methods to call chat completions, multimodal models, video generation, and assistant endpoints. Yes, if you are actively using ZhipuAI's APIs and need a typed Python client. The SDK is straightforward to install and use, with low dependency friction. However, the aging maintenance status (354 days since last release, no recent commits tracked) and unclear license are concerns—verify the license for your use case and monitor for upstream API changes that the SDK may not immediately reflect. ## Install pip install zhipuai uv add zhipuai poetry add zhipuai ## Installing zhipuai Before you install: Low install friction with five common dependencies (httpx, pydantic, cachetools, pyjwt, pydantic-core). Maintenance status is aging—no recent commits tracked and last release was 354 days ago, so expect slower response to issues or breaking upstream changes. License in practice: License treatment 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 commercial projects. Quickstart: pip install zhipuai from zhipuai import ZhipuAI client = ZhipuAI(api_key="your-api-key") response = client.chat.completions.create( model="glm-4", messages=[{"role": "user", "content": "Hello"}] ) print(response.choices[0].message.content) Requires a valid ZhipuAI API key; set via api_key parameter or ZHIPUAI_API_KEY environment variable. Verify before relying: - Whether the unclear license permits commercial or proprietary use without restriction. - Current maintenance status and responsiveness to bug reports or security issues. - Whether typing-extensions is truly optional or required despite not appearing in the runtime deps list. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 342.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags zhipuai api client, glm-4 python sdk, large language model api wrapper, chat completion client, multimodal ai api, streaming llm responses, zhipu bigmodel sdk, llm-client, api-wrapper, streaming [View on SkillFed](https://skillfed.io/packages/zhipuai) · [View on PyPI](https://pypi.org/project/zhipuai/)