> See the full index of documentation pages at https://docs.zettabyte.com/llms.txt.

# Connect an app or tool to zSTUDIO

> zSTUDIO's model API gives you a choice of models through one API, and you pay per token. If an app or tool has a custom endpoint setting for connecting to another model API, it can connect to zSTUDIO with three values: the base URL, a zSTUDIO API key and a model ID.

Source: https://docs.zettabyte.com/docs/maas/connect-an-app-or-tool

Last updated: 2026-10-10

The tool usually asks for each of them. Once connected, the tool sends chat requests to zSTUDIO's API, which returns the reply of the model named in each request.

That setting is often labelled "OpenAI" or "OpenAI-compatible": that names the request format the tool sends, not OpenAI's service. The requests go to the zSTUDIO address you enter in the setting (why zSTUDIO uses this format, on the [zSTUDIO API overview](https://docs.zettabyte.com/docs/maas/overview)).

## Before you begin

Have these two things ready before you open the tool's settings:

- A zSTUDIO API key. Create one on the console's [**API Keys** page](https://app.zettabytecloud.com/API-key/list) with **Create API Keys**. The key is shown once, so copy it when it appears. For more on keys, see [API keys](https://docs.zettabyte.com/docs/inference-api/api-keys). If **Create API Keys** isn't on the API Keys page, a key can't be created from that view.
- Credit on the account. A call from an account without credit returns `403`. To see where credit is shown, see [403 in zSTUDIO API errors](https://docs.zettabyte.com/docs/maas/errors).

## Connect your app or tool

Fill in the tool's custom endpoint setting in this order, then send one message to confirm the connection.

1. Choose a model ID from [zSTUDIO models and model IDs](https://docs.zettabyte.com/docs/maas/models), or in the console, use the workspace switcher to change from **zCLOUD · AI Infrastructure Rental** to **MaaS via API**, then open **Model Market** and choose a model. On the model's **API & endpoint** tab, copy the `model` value: that is the model ID. Step 2 of [Quickstart: call zSTUDIO with the OpenAI SDK](https://docs.zettabyte.com/docs/maas/quickstart) walks the same path.
2. Open the tool's custom endpoint setting and, if it asks which format or protocol to use, choose OpenAI Chat Completions: the address and steps here are for that format.
3. If the address field asks for a base URL, enter `https://app.zettabytecloud.com/inference/v1`, and the tool adds `/chat/completions` itself; if it asks for the full chat endpoint instead, enter `https://app.zettabytecloud.com/inference/v1/chat/completions`. Enter the address from this step rather than the one in the model's **API Access** field, which shows it without `/v1` (for what the base URL is, see [zSTUDIO API overview](https://docs.zettabyte.com/docs/maas/overview)).
4. Paste your API key into the tool's API key field. Anyone who can open the tool's settings can use a key saved there, so decide who may open them (see Authentication in the zSTUDIO API overview).
5. Enter the model ID from step 1 in the tool's model field, exactly as copied.
6. Send one short message to confirm the connection. Do this even if the tool's connection check has passed: a check can pass on an address that doesn't return replies (see [If it doesn't work](https://docs.zettabyte.com/docs/maas/connect-an-app-or-tool#if-it-doesn-t-work)).

## If it doesn't work

Start from what came back after your message: a web page, a status, or an error with no status.

If a message gets a web page back instead of a reply, or a connection check passes while messages bring back no reply, the address is missing `/v1`. Check that the base URL field ends in `/v1`. See the web page response in [zSTUDIO API errors](https://docs.zettabyte.com/docs/maas/errors).

If you get a `404` with `Invalid URL`, the message names the path the API received. If `/chat/completions` or `/v1` appears twice in that path, the address field and the tool both added that part. Remove it from the address field so the path appears once.

If a message fails and the tool shows a status, the status names the field to check:

| Status | Field to check | Likely cause |
| --- | --- | --- |
| `401` | The API key field | The key is wrong or missing |
| `403` | The account's credit | No credit on the account |
| `503` | The model field, against the ID you copied | An unknown model ID |
| `404` with `Invalid URL` | The address field | `/v1` or `/chat/completions` twice in the path |

Each status has its own section in zSTUDIO API errors.

If the tool shows a general error without a status, check the three values against [Connect your app or tool](https://docs.zettabyte.com/docs/maas/connect-an-app-or-tool#connect-your-app-or-tool), then the tool's own log if it has one.

## Next steps

Where to go from a working connection:

- [zSTUDIO API errors](https://docs.zettabyte.com/docs/maas/errors): when a message fails and you want the cause and fix for its status.
- [Quickstart: call zSTUDIO with the OpenAI SDK](https://docs.zettabyte.com/docs/maas/quickstart): to make the same call from code.
