# Get an API key: Z.ai

> Z.ai has no server-side environment variable in Big-AGI, so this key always lives in your browser - one endpoint, one balance, one limit.

- Canonical: https://big-agi.com/docs/connect-zai
- Minimum tier: open  [Open ⊂ Free ⊂ Pro - a tier only ever ADDS to the Open baseline]
- Kind: provider · Last content update generation: 2026-07-27 · Review by: 2026-10-27
- Answers: Where do I create a Z.ai API key? · How do I add credit? · Does Direct Connection work with Z.ai?

Big-AGI carries no server-side environment variable for Z.ai. The key always lives in your browser, on every deployment ([keep your key safe](/docs/key-storage)).

## One key, one endpoint

The account is [registered on the model platform](https://z.ai/model-api) and funded by top-up; the quickstart's own instruction is to *"Access Billing Page to top up if needed"*. A funded balance is the prerequisite for a first answer. Nothing bills past what you topped up. Z.ai documents a single endpoint, and Big-AGI defaults to it.

## Creating it

1. Open [z.ai/manage-apikey/apikey-list](https://z.ai/manage-apikey/apikey-list), the page the app links.
2. Create the key ([quickstart](https://docs.z.ai/guides/overview/quick-start)).
3. Copy it while it is displayed.

## Entering it in Big-AGI

Open **Models** (`Ctrl + Shift + M`) and press **More Services** if the **Setup AI Models** wizard appears. Then **Add** -> **Z.ai**, paste into **Z.ai Key**, and press **Models** - the list filling in below is your confirmation ([add and manage your keys](/docs/connect-models)).

**Advanced** holds an **API Host** field for pointing at an alternative endpoint of the same API. Top up at [Billing](https://z.ai/manage-apikey/billing).

## Direct Connection

Direct Connection can be turned on once the key is in the browser, which here is always. It starts off.

> **Direct Connection works only with your API key stored in the browser**, and with an AI service that permits direct browser calls (CORS). Where it cannot be used, requests route through the Big-AGI fast edge servers instead - everything still works, within the standard upload size and time limits.

## Related

- [Connect an AI service](/docs/connect-models)
- [Keep your key safe](/docs/key-storage)
- [What your provider does with your text](/docs/privacy-data-flow)
