Z.AI provides hosted language models through a REST API for chat completions.

API

What your agent can do

  • Create a chat completion model that generates AI replies for given conversation messages.

    Via API.

Tasks depend on the interface and permissions.

Connection methods

Choose a route that fits your agent.

API connection
API path
https://api.z.ai/api/paas/v4/chat/completions

Authentication
Authorization: Bearer YOUR_API_KEY

Documentation & experience

  • 1 connection path
View sources and checks
How documentation is checked