Skip to content
Neutree Documentation

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.

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.

  1. 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.

  2. Enter a Name.

  3. (Optional) Enter a Description.

  4. Click Create.

  1. Log in to the Neutree management interface. In the API key list, click the menu icon () of the target project, and select Edit Project.

  2. Modify the Name or Description.

  3. Click Save.

    Changing the project name or description does not change API key associations or usage history.

  1. Log in to the Neutree management interface. In the API key list, click the menu icon () of the target project, and select Delete.

  2. In the dialog that opens, confirm the operation again and click Delete.

To achieve more granular control over permission management and usage tracking, it is recommended to create a separate API key for each AI application.

  1. Log in to the Neutree management interface, click API key in the left navigation pane, then click Create on the right.

  2. 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.

  3. (Optional) Enter an API key Description.

  4. (Optional) In the Limits (optional) section, configure usage limits for the API key.

    • Token Quota

      ParameterDescription
      Token limitLimits 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 M indicates 1,500,000 tokens. Leave blank to set no token quota.
      UnitThe unit of the token limit. Supported units are Token, K, M, and B. The default unit is M.
      PeriodThe statistical period for the token quota.
    • Access control

      ParameterDescription
      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 concurrentLimits the number of requests this API key can process simultaneously. Leave blank to set no concurrency limit.
      Allowed modelsLimits 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.
  5. After confirming the configuration, click Create to complete creation.

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.

After an API key is created, you can edit the API key name, description, project, and usage limit configuration as needed.

  1. 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.

  2. Modify the API key Name, Description, and Project as needed.

    To remove the API key from a project, set Project to Ungrouped.

  3. Modify the settings in the Limits (optional) section as needed. For parameter descriptions, see Creating an API key.

  4. After confirming the configuration, click Save to complete editing.

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.

  1. In the API key list, find the target API key, click the menu icon (), and select Move to Project.

  2. In the Move API key dialog, select the target project, or select Ungrouped.

  3. Click Move.

  1. In the API key list, select multiple API keys.

  2. Click Move to Project above the list.

  3. In the Move API key dialog, select the target project, or select Ungrouped.

  4. Click Move.

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.

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.

You can delete one or more API keys at a time.

  1. 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.
  2. In the dialog that appears, confirm and click Delete. The selected API keys will be permanently deleted.