> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/compute/zec/elastic-ip/describeeipprice.md).

# DescribeEipPrice

## 1. API Description

This API (DescribeEipPrice) is used to query the price of elastic IPs.

{% hint style="info" %}
**Notes**

* The size of the guaranteed traffic package is only valid for billing periods of one month.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name          | Required | Type                                                                                 | Description                                                                                                                                                                                                                                                                            |
| ----------------------- | -------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| regionId                | Yes      | String                                                                               | Region ID                                                                                                                                                                                                                                                                              |
| internetChargeType      | Yes      | [InternetChargeType](/api-reference/compute/zec/datastructure.md#internetchargetype) | Network billing methods.                                                                                                                                                                                                                                                               |
| amount                  | No       | Integer                                                                              | <p>Quantity.</p><p>Value range: \[1, +)</p><p>Default value: 1</p>                                                                                                                                                                                                                     |
| eipV4Type \[Deprecated] | No       | [EipNetworkType](/api-reference/compute/zec/datastructure.md#eipnetworktype)         | <p>Network types of public IPv4.</p><p>Deprecated. Please use networkLineType instead.</p>                                                                                                                                                                                             |
| networkLineType         | No       | [NetworkLineType](/api-reference/compute/zec/datastructure.md#networklinetype)       | Network types of public IPv4.                                                                                                                                                                                                                                                          |
| bandwidth               | No       | Integer                                                                              | <p>Bandwidth limit for the elastic public IP.</p><p>Unit: Mbps.</p><p>Value range: \[1, +)</p>                                                                                                                                                                                         |
| flowPackage             | No       | Float                                                                                | <p>Data transfer package size for public IPv6.</p><p>Unit: TB.</p><p>Value must be 0 or a multiple of 0.1.</p><p>Required when the subnet stack type includes IPv6 with public internet access and the billing type is <code>ByTrafficPackage</code>.</p><p>Value range: \[0.0, +)</p> |
| cidrId                  | No       | String                                                                               | <p>CIDR ID. Specifies the CIDR block from which an elastic IP is allocated.</p><p>This field and <code>eipV4Type</code> cannot be specified at the same time.</p>                                                                                                                      |
| clusterId               | No       | String                                                                               | <p>Bandwidth cluster ID.</p><p>If the value of internetChargeType is Bandwidth , clusterld is required.</p>                                                                                                                                                                            |
| peerRegionId            | No       | String                                                                               | Remote region ID.                                                                                                                                                                                                                                                                      |

## 3. Output Parameters

| Parameter Name       | Type                                                                                                          | Description                                                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| requestId            | String                                                                                                        | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p>                   |
| eipPrice             | [PriceItem](/api-reference/compute/zec/datastructure.md#priceitem)                                            | <p>Reservation price of the elastic public IP.</p><p>If the elastic IP is created from a CIDR block, the reservation price is null.</p> |
| bandwidthPrice       | [PriceItem](/api-reference/compute/zec/datastructure.md#priceitem)                                            | Price of bandwidth.                                                                                                                     |
| bandwidthPrices      | Array of [BandwidthPriceResponseItem](/api-reference/compute/zec/datastructure.md#bandwidthpriceresponseitem) | Bandwidth price details for each traffic direction.                                                                                     |
| remoteBandwidthPrice | [PriceItem](/api-reference/compute/zec/datastructure.md#priceitem)                                            | Price of remote ipt.                                                                                                                    |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the price of elastic IPs.**

<pre class="language-json"><code class="lang-json"><strong>POST /api/v2/zec HTTP/1.1
</strong>Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeEipPrice


Request:
{
  "regionId": "xxx",
  "amount": 1,
  "internetChargeType": "ByTrafficPackage",
  "eipV4Type": "BGPLine",
  "flowPackage": 2
}

Response:
{
  "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
  "response": {
    "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
    "eipPrice": {
        "discount": 95.0,
        "discountPrice": 1444.0,
        "originalPrice": 1520.0,
        "unitPrice": null,
        "discountUnitPrice": null,
        "chargeUnit": null,
        "stepPrices": null
    },
    "bandwidthPrice": {
        "discount": 95.0,
        "discountPrice": 1444.0,
        "originalPrice": 1520.0,
        "unitPrice": null,
        "discountUnitPrice": null,
        "chargeUnit": null,
        "stepPrices": null
    },
    "remoteBandwidthPrice":null
  }
}
</code></pre>

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                                                     | Description                                                                                                    |
| ---------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| 400              | OPERATION\_DENIED\_FLOW\_PACKAGE\_NOT\_SUPPORTED\_HOUR\_PERIOD | The current product cycle is based on hourly billing and does not support setting a minimum data package size. |
