# Plan agent cost workloads

Source: <https://everruns.com/docs/api/operations/plan_agent_costs/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Agents & authoring](https://everruns.com/docs/api/groups/agents-authoring/)/Plan agent cost workloads

# Plan agent cost workloads

Preview

Suggest editable typical task workloads for agent cost planning. Does not execute or save the agent.

Public APIEverruns Cloud and self-hosted Platform

POST`/v1/agents/cost-plan`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Responses

200Success

### 200

Success

Media typeapplication/json

Three representative workload hypotheses; prices and usage frequency are set separately.

object

**tasks**

required

Exactly three suggested tasks that users can edit before projecting costs.

Array\<object>

One illustrative task and its editable token and model-call assumptions.

object

**assumption**

required

Expected steps and the main uncertainty behind the workload estimate.

string

**calls**

required

Model calls per task, including follow-ups after tools; between 1 and 100.

integer format: int32

**description**

required

Example user request that this task represents.

string

**message_tokens**

required

Initial user-input tokens, excluding system instructions and tool schemas.

integer format: int32

**name**

required

Short name of the representative task.

string

**output_tokens**

required

Output tokens per model call, including reasoning and tool arguments.

integer format: int32

**tool_result_tokens**

required

New tool-result tokens added at each step of the task.

integer format: int32

### Example generated

```json
{
  "tasks": [
    {
      "assumption": "example",
      "calls": 1,
      "description": "example",
      "message_tokens": 1,
      "name": "example",
      "output_tokens": 1,
      "tool_result_tokens": 1
    }
  ]
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/agents/cost-plan';
const options = {method: 'POST'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/agents/cost-plan
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Success

```json
{
  "tasks": [
    {
      "assumption": "string",
      "calls": 0,
      "description": "string",
      "message_tokens": 0,
      "name": "string",
      "output_tokens": 0,
      "tool_result_tokens": 0
    }
  ]
}
```

## Matching endpoints