GLM

GLM API Guide: API Keys, Endpoints, and a First Request

Choose standard API access deliberately

Z.ai’s standard quick start shows the OpenAI-compatible base URL https://api.z.ai/api/paas/v4/ and a glm-5.3 request. Its Coding Plan setup uses separate keys and route instructions. The example below targets the standard API route, as checked on November 5, 2026.

Sources: Z.ai: API Quick Start, Z.ai: Coding Plan Quick Start

Official Z.ai documentation card labeled GLM-5.3
Official artwork identifies this model only; it is not an app screenshot, a price table, or evidence of Orlino access. Source: Z.ai. Official source ↗

Prepare a minimal local environment

Create the appropriate standard key using the provider’s official management page. Supply it to your process as ZAI_API_KEY through a secure local mechanism. Do not paste a real key into the request example, a public repository, or a browser application.

Use a short generic prompt for the first call. Avoid adding tool definitions, attachments, or a long conversation until the basic connection has been verified. This keeps the number of possible failure causes small. Use the GLM model-family guide to identify the release and input requirements before choosing a request model.

Send a first request

This illustrative request follows the standard quick-start shape and is not executed for this article. Check your account’s model access before running it. A real request may incur provider charges.

Sources: Z.ai: API Quick Start

Illustrative request; not executed.

curl --fail-with-body https://api.z.ai/api/paas/v4/chat/completions \
  -H "Authorization: Bearer $ZAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.3","messages":[{"role":"user","content":"Reply with one short greeting."}],"stream":false}'

Check authentication before debugging the prompt

For a failed call, save the status and redacted response. Confirm that the configured key belongs to the same product and account as the route. An authentication or entitlement error is not evidence that the natural-language prompt is too complex.

Next compare the URL, request fields, and model identifier with the current quick start. If the integration is a supported Coding Plan tool, return to that tool’s instructions rather than repeatedly changing the standard API example. The GLM Coding Plan guide explains why keys and routes for that product cannot simply be substituted into a standard integration.

Verify a response and one failure path

For a fictional acceptance check, require a successful response with a readable answer and valid JSON structure for your client parser. Record the observed usage if available. Do not publish a made-up response as if this request was run.

Also inspect how your application handles an unavailable response or a network timeout. Use a controlled local test where possible rather than intentionally generating repeated paid failures. Preserve clear error messages without exposing credentials.

Expand only after you know what worked

Once the basic path works, introduce one feature at a time: longer instructions, streaming, or a documented integration. Confirm support in the reference for the exact model and client instead of assuming every OpenAI-compatible field behaves identically.

Document your chosen key type, route, model, response handling, and observed result. If you use GLM through Orlino, verify that route independently; configuring the provider’s API does not configure Orlino or establish its supported models. Once connectivity works, the GLM vs Claude coding comparison provides a task-based way to evaluate the configured workflow.

Frequently asked questions

Why can a valid key still fail?

It may belong to a different product, account, or route, or lack access to the requested model. Inspect the redacted provider error and configuration.

Does this example prove that GLM is available in Orlino?

No. It describes the provider’s standard API. Orlino access requires separate confirmation.

Sources

Provider information is separate from Orlino account access and plan terms.