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

# Calculate Price

> Estimate exact token cost before generating

## Path Parameters

<ParamField path="slug" type="string" required>
  Model slug, e.g. `dall-e-3`, `kling-v2.1`
</ParamField>

## Body Parameters

<ParamField body="params" type="object">
  Generation parameters (same as you'd pass to `/generate`). Used to compute variable pricing based on size, quality, duration, etc.
</ParamField>

<ParamField body="count" type="integer" default="1">
  Number of generations to calculate for.
</ParamField>

## Request Example

```bash theme={null}
curl -X POST https://elumenta.ru/api/v2/models/dall-e-3/calculate-price \
  -H "Authorization: Bearer nb_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params": {"size": "1792x1024", "quality": "hd"}, "count": 1}'
```

## Response

```json theme={null}
{
  "token_cost": 13,
  "min_token_cost": 5,
  "max_token_cost": 13,
  "pricing_type": "matrix"
}
```

## Pricing Types

| `pricing_type` | Description                                  |
| -------------- | -------------------------------------------- |
| `fixed`        | Same cost regardless of params               |
| `matrix`       | Varies by size/quality (DALL-E 3, GPT Image) |
| `per_second`   | Scales with video duration (Kling, Luma)     |
| `per_point`    | Based on MidJourney points (MidJourney)      |

<Tip>
  Always call this before generating expensive assets — video and HD images can cost significantly more than the base price.
</Tip>

See [List Models](/en/api-reference/models/list) for all available slugs.
