Managing API keys
An API key is the credential used when calling endpoint APIs, external endpoint APIs, and the Neutree control plane API.
An API key inherits the creator’s permissions in the corresponding workspace. When a user calls the above APIs, the platform authenticates based on the permissions inherited by the API key, while also recording access logs and usage statistics based on the API key.
You can organize API keys by project. Projects are used only to group and manage API keys on the API key page. They do not change the key value, permissions, quotas, rate limits, callable models, or usage history of API keys. API keys for which no project is selected are displayed under Ungrouped.
Managing projects
Section titled “Managing projects”Projects are used to organize API keys created by the current user in the same workspace. Project names must be unique within the same workspace and current user scope, and are case-insensitive.
Creating a project
Section titled “Creating a project”-
Log in to the Neutree management interface. In the left navigation pane, click API key. On the right, select the target workspace, and then click Create Project.
-
Enter a Name.
-
(Optional) Enter a Description.
-
Click Create.
Editing a project
Section titled “Editing a project”-
Log in to the Neutree management interface. In the API key list, click the menu icon (…) of the target project, and select Edit Project.
-
Modify the Name or Description.
-
Click Save.
Changing the project name or description does not change API key associations or usage history.
Deleting a project
Section titled “Deleting a project”-
Log in to the Neutree management interface. In the API key list, click the menu icon (…) of the target project, and select Delete.
-
In the dialog that opens, confirm the operation again and click Delete.
Creating an API key
Section titled “Creating an API key”To achieve more granular control over permission management and usage tracking, it is recommended to create a separate API key for each AI application.
-
Log in to the Neutree management interface, click API key in the left navigation pane, then click Create on the right.
-
Select a Workspace and Project for the API key, and enter a Name. API key names can be duplicate. You can use descriptions to distinguish them.
If you do not need to add the API key to an existing project, select Ungrouped. To create a project, click Create Project in the Project drop-down list, enter a Name and Description (optional), and then click Create and select.
-
(Optional) Enter an API key Description.
-
(Optional) In the Limits (optional) section, configure usage limits for the API key.
-
Token Quota
Parameter Description Token limit Limits the total number of tokens this API key can use within the specified period. After conversion, the value must be a positive integer number of tokens. For example, 1.5 Mindicates 1,500,000 tokens. Leave blank to set no token quota.Unit The unit of the token limit. Supported units are Token, K, M, and B. The default unit is M. Period The statistical period for the token quota. -
Access control
Parameter Description Requests per second (RPS) Limits the number of requests this API key can make per second. Leave blank to set no RPS limit. Requests per minute (RPM) Limits the number of requests this API key can make per minute. Leave blank to set no RPM limit. Max concurrent Limits the number of requests this API key can process simultaneously. Leave blank to set no concurrency limit. Allowed models Limits the models this API key can call. Leave blank to allow all models. The drop-down list displays models available in the current workspace. Each option corresponds to an endpoint or external endpoint that provides the model, and displays the model name, endpoint name, internal or external identifier, and status.
-
-
After confirming the configuration, click Create to complete creation.
Viewing API keys
Section titled “Viewing API keys”Log in to the Neutree management interface and click API key in the left navigation pane. The API key list on the right displays API keys by project. A project row displays the project name, description, and number of API keys in the project. An API key row displays the API key name, description, workspace, status, usage, rate limits, callable models, and creation time.
In the API key list, you can also perform the following operations:
- Enter a project name, API key name, or description in the search box to search for matching projects or API keys.
- Use the status drop-down list to filter All API keys, Active API keys, or Disabled API keys.
- Click the expand or collapse icon on the left of a project row to show or hide the API keys in the project.
Click an API key name to view its details. On the API key details page, you can view the following information:
- The project, description, and creation time of the API key.
- Token quota consumption for the API key, including the amount used, total quota, and remaining quota in the current period.
- Access control configuration for the API key, including RPS, RPM, max concurrency, and allowed models.
- Request count, average latency, and success rate for the past 24 hours.
To view the access logs for this API key, click View call logs on the details page. The system will redirect you to the Viewing access logs page, with logs filtered by the current API key.
Editing an API key
Section titled “Editing an API key”After an API key is created, you can edit the API key name, description, project, and usage limit configuration as needed.
-
Log in to the Neutree management interface, click the menu icon (…) in the API key list, and select Edit, or go to the API key details page.
-
Modify the API key Name, Description, and Project as needed.
To remove the API key from a project, set Project to Ungrouped.
-
Modify the settings in the Limits (optional) section as needed. For parameter descriptions, see Creating an API key.
-
After confirming the configuration, click Save to complete editing.
Moving API keys
Section titled “Moving API keys”You can move one or more API keys to another project in the same workspace or to Ungrouped. Moving API keys only changes their grouping. It does not change their key values, status, usage limits, callable models, or usage history.
Moving one API key
Section titled “Moving one API key”-
In the API key list, find the target API key, click the menu icon (…), and select Move to Project.
-
In the Move API key dialog, select the target project, or select Ungrouped.
-
Click Move.
Moving API keys in batch
Section titled “Moving API keys in batch”-
In the API key list, select multiple API keys.
-
Click Move to Project above the list.
-
In the Move API key dialog, select the target project, or select Ungrouped.
-
Click Move.
Disabling an API key
Section titled “Disabling an API key”Log in to the Neutree management interface, click the menu icon (…) in the API key list, and select Disable, or go to the API key details page and click Disable. After disabling an API key, it can no longer be used to call endpoint or external endpoint APIs.
Re-enabling an API key
Section titled “Re-enabling an API key”Log in to the Neutree management interface, click the menu icon (…) in the API key list, and select Enable, or go to the API key details page and click Enable. After re-enabling an API key, it becomes available again, and the original usage limit configuration is retained.
Deleting API keys
Section titled “Deleting API keys”You can delete one or more API keys at a time.
- Log in to the Neutree management interface, click the menu icon (…) in the API key list or details page, and select Delete; or select multiple API keys in the list and click Delete above the list.
- In the dialog that appears, confirm and click Delete. The selected API keys will be permanently deleted.