> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API key management

> Create model API credentials, set scope and limits, configure mapping and fallback, and safely disable, replace, or delete keys.

API keys authenticate model requests. Create separate keys for different applications or purposes so you can track usage and disable access individually.

<h2 id="create-key">
  Create a key
</h2>

1. Open **API keys** in the console and confirm the account and workspace.
2. Create a key with a recognizable name.
3. Set the model scope, allowance, and expiration as needed, then save.
4. Copy the key into an environment variable or secret manager and follow the [quickstart](/en/quick-start).

If the creation dialog says the full key is shown only once, store it before closing. Keep full keys out of frontend code, public repositories, and support tickets.

<h2 id="advanced-settings">
  Advanced settings
</h2>

| Goal | Feature |
| - | - |
| Keep the model name in your application while calling another model | [Model mapping](/en/api/Model-Mapping-Fallback) |
| Use a backup model when fallback conditions are met | [Error fallback](/en/api/Model-Mapping-Fallback) |
| Repair supported JSON formatting errors in structured output | [Structured output repair](/en/api/structured-output-repair) |

After saving, verify the configuration with a real request. Settings do not add input, output, or tool capabilities that the target model lacks.

<h2 id="manage-key">
  Disable, replace, or delete
</h2>

* **Disable**: Temporarily stop requests with that key. Check validity and expiration before re-enabling it.
* **Replace**: Create a new key, update your application, verify requests, and then disable the old one.
* **Delete**: Confirm that affected applications have switched credentials before completing deletion.

Enterprise workspaces offer [member and system keys](/en/enterprise/keys). See that guide for ownership, permissions, and expiration rules.

<h2 id="troubleshooting">
  If requests are restricted
</h2>

Check the key's status, expiration, model scope, remaining allowance, and account balance. Enterprise requests also follow [workspace budgets](/en/enterprise/budgets). Review the error and Tid in [request logs](/en/console/request-logs) instead of repeatedly retrying an invalid credential.

To manage account resources, use a [management key](/en/platform/management-keys).

Last updated: 2026-10-13


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.