docs/zai.md
z.ai is API-token based. No browser cookies.
~/.codexbar/config.json → providers[].apiKey).Z_AI_API_KEY.~/.codexbar/config.jsonGET https://api.z.ai/api/monitor/usage/quota/limithttps://open.bigmodel.cnZ_AI_API_HOST=open.bigmodel.cn.Z_AI_QUOTA_URL=https://open.bigmodel.cn/api/coding/paas/v4.authorization: Bearer <token>accept: application/jsondata.limits[] → each limit entry.data.planName (or plan, plan_type, packageName) → plan label.TOKENS_LIMIT → primary (tokens window).TIME_LIMIT → secondary (MCP/time window) if tokens also present.nextResetTime (epoch ms) → date.usageDetails[] per model (MCP usage list).Sources/CodexBarCore/Providers/Zai/ZaiUsageStats.swiftSources/CodexBarCore/Providers/Zai/ZaiSettingsReader.swiftSources/CodexBar/ZaiTokenStore.swift (legacy migration helper)