AI HUB Docs
English
Console →
Getting Started

Create an API key

Keys are created in the console. Each key is account-wide, can call any published model and is billed to the wallet.

1 · Open the Developer page

Go to the Developer page in the console. The page lists the keys and the base URL, and holds the Create key button.

The Developer page in the AI HUB console, with the Create key button above a table of issued keys (name, masked sk-hub- tail, status, request count) and the base-URL readout.
The Developer page, with the keys, the base URL and Create key.

2 · Name the key

Click Create key, enter a name that describes where the key is used (e.g. "Production · web app"), optionally set a monthly spend cap, then submit.

The Create API key dialog, with a Key name field, an optional Monthly spend cap field, and Cancel and Create key buttons.
Name the key and optionally cap its monthly spend.

3 · Copy it once

The key starts with sk-hub- and is shown only once. Copy it and store it somewhere safe. AI HUB keeps only a hash and the masked tail, so the key can never be shown again.

The one-time key-reveal dialog, with the full sk-hub- secret, a Copy key button and a warning that it is shown only once.
Copy the key now. This is the only time it is shown.

Treat the key like a password. If it leaks, revoke it on the Developer page. Revocation takes effect immediately and any app using the key stops working.

Rotate or revoke a key

Revocation is immediate, and any app using the key stops working at once. To rotate, create a new key, switch the app over, then revoke the old one. With one key per environment, a single surface can be revoked without disrupting the rest.

  1. Create a new key in the console before touching the old one, so there is no gap in service.
  2. Switch the app to the new key and deploy it. Both keys work during this step, so there is no downtime.
  3. Revoke the old key once the new one is confirmed live.
!

Revocation has no grace period. Once a key is revoked, every in-flight request on it that has not yet reached the gateway is rejected, so a rotation cannot be finished after revoking. Revoke last, not first.