Creating and Managing API Keys
Create an API Key, select available models, set rate and usage limits, and review usage and logs.
This guide explains how to create and manage an API Key in UnieAI Studio. Every section follows the on-screen workflow and requires no programming.
Open the API Keys Page
Personal and organization API Keys are managed separately. A key created in one workspace will not appear after switching to another workspace.
Understand the Page
The list shows the following for each API Key:
- Name and partially hidden key
- Status, such as Active, Disabled, Shared, or Protected
- Any configured rate or usage limits
- Expiration time
- Available management actions
Create, edit, regenerate, disable, and delete actions appear only when you have management permission.
Create an API Key
Open the Creation Dialog
On API Keys, select Create Key in the upper-right corner.
Enter a Name and Expiration
| Field | Required | What to enter |
|---|---|---|
| Key Name | Yes | Use letters, numbers, underscores, or hyphens; up to 30 characters. Example: support-chat-prod |
| Expiration | No | Choose the date and time when the key should stop working; leave blank for no expiration |
Create separate keys for different users, projects, or environments instead of sharing one key across multiple purposes.
Select Available Models
- Expand Model Access.
- Search for a model by name.
- Select the base models or CMs that this API Key may use.
- Review the selected model count.
Selecting no models means that no additional model restriction is applied. If the key is intended for one CM, select only that CM.
Set Rate and Usage Limits (Optional)
Expand Rate Limits & Quota. Leave any limit you do not need blank.
Requests per Second
Enter the maximum number in Maximum Requests per Second to prevent excessive use over a short period. Leave it blank for no per-second limit.
Token Quota
- Enter the available amount in Total tokens.
- Enter the reset time in Recovery Time (minutes). The minimum is 1 minute.
- Set Total tokens before entering a recovery time.
Period Limits
Expand Per Minute, Per Hour, Daily, Weekly, or Monthly and configure any applicable fields:
| Field | Purpose |
|---|---|
| Maximum Requests | Limits request count during the period |
| Maximum Tokens | Limits Token usage during the period |
| Maximum Images | Limits images processed during the period |
| Maximum Audio Seconds | Limits audio duration processed during the period |
| Maximum Cost (USD) | Limits spending during the period; minimum 0.01 with up to two decimal places |
Multiple periods can be configured on the same key. When any limit is exhausted, the key must wait for that period to reset before continuing.
Generate and Copy the API Key
- Review the name, models, and limits.
- Select Generate.
- In the API Key secret dialog, select Copy Secret.
- Store the key securely or provide it to the designated application administrator.
Do not put a complete API Key in public documents, messages, screenshots, or version control.
Edit Models, Rates, and Quotas
Edit Limits does not replace the API Key. Chat and other connected applications can continue using the existing key.
Review Usage and Logs
Basic Information
The panel shows the key status, last-used time, creation time, and expiration. An empty last-used value usually means the key has no usage records yet.
Usage Summary
| Item | Description |
|---|---|
| Requests | Number of recorded uses |
| Tokens | Total Token usage |
| Average Tokens | Average Tokens per use |
| Spend | Total recorded cost |
Remaining Quota
When period limits are configured, the panel shows the used amount, configured maximum, remaining amount, and progress for each applicable period. If usage is close to a limit, verify that it is expected before increasing the limit, waiting for a reset, or disabling the key.
Recent Usage Logs
Each record shows:
- Model used
- Usage time
- Status
- Token usage
- Cost for that record
- Request reference information for administrators
Up to 20 records appear per page. Use the page numbers and previous or next buttons to view additional records.
This panel is for reviewing the key's time, model, status, and usage. It does not show the user's complete conversation content.
Copy an Existing API Key
If Copy Secret appears beside a key:
- Find the API Key.
- Select Copy Secret.
- Paste it directly into the intended settings page or give it to the designated administrator.
If the button does not appear, confirm your management permission. Use Regenerate Secret when the key must be replaced.
Regenerate a Secret
Use regeneration when a key may have been exposed, during a handover, or as part of regular key rotation.
The old key stops working immediately after regeneration. Identify every place that must be updated before continuing.
Enable or Disable a Key
- Temporarily stop a key with ⋯ → Disable.
- Restore it with ⋯ → Enable.
- Disabling a key preserves its name, limits, and usage records.
- Before enabling it again, check its expiration and remaining quota.
Delete an API Key
Deletion cannot be undone. Use Disable if the key should only be stopped temporarily.
Default Keys
Keys marked Default and Protected are provided by the platform. They:
- Allow usage details to be viewed
- Can be regenerated when necessary
- Cannot be disabled or deleted
- Do not allow model, rate, or quota limits to be edited
For Chat or another application, create a separate standard API Key with a clear name and appropriate restrictions.
Permissions
| User | Available actions |
|---|---|
| Key owner in personal space | Create, view, edit, regenerate, enable, disable, and delete their keys |
| Organization Creator or Collaborator | Create and manage organization API Keys |
| Organization User | View organization keys and usage but cannot edit or delete them |
| Platform administrator | Manage organization API Keys within their administrative scope |
| Pending user | Cannot create a personal API Key |
If an action is missing, check the current workspace and your permissions.
Recommended Workflow
- Create separate keys for different projects, environments, and integrations.
- Select only the models needed for that purpose.
- Start with lower limits and adjust them after reviewing usage.
- Review recent usage and remaining quota regularly.
- Disable an unused key before deleting it.
- If exposure is suspected, regenerate the key immediately and update every place that uses it.
Common Questions
Guardrail Rules and Intercepts
Use an LLM judge to inspect custom-model inputs and outputs, configure refusal behavior, and review blocks and misfires.
API Compatibility
Use the OpenAI, Responses, and Anthropic-compatible Runtime endpoints and understand UnieAI extensions, streaming metadata, and upstream differences.