---
docId: doc_50f5f2fc94084228ad1f26e3e603ef20
title: Estimate a run
description: "Calculates planned trials, their maximum cost and warnings before starting them."
api:
  group: agentes/evals/corridas
  auth: bearer
  operations:
    - operationId: estimateEvalRun
      method: POST
      path: '/v1/agents/{agentId}/evals/runs/estimate'
      postmanName: Estimate a run
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# Estimate a run

Check how many trials a [suite](/api-reference/evals) would run and what they could cost. Send `suiteId` and `versions`; show `estimatedMaxMessages` and warnings to the person requesting the test before [starting it](/api-reference/evals/runs/start). This request starts no tests, saves no changes and consumes no messages.

<Note type="important">

Runs use the agent’s **real tools**. Each agent turn consumes **one internal message**.

</Note>

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X POST "https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs/estimate" \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "suiteId": "s8Kd2LmQ",
  "versions": ["draft", "published"]
}'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.evals.runs.estimate("agent_123", { suiteId: "suite_123", versions: ["draft"] });
```

</Ways.Way>
</Ways>



## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent ID | ✓ |

## Request body

```json
{
  "suiteId": "s8Kd2LmQ",
  "versions": ["draft", "published"]
}
```

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `suiteId` | string | The suite. | ✓ |
| `versions` | array | 1 to 4 versions: `draft`, `published` or `vN` (the exact version number, for example `v5`). | ✓ |

## Response

```json
{
  "status": "success",
  "data": {
    "suiteId": "s8Kd2LmQ",
    "suiteHash": "sha256:9b0e…",
    "versions": [
      { "versionId": "v7", "number": 7, "requested": ["draft"] },
      { "versionId": "v5", "number": 5, "requested": ["published"] }
    ],
    "totalTrials": 12,
    "estimatedMaxMessages": 24,
    "warnings": [
      { "code": "assistance_disabled", "versionId": "v5", "scenarioIds": ["asks_for_person"] }
    ]
  }
}
```

## Response fields

| Field | Description |
|-------|-------------|
| `suiteId` | The suite. |
| `suiteHash` | Fingerprint of the frozen suite: scenarios and versions. |
| `versions` | Each requested version, already resolved to its `vN` (`versionId`, `number`). `requested` says what you asked for; if two values are the same version, it has both. |
| `totalTrials` | Total trials, adding up all versions. |
| `estimatedMaxMessages` | The most it can cost: the agent's turns if every trial reaches its last turn (in a script, its messages; in a persona, `maxTurns`). Each turn is charged as an internal message. It usually costs less. |
| `warnings` | Warnings to show before running. Empty if there are none. |

Warnings (`warnings[].code`):

| `code` | Meaning | If you run anyway |
|--------|---------|-------------------|
| `assistance_disabled` | Version `versionId` has assistance disabled and scenarios in `scenarioIds` require help (`assistance_requested` with `expected: true`). | Review assistance settings for the agent and its subagents. If no request is recorded, the check fails with `La versión probada no tiene activada la asistencia.` This is a failure, not an error. |
| `too_many_trials` | The launch goes over the trial limit (`limit`, 64 by default). | It does not start: it answers `429 EVAL_CAPACITY`. Choose fewer versions, scenarios or trials. |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The body is not valid; for example, more than four versions. |
| `404` | `AGENT_NOT_FOUND` | The agent does not exist or belongs to another workspace. |
| `404` | `EVAL_NOT_FOUND` | The suite does not exist in your workspace. |
| `404` | `EVAL_VERSION_NOT_FOUND` | One of the versions does not exist; for example, `v9` on an agent with five. |
| `409` | `EVAL_SUITE_STALE` | The suite is archived or one of its scenarios no longer exists. |

## Notes

- Read access to the agent is enough (with OAuth, `platica:read`).
