# get api model list - GetUMInferAPIModel

## Overview

Get the list of models that can be called by this 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) /
- [UAPI Browser](https://console.ucloud.cn/uapi/detail?id=GetUMInferAPIModel)
- [CloudShell](https://shell.ucloud.cn/)

## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetUMInferAPIModel`.                      | **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 |
|:---|:---|:---|:---|
| **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) |**Yes**|
| **KeyId** | string | apikey id |No|
| **ModelType** | int | model type, 1 text generation, 2 image generation. |No|
| **SquareId** | string | The ID of the model square, used to jump to the experience center |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[[*UMinferAPIModel*](#uminferapimodel)] | List of Model Names |**Yes**|

#### Data Model

#### UMinferAPIModel

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ServedModelName** | string | When calling the OpenAI interface, fill in the model value |No|
| **Id** | string | id |No|
| **Name** | string | name |No|
| **SimpleDescribe** | string | description |No|
| **Language** | array[string] | language |No|
| **Icon** | string | icon link |No|
| **Pricing** | [*Pricing*](#pricing) | model price |No|
| **CreateAt** | int | create time |No|
| **UpdateAt** | int | update time |No|

#### Pricing

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Completion** | float | Completion |No|
| **Prompt** | float | Prompt |No|
| **Image** | float | Image |No|
| **Currency** | string | Currency |No|

## Example

### Request Example
```
https://api.ucloud.cn/?Action=GetUMInferAPIModel
&KeyId=BNPXRmCb
&ModelType=2
&SquareId=fschGecL
&ProjectId=cauxjXmc
```

### Response Example
```json
{
  "Action": "GetUMInferAPIModelResponse",
  "Data": [
    "daArfQcO"
  ],
  "RetCode": 0
}
```
