User Guide / API Keys

Key management

API keys are credentials for API calls. Each key can have its own permission scope and quota limit. Click “API Keys” in the left navigation.

Interface example

The list shows all created keys, including their names, status, used quota, remaining quota, expiration time, and other information.

Create a key

Basic key configuration

  1. On the key list page, click “Create API Key” in the upper-right corner to open the creation dialog.
  2. Enter a key name (name it by purpose, such as “Production” or “Testing”).
Interface example

Advanced key configuration options

Configure the following options as needed:

Configuration itemDescription
Expiration timeSet the validity period; leave blank or enter -1 for no expiration.
Key quota settingsLimit the maximum quota this key can consume; it becomes invalid automatically when the limit is exceeded.
Unlimited key quotaWhen enabled, the key has no quota limit (the account's total quota still applies).
Key model restrictionsRestrict the key to specified models; leave blank for no restrictions.
IP allowlistRestrict the source IP addresses allowed to use this key; leave blank for no restrictions.
Key groupSpecify the channel group used by this key.

Save the key

Click “Submit”. The key is masked by default; click copy if you need to view it.

The key grants full API access. Do not disclose it to others or commit it to a code repository.

Edit a key

Find the key in the list and click “Edit” on the right to modify its configuration options (the key itself cannot be changed).

Disable/enable a key

Find the key in the list; keys are enabled by default. Click “Disable” and confirm to immediately invalidate the key and suspend model calls.

Delete a key

Find the key in the list and click “Delete” on the right. After confirmation, the key becomes invalid immediately and cannot be recovered.