> ## Documentation Index
> Fetch the complete documentation index at: https://www.artie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimate a Managed Kafka cluster's monthly cost

> Prices a cluster and its usage in whole dollars from the stored AWS prices. Artie's fee is on compute only; tiered storage is billed uncompressed at the S3 price.

`POST /kafka-clusters/estimate`

## Authorization

* `Authorization` (header): API key passed as a Bearer token in the Authorization header.

## Body (application/json)

* `brokers` (integer, required, range `3 ≤ x ≤ 30`)
* `instanceType` (string, required) One of: `m8g.2xlarge`, `m8g.4xlarge`, `m8g.xlarge`, `m8i.2xlarge`, `m8i.4xlarge`, `m8i.xlarge`, `r8g.2xlarge`, `r8g.large`, `r8g.xlarge`, `r8i.2xlarge`, `r8i.large`, `r8i.xlarge`.
* `region` (string): Region code; defaults to the region Managed Kafka runs in.
* `storageGiBPerBroker` (integer, required)
* `tieredStorageGiB` (number<double>, range `x ≥ 0`): Data in tiered storage, uncompressed. Billed on that size at the S3 price.
* `traffic` (object)
  * `egressGiBPerMonth` (object)
    * `crossAZ` (number<double>, range `x ≥ 0`)
    * `crossRegion` (Record<string, number<double>> | null): GiB a month to each other region, by region code.
    * `internet` (number<double>, range `x ≥ 0`): Also traffic to other clouds.
    * `sameAZ` (number<double>, range `x ≥ 0`): Billed like cross-AZ traffic, since clients connect through the cluster's public load balancer.
  * `ingressGiBPerMonth` (number<double>, range `x ≥ 0`): From the internet.

## Example request

```bash
curl --request POST \
  --url https://api.artie.com/kafka-clusters/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "brokers": 3,
  "instanceType": "m8g.2xlarge",
  "region": "<string>",
  "storageGiBPerBroker": 123,
  "tieredStorageGiB": 0,
  "traffic": {
    "egressGiBPerMonth": {
      "crossAZ": 0,
      "crossRegion": {
        "key": 123
      },
      "internet": 0,
      "sameAZ": 0
    },
    "ingressGiBPerMonth": 0
  }
}'
```

## Responses

### 200 OK

* `egressRates` (object[], required): The region's outbound transfer prices, not in the total.
  * `label` (string, required)
  * `maxUSDPerGB` (number<double>, required)
  * `minUSDPerGB` (number<double>, required)
* `feeRate` (number<double>, required): Artie's fee on compute, e.g. 0.25.
* `feeUSD` (integer, required)
* `lineItems` (object[], required)
  * `category` (string, required) One of: `instance`, `block_storage`, `object_storage`, `data_transfer`, `network`.
  * `label` (string, required)
  * `quantity` (number<double>, required)
  * `unit` (string, required) One of: `hour`, `gb_month`, `gb`, `iops_month`, `mbps_month`, `request_1k`.
  * `unitUSD` (number<double>, required): The first tier's price for a tiered one.
  * `usd` (integer, required)
* `pricesAsOf` (string<date-time> | null): When the prices were last fetched from AWS; null before the first fetch.
* `region` (string, required)
* `totalUSD` (integer, required)

```json
{
  "egressRates": [
    {
      "label": "<string>",
      "maxUSDPerGB": 123,
      "minUSDPerGB": 123
    }
  ],
  "feeRate": 123,
  "feeUSD": 123,
  "lineItems": [
    {
      "category": "instance",
      "label": "<string>",
      "quantity": 123,
      "unit": "hour",
      "unitUSD": 123,
      "usd": 123
    }
  ],
  "pricesAsOf": "2023-11-07T05:31:56Z",
  "region": "<string>",
  "totalUSD": 123
}
```

### 400 Bad Request

### 404 Not Found

### 500 Internal Server Error

### 503 Service Unavailable