# batch create api key - BatchCreateUMInferAPIKey

## Overview

batch create api key




## Usage

You can choose any of the following methods to initiate an API request:
- Multi-language OpenSDK / [Go](https://github.com/ucloud/ucloud-sdk-go) / [Java](https://github.com/ucloud/ucloud-sdk-java) / [Python](https://github.com/ucloud/ucloud-sdk-python3) / [JavaScript](https://github.com/ucloud/ucloud-sdk-js) / [PHP](https://github.com/ucloud/ucloud-sdk-php) /
- [CloudShell](https://shell.ucloud.cn/)

## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `BatchCreateUMInferAPIKey`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.ucloud.cn/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](https://docs.ucloud.cn/api/summary/signature)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Region and Zone List](https://docs.ucloud.cn/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](https://docs.ucloud.cn/api/summary/get_project_list) |No|
| **Zone** | string | Zone. See [Region and Zone List](https://docs.ucloud.cn/api/summary/regionlist) |**Yes**|
| **Prefix** | string | prefix name of key |**Yes**|
| **Start** | int | start number of key |**Yes**|
| **Count** | int | count of key |**Yes**|
| **ModelverseDisabled** | int | Is modelverse available? 0: Enabled 1: Disabled |No|
| **SandBoxDisabled** | int | Is the sandbox available? 0: Enabled 1: Disabled |No|
| **DailyLimitAmount** | string | Daily limit, with the unit depending on the user's channel. For channel 126, the unit is USD |No|
| **MonthlyLimitAmount** | string | Monthly limit, with the unit depending on the user's channel. For channel 126, the unit is USD |No|
| **GrantAllModels** | boolean | All model access switches: when enabled, they are not controlled by the GrantedModels parameter; when disabled, only models added in GrantedModels can be accessed |No|
| **GrantedModels** | string | The authorization model is represented in an array format. When GrantAllModels is set to false, the current key can only access models in the array. For example: ["deepseek-ai/DeepSeek-V3.2-Think"] |No|
| **IPWhitelist** | string | IP whitelist, multiple sets of IPs separated by newlines. Supports IPv4 and network segments. Enter and press Enter to take effect. Up to 100 entries are allowed. Example: 192.168.1.1 192.168.1.10-192.168.1.100 192.168.1.10/24 |No|
| **InferenceLogEnabled** | int | enable inference log |No|
| **TotalLimitAmount** | string | Total limit, with the unit depending on the user's channel. For channel 126, the unit is USD |No|
| **ExpireTime** | int | Expiration time (Unix timestamp in seconds). Default = -1, which means it never expires; must be -1 or a future time, and ≤ 253402300799 (23:59:59 UTC on 12/31/9999). |No|
| **ModelAccessMode** | string | Access Mode: whitelist (default) / blacklist |No|
| **DeniedModels** | string | Blacklist model, effective only in blacklist mode，["deepseek-ai/DeepSeek-V3.2-Think"，"gemini-4-neon"] |No|
| **IPBlacklist** | string | ip blacklist, newline split multiple sets of ips. Support IPv4 and network segment, enter after effective, up to 100, example: ﻿ 192.168.1.1 192.168.1.10-192.168.1.100 192.168.1.10/24 |No|
| **DailyQuotaAlertThreshold** | int | Daily quota alarm threshold 0-100 (percentage) |No|
| **MonthlyQuotaAlertThreshold** | int | Monthly quota alarm threshold 0~100 |No|
| **TotalQuotaAlertThreshold** | int | The total quota alarm threshold is 0 to 100 |No|
| **QuotaAlertChannels** | string | []string；Alert channel: email/sms/phone (deduplication, lowercase) Required if either threshold >0 |No|
| **QuotaAlertEmail** | string | If the channel contains email, it must be filled in and must be a legitimate email address |No|
| **QuotaAlertPhone** | string | Required if the channel includes sms/phone |No|
| **QuotaAlertEmailVerificationToken** | string | It is required when enabling email channel. It needs to call the CAPTCHA interface to obtain it, verify it on the server and consume it once |No|
| **QuotaAlertPhoneVerificationToken** | string | Required if sms/phone channel is enabled. Same as above |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Data** | array[[*BatchCreateUMInferAPIKey*](#batchcreateuminferapikey)] | key list |No|

#### Data Model

#### BatchCreateUMInferAPIKey

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **KeyId** | string | KeyId |No|
| **Name** | string | Name |No|
| **APIKey** | string | Secret key |No|
| **Success** | boolean | Was it successful? |No|

## Example

### Request Example
```
https://api.ucloud.cn/?Action=BatchCreateUMInferAPIKey
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=iXZbCebH
&Prefix=OLkgFDPC
&Start=6
&Count=5
&ModelverseDisabled=5
&SandBoxDisabled=7
&DailyLimitAmount=UgIsTmJi
&MonthlyLimitAmount=Jmacqfra
&GrantAllModels=true
&GrantedModels=fEZbqvkL
&IPWhitelist=jQJFgVUQ
&InferenceLogEnabled=8
&TotalLimitAmount=YqZWkNZP
&ExpireTime=6
&ModelAccessMode=NitlOwRH
&DeniedModels=ekgtywyG
&IPBlacklist=StDZyiCk
&DailyQuotaAlertThreshold=7
&MonthlyQuotaAlertThreshold=5
&TotalQuotaAlertThreshold=9
&QuotaAlertChannels=PxKUuAMC
&QuotaAlertEmail=ticiEuNh
&QuotaAlertPhone=LPfSovIk
&QuotaAlertEmailVerificationToken=cHkkVYxB
&QuotaAlertPhoneVerificationToken=quBgpTcD
```

### Response Example
```json
{
  "Action": "BatchCreateUMInferAPIKeyResponse",
  "Count": 3,
  "DailyLimitAmount": "fURAcSnH",
  "GrantAllModels": false,
  "GrantedModels": "qqHMiGDb",
  "IPWhitelist": "qimWFhke",
  "ModelverseDisabled": 5,
  "MonthlyLimitAmount": "puAvkNEH",
  "Prefix": "COehxXIT",
  "RetCode": 0,
  "SandBoxDisabled": 9,
  "Start": 1
}
```
