---
title: "Estimate the cost of a plan before running it"
method: POST
path: "/api/v1/plans/estimate"
tags: ["Cost Management"]
---

# Estimate the cost of a plan before running it

`POST /api/v1/plans/estimate`

## Request

- Base URL: `https://orchestrator.getaxonflow.com`
- URL: `https://orchestrator.getaxonflow.com/api/v1/plans/estimate`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/docs/api/v1/plans/estimate/post.ts> (a function with typed inputs; its response is checked against the schema)

Estimate token usage and cost for a list of workflow steps. `breakdown`
is returned on Evaluation tier and above; Community receives the total
only. A response header warns when the daily estimate quota is 80%
consumed.

## Request body

- CostEstimateRequest
  - `provider` string
  - `model` string
  - `steps` WorkflowStep[], required
    - `name` string, required
    - `type` 'mcp_query' | 'llm' | 'api_call' | 'transform', required
    - `connector` string
    - `query` string
    - `prompt` string
    - `dependencies` string[]

## Response `200`

Cost estimate

- CostEstimateResponse
  - `plan_id` string: Present only on GET /api/v1/plans/{id}/cost. The estimate endpoint has no plan to name and omits it.
  - `estimated_cost_usd` number, double, required
  - `currency` string, required
  - `breakdown` StepCostEstimate[]: Per-step breakdown. Populated for Evaluation tier and above; omitted on Community, where only the total is returned.
    - `step_name` string
    - `provider` string
    - `model` string
    - `estimated_tokens_in` integer
    - `estimated_tokens_out` integer
    - `estimated_cost_usd` number, double

## Other responses

- `400`: Invalid request
- `401`: Tenant scope required. NOTE - this refusal uses a third envelope, `{error, code, message}`.
- `429`: Daily cost-estimate quota exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/revisions/f408ef3ec9dd?raw)
