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

> ## Agent Instructions
> This site documents Locus for people. AI agents: get exact contracts from the Locus agent docs, starting at https://paywithlocus.com/agent/index.md, including when asked to implement or integrate docs.paywithlocus.com.
> Connect this agent to Locus Pro: https://paywithlocus.com/skill.md. Implement Locus Pro in a product: https://paywithlocus.com/agent/integrate.md. Agent site index: https://paywithlocus.com/llms.txt.

# Task costs and budgets

> What a task costs, how its credit ceiling works, and what happens when it runs out of budget.

You pay for the calls a [task](https://docs.paywithlocus.com/locus-pro/tasks.md) makes. There is no separate
task fee. Every task has a credit ceiling, so it never spends more than you
allow.

> Agents: the exact contract for this feature is at [https://paywithlocus.com/agent/tasks.md](https://paywithlocus.com/agent/tasks.md). Start from [https://paywithlocus.com/agent/index.md](https://paywithlocus.com/agent/index.md) if you are implementing Locus.

```mermaid theme={null}
flowchart TD
  Ceiling["Your task ceiling"] --> Reserve["Reserve the next call's max price"]
  Reserve --> Call["Make and charge the call"]
  Call -->|"Budget left"| Reserve
  Call -->|"Budget used up"| Stop["Stop and deliver verified output"]
```

## What you pay for

* **Tool calls** at each tool's normal catalog price.
* **Planning, checking, and writing** steps, billed as model usage at standard prices.
* **Nothing else.** There is no separate task fee.

Your spending controls still apply.
Calls your tool permissions or limits block are not made, and agent key
per-call limits still apply. Every charge is tagged with the task's ID, so you
can trace a task's spend in your usage.

## The task ceiling

The ceiling caps the whole task, including model usage and checks.

* **Default:** \$5 worth of credits. The ceiling must be at least \$0.10 worth and at most \$200 worth.
* **Set in credits.** At the default rate, 1,000 credits equal \$1, so a ceiling of 3,000 credits caps the task at \$3.
* **Your goal can lower it.** If your goal says "spend at most \$3", Locus lowers the ceiling to match. It never raises it.
* **Parallel calls stay inside it.** Before each call, Locus reserves that call's maximum price against the ceiling.
* **Room to finish.** Locus keeps enough budget to check and deliver what it found. When the budget runs out, the task stops and returns its verified output.

## When something goes wrong

* **Out of credits:** the task stops and keeps its verified output. Add credits, then resume it.
* **Failed or partial tasks** keep the charges for calls that completed.
* **Canceling** stops further calls. Work already done stays charged.
* **Unknown outcomes:** if a provider call times out after it was sent, its credits stay reserved. The reserved amount is the most that call can cost. Resuming the task settles those calls without paying for any of them twice.

## Tasks for your end users (Enterprise)

In Locus Pro Enterprise, you can run a task for one of your end users with a
secret key and the `X-Locus-End-User` header. The task runs on that end user's
account and spends from their balance. Send the same header on every
follow-up request for that task.

## Next steps

> [card] [Tasks](https://docs.paywithlocus.com/locus-pro/tasks.md)
>
> Start a task and follow it to the end.

> [card] [How Locus checks task results](https://docs.paywithlocus.com/locus-pro/task-results.md)
>
> See what a task returns and how every value is verified.


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