jrajasekera/jr-agent-skills/z-ai-api
Claude Code and agent skill by jrajasekera/jr-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Z.ai API integration for building applications with GLM models. Use when working with Z.ai/ZhipuAI APIs for: (1) Chat completions with GLM-4.7/4.6/4.5 models, (2) Vision/multimodal tasks with GLM-4.6V, (3) Image generation with GLM-Image or CogView-4, (4) Video generation with CogVideoX-3 or Vidu models, (5) Audio transcription with GLM-ASR-2512, (6) Function calling and tool use, (7) Web search integration, (8) Translation, slide/poster generation agents. Triggers: Z.ai, ZhipuAI, GLM, BigModel…
Install
npx vskill@latest install jrajasekera/jr-agent-skills/z-ai-apiSKILL.md
The same SKILL.md was published earlier as jrajasekera/jr-agent-skills/z-ai-api.
Z.ai API Skill
Quick Reference
Base URL: https://api.z.ai/api/paas/v4 Coding Plan URL: https://api.z.ai/api/coding/paas/v4 Auth: Authorization: Bearer YOUR_API_KEY
Core Endpoints
| Endpoint | Purpose | |
|---|---|---|
/chat/completions | Text/vision chat | |
/images/generations | Image generation | |
/videos/generations | Video generation (async) | |
/audio/transcriptions | Speech-to-text | |
/web_search | Web search | |
/async-result/{id} | Poll async tasks | |
/v1/agents | Translation, slides, effects |
Model Selection
Chat (pick by need):
glm-4.7— Latest flagship, best quality, agentic codingglm-4.7-flash— Fast, high qualityglm-4.6— Reliable general useglm-4.5-flash— Fastest, lower cost
Vision:
glm-4.6v— Best multimodal (images, video, files)glm-4.6v-flash— Fast vision
Media:
glm-image— High-quality images (HD, ~20s)cogview-4-250304— Fast images (~5-10s)cogvideox-3— Video, up to 4K, 5-10sviduq1-text/image— Vidu video generation
Implementation Patterns
Basic Chat
OpenAI SDK Compatibility
Streaming
Function Calling
Vision (Images/Video/Files)
Image Generation
Video Generation (Async)
Web Search Integration
Thinking Mode (Chain-of-Thought)
Key Parameters
| Parameter | Values | Notes | |
|---|---|---|---|
temperature | 0.0-1.0 | GLM-4.7: 1.0, GLM-4.5: 0.6 default | |
top_p | 0.01-1.0 | Default ~0.95 | |
max_tokens | varies | GLM-4.7: 128K, GLM-4.5: 96K max | |
stream | bool | Enable SSE streaming | |
response_format | {"type": "json_object"} | Force JSON output |
Error Handling
- 429: Rate limited — implement exponential backoff
- 401: Bad API key — verify credentials
- sensitive: Content filtered — modify input
Reference Files
For detailed API specifications, consult:
references/chat-completions.md— Full chat API, parameters, modelsreferences/tools-and-functions.md— Function calling, web search, retrievalreferences/media-generation.md— Image, video, audio APIsreferences/agents.md— Translation, slides, effects agentsreferences/error-codes.md— Error handling, rate limits
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/z-ai-api/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jrajasekera/jr-agent-skills/z-ai-api)