---
title: "Estimate a price without creating a job"
method: POST
path: "/estimate"
tags: ["Pricing"]
---

# Estimate a price without creating a job

`POST /estimate`

## Request

- Base URL: `https://api.varg.ai/v2`
- URL: `https://api.varg.ai/v2/estimate`
- Auth: HTTP bearer

Send the same body you would send to a generation endpoint and get the
price back. Also accepts a batch format with an `items` array where each
item carries `tool`, `model`, and `params`.

## Request body

- union
  - EstimateRequest
    - `model` string, required
    - `tool` string
    - `capability` string: Alias of `tool`. If both are absent the tool is inferred from `model`.
  - EstimateBatchRequest
    - `items` object[], required
      - `tool` string
      - `capability` string
      - `model` string
      - `params` object

## Response `200`

Estimate

- union
  - EstimateResponse
    - `valid` boolean
    - `model` string
    - `tool` string
    - `resolved_model_key` string, nullable: The exact route (`provider:model`) this request would run on. Pin it as `model` for deterministic routing.
    - `pricing` object
      - `user_price_cents` integer, nullable
      - `pricing_id` string, nullable
      - `children_user_price_cents` integer: Render only. Estimated price of the sub-generations the TSX will spawn (upper bound).
      - `total_user_price_cents` integer: Render only. `user_price_cents` + `children_user_price_cents`.
    - `breakdown` EstimateLineItem[]: Render only. Per-child line items.
      - `capability` string
      - `model` string
      - `credits` integer
      - `billing` string
      - `provider` string
    - `warnings` string[]
  - EstimateBatchResponse
    - `items` object[]
      - `capability` string
      - `model` string
      - `credits` integer
      - `billing` 'metered' | 'byok' | 'x402'
      - `provider` string: Always an empty string today
      - `valid` false: Present (false) only when this item failed validation; `credits` is then 0
      - `code` string
      - `message` string
      - `details` object[]
        - `path` string
        - `message` string
    - `total_credits` integer

## Other responses

- `400`: Body is not a JSON object
- `401`: Missing or invalid API key / JWT
- `404`: Unknown model or tool (single mode). Flat body, not the error envelope.
- `422`: Validation failed. Single mode with an invalid request returns the flat `EstimateError`; empty `items` / missing `model` returns the standard envelope.
- `503`: No active pricing rule (single mode). Flat body.

## Changes

- **2026-10-20** `43bcf5ea398d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/varg/apis/varg-api/changes/estimate/post.md)

---

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