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

# Estimate machine cost

> Estimate a bounded machine session or monthly workload without creating machines.

## Authentication

This endpoint is public and does not require authentication.

## Request body

The JSON body is required.

**size** `string`

Named machine size; use instead of vcpus and memory\_mib. Allowed values: `"xs"`, `"small"`, `"medium"`, `"large"`, `"xlarge"`.

**shape** `string`

Size name for a monthly workload quote. Allowed values: `"xs"`, `"small"`, `"medium"`, `"large"`, `"xlarge"`.

**vcpus** `integer`

CPUs per machine when quoting explicit dimensions. Minimum: `1`. Maximum: `128`.

**memory\_mib** `integer`

Memory per machine in MiB for an explicit dimension quote. Minimum: `1`. Maximum: `1048576`.

**disk\_mib** `integer`

Retained disk per machine in MiB for an explicit dimension quote. Minimum: `0`. Maximum: `16777216`.

**duration\_seconds** `integer`

Session length in seconds; required for sized and dimension quotes. Minimum: `1`. Maximum: `86400`.

**machines** `integer` (default: 1)

Number of machines in a sized or dimension quote. Minimum: `1`. Maximum: `256`.

**storage\_bytes** `integer`

Retained storage bytes; required for monthly quotes, optional for sized quotes. Minimum: `0`.

**sessions\_per\_month** `integer`

Monthly session count; required for a monthly quote. Minimum: `0`.

**session\_length\_seconds** `integer`

Seconds in each monthly session; required for a monthly quote. Minimum: `0`.

**peak\_concurrent\_vms** `integer`

Peak monthly concurrency; required for a monthly quote. Minimum: `0`. Maximum: `10`.

**cpu\_busy\_share\_bps** `integer`

CPU busy fraction in basis points; required for a monthly quote. Minimum: `0`. Maximum: `10000`.

**paused** `boolean` (default: false)

Quote retained storage without running CPU and memory.

**desktop** `boolean` (default: false)

Include the live desktop add-on during running time.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl --request POST \
  --url "https://api.bead.run/v1/pricing/estimate" \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "size": "small",
  "duration_seconds": 3600,
  "machines": 1
}
JSON
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
from beadrun import pricing

quote = pricing.estimate(size="small", duration_seconds=3600)
```

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
import { pricing } from "@beadrun/sdk";

const quote = await pricing.estimate({ size: "small", duration_seconds: 3600 });
```

## Response

### 200

Cost estimate for the supplied workload.

**price\_version** `string` *required*

Version of the tariff used for the quote.

**currency** `string` *required*

Currency for the quoted amounts. Allowed values: `"usd"`.

**cpu** `object` *required*

Exact charge with a decimal USD display value.

**Properties**

**usd** `string` *required*

USD amount rendered to twelve decimal places.

**numerator** `string` *required*

Exact charge numerator in credit units; encoded as a string to preserve precision.

**denominator** `string` *required*

Denominator for the exact charge numerator, before conversion to USD.

**memory** `object` *required*

Exact charge with a decimal USD display value.

**Properties**

**usd** `string` *required*

USD amount rendered to twelve decimal places.

**numerator** `string` *required*

Exact charge numerator in credit units; encoded as a string to preserve precision.

**denominator** `string` *required*

Denominator for the exact charge numerator, before conversion to USD.

**storage** `object` *required*

Exact charge with a decimal USD display value.

**Properties**

**usd** `string` *required*

USD amount rendered to twelve decimal places.

**numerator** `string` *required*

Exact charge numerator in credit units; encoded as a string to preserve precision.

**denominator** `string` *required*

Denominator for the exact charge numerator, before conversion to USD.

**desktop** `object`

Exact charge with a decimal USD display value.

**Properties**

**usd** `string` *required*

USD amount rendered to twelve decimal places.

**numerator** `string` *required*

Exact charge numerator in credit units; encoded as a string to preserve precision.

**denominator** `string` *required*

Denominator for the exact charge numerator, before conversion to USD.

**total** `object` *required*

Exact charge with a decimal USD display value.

**Properties**

**usd** `string` *required*

USD amount rendered to twelve decimal places.

**numerator** `string` *required*

Exact charge numerator in credit units; encoded as a string to preserve precision.

**denominator** `string` *required*

Denominator for the exact charge numerator, before conversion to USD.

## Errors

| Status | Meaning |
| - | - |
| 400 | Unknown size, invalid dimensions, non-boolean desktop, arithmetic overflow, or monthly workload above concurrency capacity. |
| 413 | Request body exceeds the route limit. |
| 422 | JSON does not match the request types or required fields. |
| 503 | Service or persistence is temporarily unavailable. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.