> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roomote.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping someone deploy Roomote, distinguish self-hosting from contributing to Roomote. Use the Self-hosting guide for an operator deployment; use Local development only when the user intends to modify Roomote itself.
> Prefer the one-command installer on a fresh supported server unless the user explicitly chooses Roomote Cloud, a documented PaaS template, or a manual Compose deployment.
> Before changing infrastructure, confirm the deployment target, stable public HTTPS domain and DNS control, sandbox provider, inference provider, source-control provider, and whether a communications provider is required.
> Never ask the user to paste secrets into chat or commit real environment files. Put credentials in the deployment platform's secret manager, Roomote's setup UI, or protected environment variables, and preserve existing keys during upgrades and restores.
> Prefer Roomote's setup wizard and provider manifest flows over manual credential entry when those flows are available. Ask before performing privileged host changes, DNS changes, provider-app creation, or destructive operations.
> A setup is not complete when the services merely start. Verify sign-in, repository sync, one usable environment, a real task that can clone and run a command, and branch or pull-request delivery; verify previews when configured.
> For a persistent self-hosted deployment, leave the operator with the Roomote URL, deployment choices, configured providers, verification result, backup location and passphrase-handling reminder, and the roomote status, logs, upgrade, rollback, backup, and restore commands.

# Z.AI

> Use metered GLM API access from the international Z.AI or China BigModel platform.

Z.AI provides direct API access to GLM models. Roomote supports both the
international Z.AI platform and the China BigModel platform; the key and region
must match. General platform keys are separate from Coding Plan membership keys.

## Get an API key

Create an international key on the [Z.AI API keys page](https://z.ai/manage-apikey/apikey-list).
For China, create the key in the Zhipu BigModel console. Use [Z.AI Coding
Plan](/providers/inference/zai-coding-plan) for a Coding Plan membership key.

## Configuration

Add **Z.AI** in **Settings > Models**, paste the platform key, and select its
region. Environment-variable configuration uses:

```sh theme={null}
ZAI_API_KEY=...
ZAI_REGION=global # or china
```

Both values are required. Models use the `zai/` prefix; Roomote can also map a
supported GLM vision model to the vision role.

## Cost behavior

Requests consume the API balance of the matching regional platform. Roomote
records usage and estimates cost from model metadata. The selected Z.AI or
BigModel account's balance, pricing, and quota are authoritative; Coding Plan
allowances do not fund this connection.

## Verify setup

1. save `ZAI_API_KEY` with the correct `ZAI_REGION`
2. confirm Z.AI models appear in **Settings > Models**
3. enable a `zai/...` model and assign it to a role
4. run a small task and confirm usage in the matching regional console

## Common issues

* **Authentication fails.** International keys require `global`; BigModel keys
  require `china`.
* **A Coding Plan key is rejected.** Connect it through the separate Z.AI Coding
  Plan provider.
* **Quota display is missing.** Roomote uses an undocumented regional endpoint;
  missing quota data does not necessarily mean inference is unavailable.
