Skip to content

API Keys ​

API keys are the credentials applications use to call models through OneGateway. Create and manage your own keys on the API Keys page; the list shows only your keys.

The API URL at the top of the page is the address your application should target—click the icon on the right to copy it. Configure the API URL and API key according to the API format your application uses (OpenAI, Anthropic, and so on) to start calling; see Quickstart for full request examples.

Creating an API Key ​

Click Create API Key at the top right, fill in a name, and click OK. The name distinguishes purposes, such as "Chatbox key".

A key created this way has no quota limit, never expires, uses your group pricing, and can call all available models. To apply restrictions, expand Advanced settings:

FieldEffectWhen left empty
QuotaThe maximum this key can spendNo limit
Expiration timeThe key stops working after this timeNever expires
Group PricingDetermines the billing ratio for callsUses your group pricing
Available modelsRestricts which models this key can callAll available models

Which group pricing and models you can choose is configured by your administrator; see Available Models for what you can call.

When using a virtual model such as og-auto

A key with restricted available models is checked against the actual model after Intelligent Routing rewrites it. Selecting only the virtual model name does not work: add every target and backup model it may use to the available models, otherwise the request returns 403 and does not switch to a backup model. Ask your administrator which models it may use.

After creation, the key is masked on its card. Click the copy icon next to the key to get the full value and paste it into your application.

Managing Existing Keys ​

Each card is one API key.

Card itemDescription
Name and group pricingThe key's name and the group pricing it uses, shown as "Group Pricing - name"
QuotaShows "Unlimited" when no quota is set; otherwise Remaining Quota, used amount, and utilization
Status switchControls whether the key can make calls; after turning it off, confirm configuration sync and verify that requests using the old key are rejected
Available modelsShows "All models" when unrestricted
ExpirationThe expiry date or "Never Expires"; expired keys are flagged
KeyMasked; click the icon on the right to copy the full key

Three buttons at the top right of the card are for Edit, View usage, and Delete.

If a key may have leaked, switch it off first—don't delete it

Turn off the status switch first to retain the key's history, then confirm configuration sync and verify that calls are rejected. With semantic caching enabled, test both cache-hit and upstream request paths; see revocation checks. Delete only after confirming the key is no longer needed; deletion cannot be undone and affects applications using it.

Changing Restrictions ​

Click the card's edit button to open the detail page, make changes, then click Update at the top right.

AreaWhat you can change
Basic infoName and group pricing can be changed; department, user, status, key, and creation time are system-maintained
Quota and validityCheck Unlimited, or set a quota and an expiration time; shortcuts provide Never, 1 hour, 1 day, 1 month
Access restrictionsAdjust available models; in IP restrictions, enter one allowed address per line—leave empty for no restriction

After changing the group pricing or available models, make a call with the key and confirm in Request Logs that the model and cost match expectations.