JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 532
  • Score
    100M100P100Q98825F
  • License MIT

Z.ai GLM Coding Plan provider for Apicity — standalone, OpenAI-compatible chat completions plus coding-plan usage/quota monitoring.

Package Exports

  • @apicity/zaicoding
  • @apicity/zaicoding/zod

Readme

@apicity/zaicoding

npm dependencies TypeScript

Z.ai GLM Coding Plan provider for Apicity — standalone, OpenAI-compatible chat completions plus coding-plan usage/quota monitoring.

Runtime dependencies:

  • zod@^4.4.3 — request schemas attached to every POST endpoint as .schema

Installation

npm install @apicity/zaicoding
# or
pnpm add @apicity/zaicoding

Quick Start

import { createZaiCoding } from "@apicity/zaicoding";

const zaicoding = createZaiCoding({ apiKey: process.env.ZAI_CODING_PLAN_API_KEY! });

API Reference

4 endpoints across 2 groups. Each method mirrors an upstream URL path.

coding

POST zaicoding.api.coding.paas.v4.chat.completions

POST https://api.z.ai/api/coding/paas/v4/chat/completions

Upstream docs ↗

const res = await zaicoding.api.coding.paas.v4.chat.completions({ /* ... */ });

Source: packages/provider/zaicoding/src/zaicoding.ts

monitor

GET zaicoding.api.monitor.usage.modelUsage

GET https://api.z.ai/api/monitor/usage/model-usage

Upstream docs ↗

const res = await zaicoding.api.monitor.usage.modelUsage({ /* ... */ });

Source: packages/provider/zaicoding/src/zaicoding.ts

GET zaicoding.api.monitor.usage.quota.limit

GET https://api.z.ai/api/monitor/usage/quota/limit

Upstream docs ↗

const res = await zaicoding.api.monitor.usage.quota.limit({ /* ... */ });

Source: packages/provider/zaicoding/src/zaicoding.ts

GET zaicoding.api.monitor.usage.toolUsage

GET https://api.z.ai/api/monitor/usage/tool-usage

Upstream docs ↗

const res = await zaicoding.api.monitor.usage.toolUsage({ /* ... */ });

Source: packages/provider/zaicoding/src/zaicoding.ts

Part of the apicity monorepo.

License

MIT — see LICENSE.