---
title: "Estimate an exact billable request"
method: POST
path: "/estimates"
---

# Estimate an exact billable request

`POST /estimates`

## Request

- Base URL: `https://api.openmayhem.ai/v1`
- URL: `https://api.openmayhem.ai/v1/estimates`
- Auth: HTTP bearer

Validates the request with the same model contract, route controls, key limits and live pricing used at execution. Creates no credit hold and no model charge. The estimate expires after ten minutes and is a snapshot, not a price or capacity reservation.

## Headers

- `X-Mayhem-Min-Att-Tier` union
  - integer
  - 'T1' | 'T2' | 'T3' | 'T4'
- `X-Mayhem-Min-Ctx` integer
- `X-Mayhem-Quant` string
- `X-Mayhem-Prefer-Providers` string
- `X-Mayhem-Hedge` 0 | 1
- `X-Mayhem-Min-Tok-S` number
- `X-Mayhem-Max-Wait-Ms` integer
- `X-OpenMayhem-Max-Input-Price-Per-Million-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Max-Output-Price-Per-Million-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Max-Representative-Request-Price-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.

## Request body

- object
  - `endpoint` 'CHAT' | 'COMPLETIONS' | 'RESPONSES' | 'EMBEDDINGS' | 'DECISIONS' | 'IMAGES' | 'VIDEOS' | 'AUDIO_SPEECH' | 'AUDIO_TRANSCRIPTIONS' | 'AUDIO_GENERATIONS' | 'MUSIC' | 'WORKFLOWS', required
  - `body` object, required: The exact endpoint request, including model.

## Response `200`

Expiring estimate with expected cost, maximum hold, price version and current can_start snapshot.

- RequestEstimate
  - `object` 'request.estimate', required
  - `estimate_id` string, required
  - `endpoint` 'CHAT' | 'COMPLETIONS' | 'RESPONSES' | 'EMBEDDINGS' | 'DECISIONS' | 'IMAGES' | 'VIDEOS' | 'AUDIO_SPEECH' | 'AUDIO_TRANSCRIPTIONS' | 'AUDIO_GENERATIONS' | 'MUSIC' | 'WORKFLOWS', required
  - `model` string, required
  - `estimated_cost_usd` string, required: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
  - `maximum_cost_usd` string, required: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
  - `estimated_units` object
  - `price_version` string, required
  - `expires_at` string, date-time, required
  - `can_start` boolean, required: Read-only current route and whole-rail funding snapshot; nothing is reserved.

## Other responses

- `400`: Contract violation; nothing charged.
- `401`: Missing or invalid API key.
- `402`: Insufficient credit.
- `403`: Scope, allowlist, spend limit or account restriction.
- `429`: Rate limit; wait Retry-After seconds.
- `503`: No provider capacity; retry with backoff.

---

[API](https://skmtc.dev/openmayhem/apis/openmayhem-api.md) · [All operations](https://skmtc.dev/openmayhem/apis/openmayhem-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openmayhem/apis/openmayhem-api/revisions/0ea33ad12f21?raw)
