API Key Management
Create and manage API keys, supplier routing strategies, quotas and expiry, model limits and IP whitelists.
An API key is your credential for calling the API. Every request to /v1/... must include:
Authorization: Bearer sk-xxxxxxxxMenu location: General → API Keys in the left sidebar.
Creating a key
Click New at the top right of the list. The form has three sections: basic information, quota settings and advanced settings. Only the name is required — everything else works at its defaults.
Basic information
| Field | Description |
|---|---|
| Name | For identification. Name by "environment-workload", e.g. prod-order-service, local-dev |
| Supplier routing | Which route this key uses. Defaults to Smart routing → Smart automatic; see the next section |
| Expiration time | 1 hour / 1 day / 1 month / never, or a custom date. The key stops working after it |
| Quantity | Create several keys at once. Names are auto-numbered — useful for provisioning multiple colleagues or environments |
Quota settings
| Field | Description |
|---|---|
| Unlimited quota | On by default. The key has no cap of its own and can spend until the account balance runs out |
| Quota | Set after turning off unlimited — the spending cap for this key, in currency |
A key's quota is not a separate pot of money. Money always comes from the account balance. The quota is a limit — for example, giving a contractor a $5 key means they can spend at most $5 even if the account holds $500.
When a key exhausts its quota its status becomes Exhausted and calls are rejected; edit the key and raise the quota to restore it.
Advanced settings
| Field | Description |
|---|---|
| Model limits | Restrict the key to the selected models. Leave empty for no restriction |
| IP whitelist | Restrict which IPs may use the key. CIDR notation supported (e.g. 203.0.113.0/24). Empty means unrestricted |
| Image response format | Whether image endpoints return a URL or base64; see below |
| Image storage strategy | Whether upstream images are archived by the platform; see below |
After creation, copy and store the sk- key immediately.
A key carries spending authority over your account. Never commit it to a repository, embed it in frontend code, or paste it into group chats.
If you suspect a leak, delete the key from the list and create a new one — disabling only pauses a key, deleting is what truly revokes it.
Supplier routing
The same model is usually served by several upstream routes. The interface calls these suppliers. Supplier routing decides which route your request takes, which affects price, speed and success rate.
There are two modes.
Smart routing (default, recommended)
The platform automatically picks the best available supplier, with a circuit breaker — failing routes are dropped automatically, with no action from you.
You can express a preference:
| Strategy | Best for |
|---|---|
| Smart automatic (default) | Balances price, speed and success rate. Use this if unsure |
| Price first | Cost-sensitive batch and offline workloads |
| Speed first | Latency-sensitive interactive use such as live chat |
| Success rate first | Production paths where reliability outweighs speed |
You can also set ignored suppliers to exclude specific routes while letting the system choose among the rest.
Specify suppliers
Manually define a supplier call order. Requests try each in the order you set.
Combine this with the cross-supplier retry switch: when enabled, if every channel in the current supplier fails, the next supplier in order is tried; when disabled, only the first is used and failure returns an error.
Unless you have a specific routing requirement (for example a compliance rule about which region serves your traffic), keep smart routing. Pinning an order means you take on the availability risk when that route has problems.
Image settings
These two settings only apply to image-generation models.
Image response format:
| Option | Behaviour |
|---|---|
| Follow request or endpoint (default) | Determined by your request parameters or the endpoint |
| Force URL | Always return an image link |
| Force base64 | Always return base64, useful where issuing a second HTTP request to fetch the image is awkward |
Image storage strategy (available when the format is Force URL):
| Option | Behaviour |
|---|---|
| Default storage | Platform default handling |
| Store base64 only | Keep only the base64 data |
| Store URL and base64 | Keep both |
Raw upstream image URLs typically expire quickly. To retain generated results, store them yourself or see Bring Your Own Storage to archive them automatically to your own object storage.
Managing existing keys
Each row in the key list supports:
- View usage — cumulative spend and call count for that key;
- Edit — change any field above (the key value itself never changes);
- Disable / Enable — pause without altering configuration;
- Delete — permanent and irreversible.
Select multiple rows to disable or delete in bulk.
Key statuses
| Status | Meaning | How to restore |
|---|---|---|
| Enabled | Working normally | — |
| Disabled | Manually paused | Re-enable from the list |
| Expired | Past its expiration time | Edit and extend, or set to never expire |
| Exhausted | The key's own quota is used up | Edit and raise the quota, or switch to unlimited |
The platform emails you before a key expires (3 days ahead by default). You can turn these notifications off under Profile → Notifications.
Using keys in code
The platform is OpenAI-compatible; most SDKs need only two changes: base_url and api_key.
curl https://<your-site-domain>/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello"}]}'from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxx",
base_url="https://<your-site-domain>/v1",
)
resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.API_KEY,
baseURL: 'https://<your-site-domain>/v1',
})
const resp = await client.chat.completions.create({
model: 'gpt-5.5',
messages: [{ role: 'user', content: 'Hello' }],
})
console.log(resp.choices[0].message.content)The base URL is simply the site domain you are using — no api. prefix. See the API Reference for full parameters and additional endpoints.
Security practices
- One key per purpose — separate keys for production, testing and each colleague. When something goes wrong you can pinpoint and revoke precisely.
- Use environment variables — keys should never appear in source code, config files, frontend bundles or screenshots.
- Cap external keys — for contractors and trials, turn off unlimited quota and set an amount you can afford to lose.
- Lock down IPs where you can — for server-side calls, an IP whitelist is the cheapest protection against leaks.
- Review logs regularly — filter usage logs by key; an unusual spike is the earliest signal of a leak.