# Batch query model prices - GetUFSquareModelPrices

## Overview

Batch query model prices




## 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 `GetUFSquareModelPrices`.                      | **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 |
|:---|:---|:---|:---|
| **Keyword** | string | Fuzzy search by model name (e.g., deepseek-r1) |No|
| **Offset** | int | Starting position offset of the list, default is 0 |No|
| **Limit** | int | The length of the returned data, default is 20, maximum is 100 |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|
| **Models** | array[[*ModelPriceGroup*](#modelpricegroup)] | Price information for matching models |**Yes**|
| **TotalCount** | int | The total number of items is used for page turning |No|

#### Data Model

#### ModelPriceGroup

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Manufacturer** | string | Manufacturer |**Yes**|
| **ModelName** | string | Model name |No|
| **ModelId** | string | Model ID |No|
| **Tiers** | array[[*PriceTier*](#pricetier)] | Price tiers |No|

#### PriceTier

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Rates** | array[[*PriceRate*](#pricerate)] | List of charges under this gear (ordered array) |**Yes**|
| **DescriptionEn** | string | Gear description (e.g. "Standard context 32k") |**Yes**|
| **Condition** | string | Gear/condition (e.g. "32k", "128k") |No|
| **Description** | string | Gear description (e.g. "Standard context 32k") |No|

#### PriceRate

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ChargeItemDescriptionEn** | string | Description of charge items |**Yes**|
| **Currency** | string | Currency Unit |**Yes**|
| **Unit** | string | Unit of pricing |**Yes**|
| **UnitEn** | string | Unit of pricing |**Yes**|
| **ChargeItem** | string | Charge item：input/output/thinking/tool... |No|
| **ChargeItemDescription** | string | Description of charge items |No|
| **Price** | string | Price |No|

## Example

### Request Example
```
https://api.ucloud.cn/?Action=GetUFSquareModelPrices
&Region=cn-zj
&Zone=cn-zj-01
&Keyword=tUpakpEx
&Offset=2
&Limit=2
```

### Response Example
```json
{
  "Action": "GetUFSquareModelPricesResponse",
  "Models": [
    {
      "ModelId": "OimToelj",
      "ModelName": "vNbcKKTy",
      "Tiers": [
        {
          "Condition": "eNlQgdAu",
          "Description": "sVuQZmlZ",
          "Rates": [
            {
              "ChargeItem": "qoFeTVec",
              "ChargeItemDescription": "jydMPQin",
              "Price": "xgXpKJwx"
            }
          ]
        }
      ]
    }
  ],
  "RetCode": 0,
  "TotalCount": 4
}
```
