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

# Estimate Simulation

> A free dry run: calls, minutes, credits, and how many calls your ceilings admit

> [!NOTE]
>
> AI Simulation needs an active **Pro** or **Business** plan. On another plan, every simulation endpoint returns `403 POLICY_DENY`.

Check what a simulation would cost before you start it. The estimate queues nothing, calls no model and costs nothing. Every field is optional.

## Request

### Headers

**Authorization** `string` *required*

Bearer token with your API key (scope `agents`)

**Content-Type** `string` *required*

application/json

### Path

**agentId** `string` *required*

The agent `id` (UUID). The agent must be in your workspace and saved at least once

### Body

**scenarios** `integer` (default: 12)

1 to 50. How many stories

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

1 to 100

**estimated\_credits\_per\_call** `number`

Your estimate of the credits one call uses. Must be more than 0

**max\_credits** `number`

The credit ceiling. Needs `estimated_credits_per_call`

**max\_calls** `integer`

At least 1

**priority** `string` (default: manual)

`manual`, or `ci` (API keys only)

## Response

**200 OK**.

```json theme={null}
{
  "estimate": { "calls": 60, "minutes_upper_bound": 300, "credits": 30.0, "credits_per_call": 0.5 },
  "admitted_calls": 40,
  "budget_limited": true
}
```

* `minutes_upper_bound` is calls × 5 minutes, the cap for one call. It is not a prediction.
* `admitted_calls` is the lowest of the number of calls, `max_calls`, and `max_credits` ÷ `estimated_credits_per_call`. `max_minutes` is a time limit, so it does not change this number.
* `budget_limited` is `true` when the ceilings would stop the run before every call is made.
* `credits` is `null` when you gave no `estimated_credits_per_call`.

## Errors

| Status | Code | Meaning |
| - | - | - |
| 400 | `VALIDATION_ERROR` | A value is out of range. `field` names it |
| 403 | `POLICY_DENY` | Your role cannot read agents, the workspace is not on an active Pro or Business plan, or the API key lacks the `agents` scope |
| 404 | `AGENT_NOT_FOUND` | No agent with this ID in your workspace |
| 409 | `AGENT_NOT_SYNCED` | Save the agent once, then try again |

## Example

```bash cURL theme={null}
curl -X POST https://api.60db.ai/agents/AGENT_ID/simulations/estimate \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"scenarios": 12, "repeats": 5, "estimated_credits_per_call": 0.5, "max_credits": 20}'
```


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