diff --git a/skills/ai-providers/z-ai.md b/skills/ai-providers/z-ai.md index acf8402..41de751 100644 --- a/skills/ai-providers/z-ai.md +++ b/skills/ai-providers/z-ai.md @@ -11,14 +11,14 @@ Fallback AI provider with GLM (General Language Model) support. Use when synthet ## Configuration ```yaml -provider: z.ai -base_url: https://api.z.ai/v1 +provider: z.ai (Zhipu AI / BigModel) +base_url: https://open.bigmodel.cn/api/paas/v4 api_key_env: Z_AI_API_KEY compatibility: openai rate_limit: 60 requests/minute ``` -**Note:** API key needs to be configured. Check z.ai dashboard for key generation. +**API Key configured:** `Z_AI_API_KEY` in environment variables. ## Available Models @@ -152,7 +152,7 @@ function shouldPreferGLM(task) { ```json { "method": "POST", - "url": "https://api.z.ai/v1/chat/completions", + "url": "https://open.bigmodel.cn/api/paas/v4/chat/completions", "headers": { "Authorization": "Bearer {{ $env.Z_AI_API_KEY }}", "Content-Type": "application/json" @@ -182,7 +182,7 @@ async function callZAI(systemPrompt, userPrompt, options = {}) { const response = await $http.request({ method: 'POST', - url: 'https://api.z.ai/v1/chat/completions', + url: 'https://open.bigmodel.cn/api/paas/v4/chat/completions', headers: { 'Authorization': `Bearer ${$env.Z_AI_API_KEY}`, 'Content-Type': 'application/json' @@ -231,7 +231,7 @@ Z_AI_API_KEY=your_key_here ### 3. Test Connection ```bash -curl -X POST https://api.z.ai/v1/chat/completions \ +curl -X POST https://open.bigmodel.cn/api/paas/v4/chat/completions \ -H "Authorization: Bearer $Z_AI_API_KEY" \ -H "Content-Type: application/json" \ -d '{