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

# Billing

> Prepaid and managed in the dashboard: one workspace wallet funds compute and managed usage.

Billing is prepaid. You top up one workspace wallet in the dashboard, and everything draws from it: instance compute and managed usage.

## How the balance works

* **\$1 free to start.** Add a card from the billing page (nothing is charged) and your workspace gets a one-time \$1 credit, enough to run your first instance for days, or a mostly-idle [auto-sleep](/docs/agents-api/instances#auto-sleep) instance for a month or more. The credit is granted once per account and once per card. Until your first real top-up, the workspace runs one instance of any template on the 2 vCPU / 4 GB shape; a larger shape returns `403 tier_limit`. Your first top-up unlocks the 4/8 and 8/16 shapes, and up to 10 instances; once your top-ups total \$100 the cap rises to 50, and at \$250 to 200. See [Instance limits](#instance-limits).
* **Top up in the dashboard.** Add funds at [dashboard/cloud/billing](https://www.agent37.com/dashboard/cloud/billing). Top-ups are \$5 to \$1000 each, paid through Stripe.
* **Automatic top-up is on by default.** Your first top-up saves its card and turns on a refill rule (below \$10, buy \$25) so the wallet refills itself; adjust or turn it off any time. See [Automatic top-up](#automatic-top-up).
* **Instances draw it down.** Compute is metered per minute: time an instance spends running bills its full rate, time spent stopped or sleeping bills its disk alone. See [Per-minute metering](#per-minute-metering).
* **Managed usage draws it down.** Managed LLM, Brave search, and Composio calls are metered at cost against the same wallet, gated by each instance's [budget](/docs/agents-api/budgets).
* **Delete to stop billing.** Deleting an instance settles its final minutes and ends billing. Nothing is ever prepaid, so there is nothing to refund.

<Note>
  There are no balance or billing endpoints on `/v1`. The wallet, top-ups, and the ledger are managed entirely in the [dashboard](https://www.agent37.com/dashboard/cloud/billing).
</Note>

## Instance limits

How many instances a workspace can run at once depends only on how much it has topped up:

| Workspace                            | Instances                     |
| ------------------------------------ | ----------------------------- |
| Free (before your first top-up)      | 1, on the 2 vCPU / 4 GB shape |
| Topped up at least once (any amount) | 10, all shapes                |
| Top-ups total \$100 or more          | 50, all shapes                |
| Top-ups total \$250 or more          | 200, all shapes               |

The cap rises on its own: your first top-up lifts the workspace to 10 instances, \$100 in total top-ups makes it 50, and \$250 makes it 200, with nothing to request or configure. Need more than 200? Email [vishnu@agent37.com](mailto:vishnu@agent37.com) or use the chat bubble in the dashboard.

These are caps on how many instances you can run at once, not a balance requirement: each instance simply [meters its own compute](#per-minute-metering) from the wallet, with no extra reserve for holding several.

## Compute pricing

Compute is priced from the instance's `resources`:

| Resource | Rate                      |
| -------- | ------------------------- |
| vCPU     | \$0.80 per vCPU per month |
| RAM      | \$0.70 per GB per month   |
| Disk     | \$0.09 per GB per month   |

Applied to the shapes at their default disk:

| Shape                                          | Price at the default disk |
| ---------------------------------------------- | ------------------------- |
| 2 vCPU / 4 GB RAM / 2-12 GB disk (the default) | \$4.76                    |
| 4 vCPU / 8 GB RAM / 2-20 GB disk               | \$9.34                    |
| 8 vCPU / 16 GB RAM / 2-40 GB disk              | \$18.68                   |

Every template offers the same three shapes, and 2 vCPU / 4 GB is the smallest. Disk is any whole number of GB within the shape's range and defaults to 4, 6, or 12 GB by shape; every GB bills at \$0.09 per month. See [Instances](/docs/agents-api/instances) for how to pick a shape with `resources` on create.

### Default and Performance instances

Every instance is a **default** instance unless you ask for something else, and the prices above are what one costs awake around the clock. For most harnesses the default is all you need: agents spend most of the day idle.

A **Performance** instance runs on dedicated cores. Reach for it when the agent does heavy work, such as computer use (driving a browser or a desktop), and needs the same speed every hour. It is priced above the default. Isolation and every endpoint on this reference behave identically; only the CPU allocation changes.

Start with the default. Performance is enabled per workspace: pass `"type": "performance"` on [create](/docs/agents-api/instances#create-an-instance), and until your workspace has it, create returns `403 performance_unavailable` with a link to a short call where we turn it on.

[Auto-sleep](/docs/agents-api/instances#auto-sleep) does not change these rates. An auto-sleep instance bills the same rate as an always-on one for the time it is awake, and disk alone for the time it is asleep, so anything idle for most of the day costs a fraction of the always-on price. See [Per-minute metering](#per-minute-metering).

## Per-minute metering

The monthly price is the rate; the wallet is metered per minute (the monthly price divided by 730 hours, divided by 60). What a minute costs depends on what the instance holds:

| Time spent                                                                                | Meters at                                                                                                                              |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `running`, and the transitional states (`starting`, `restarting`, `updating`, `stopping`) | The full compute rate, with [auto-sleep](/docs/agents-api/instances#auto-sleep) on or off.                                                  |
| `sleeping`, `stopped`, or `waking`                                                        | The disk rate alone: \$0.09 per reserved GB per month. A wake that has to rebuild the instance sits in `waking` for about two minutes. |
| Parked in cold storage (long-idle sleepers moved off their host)                          | \$0.03 per GB per month, on the actual compressed bytes stored.                                                                        |

**Create checks a day, debits nothing.** `POST /v1/instances` requires the wallet to hold one day of the instance's running rate; below that, the create returns `402 insufficient_balance` and nothing is provisioned. Nothing is debited at create: the meter starts when the instance first reaches `running`, so a failed create costs nothing and there is nothing to refund.

```json theme={null}
{
  "error": {
    "code": "insufficient_balance",
    "message": "This instance costs $0.0068 per hour, metered per minute; creating it requires at least one day of balance ($0.1624). Add balance to your workspace and try again."
  }
}
```

**Each instance meters on its own.** Every instance draws its own metered debits from the wallet; there is no extra balance reserve for running several at once. How many you can run at once is set by your [instance limit](#instance-limits), not by your balance.

**Sleep and stop cut the rate; delete ends it.** An instance bills for as long as it exists, but only for what it holds. Stopping (or [auto-sleep](/docs/agents-api/instances#auto-sleep)) releases CPU and RAM and keeps the disk, so parked time bills disk alone. An auto-sleep instance that spends most of its life asleep costs mostly its disk, about \$0.36 per month at the default 4 GB. Deleting an instance settles the final window and billing stops.

**The meter settles behind the scenes.** Whole minutes are billed at every lifecycle transition and at least hourly; you never see a per-minute charge on an API call. Each debit lands in the [ledger](#ledger-and-spend-visibility) as a metered compute entry.

## Automatic top-up

Automatic top-up keeps instances from being suspended when the balance runs low: when it falls below your threshold, your card is charged for a fixed amount. The rule is checked every hour, and once more right before any instance would be suspended, so instances stay up as long as the card charges.

* It turns on by default at your first top-up (below \$10, buy \$25), charging the most recently saved card. Adjust both amounts or turn it off at [dashboard/cloud/billing](https://www.agent37.com/dashboard/cloud/billing).
* The threshold can be \$1 to \$1000. The purchase amount follows the usual \$5 to \$1000 top-up range.
* If a charge fails, automatic top-up turns itself off and emails the workspace owner. Add funds manually, which saves a new card, then re-enable it.

## Past due and suspension

The meter is post-paid within the hour, so a busy instance can carry the balance below zero before the hourly settle catches it. When a settle leaves the wallet negative, and [automatic top-up](#automatic-top-up) is off or could not charge, the workspace's instances are suspended: running ones are force-slept, every one is flagged `past_due: true`, and the workspace owner is emailed. A request to a suspended instance's URL returns `402` with `{"error": "instance_suspended"}` instead of waking it, and suspended time is never billed.

<ResponseField name="past_due" type="boolean">
  `true` while the instance is suspended for non-payment. Cleared by topping up.
</ResponseField>

```json theme={null}
{
  "id": "ab12cd34ef",
  "status": "sleeping",
  "past_due": true
}
```

Topping up reactivates immediately: the flag clears, the meter re-anchors at the top-up (the suspended gap is never back-billed), and the next request to each instance's URL wakes it. A suspension discards no data, but the force-sleep takes no checkpoint, so the first wake after one boots fresh, like `start` after `stop`. An instance left suspended for 30 days is permanently deleted.

<Tip>
  Branch on the error `code`, not the message. See [Errors](/docs/agents-api/errors) for the full list and the response shape.
</Tip>

## Managed usage

Managed LLM, Brave search, and Composio calls debit the same wallet at cost, but only within each instance's budget: a monthly cap that resets each UTC month plus optional one-time top-up headroom. The default cap is \$0, so an instance spends nothing on managed services until you raise its cap or top it up. When a managed call is refused, the 402 reason tells you which pot ran dry: `insufficient_balance` means the wallet is empty, `instance_budget_exhausted` means the wallet has funds but the instance hit its cap. See [Budgets](/docs/agents-api/budgets) for the endpoints, rates, and both 402 reasons.

## Ledger and spend visibility

Every wallet movement is recorded: top-ups, the signup credit, and metered compute debits land in an append-only ledger, while managed usage is metered per call into its own usage ledger. Review the ledger, your balance, and the spend breakdown at [dashboard/cloud/billing](https://www.agent37.com/dashboard/cloud/billing); the [usage page](https://www.agent37.com/dashboard/cloud/usage) shows the same numbers by day, by instance, and by model for any window in the last 90 days.

### Read workspace usage

`GET /v1/usage?from=YYYY-MM-DD&to=YYYY-MM-DD` returns everything the workspace spent, by UTC day, by instance, and by model, for a window of up to 90 days. Both parameters are optional: `to` defaults to today and `from` to 30 days ending there. Deleted instances stay in the list for the days they spent. Compute lands here within the hour (it is metered per minute and settled hourly); models, search, and tools land as each call is billed.

<ResponseField name="from" type="string">
  First UTC day covered, formatted `YYYY-MM-DD`.
</ResponseField>

<ResponseField name="to" type="string">
  Last UTC day covered, inclusive.
</ResponseField>

<ResponseField name="total_micros" type="integer">
  Everything spent in the window, in USD millionths.
</ResponseField>

<ResponseField name="by_integration" type="object">
  `compute`, `llm`, `brave`, and `composio`, each with `cost_micros`. `llm` also carries `calls`, `input_tokens`, and `output_tokens`.
</ResponseField>

<ResponseField name="by_model" type="array">
  One entry per model called in the window, highest spend first: `model` (the id as the provider reports it), `cost_micros`, `calls`, `input_tokens`, `output_tokens`. Calls whose model was not recorded are grouped under `unknown`.
</ResponseField>

<ResponseField name="days" type="array">
  One entry per UTC day in the window, oldest first: `date`, `total_micros`, `compute_micros`, `llm_micros`, `brave_micros`, `composio_micros`, `llm_calls`, `input_tokens`, `output_tokens`. Days with no spend are present with zeros.
</ResponseField>

<ResponseField name="instances" type="array">
  One entry per instance that spent anything in the window, highest total first, with the same fields as a day plus the instance `id`.
</ResponseField>

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.agent37.com/v1/usage?from=2026-08-11&to=2026-09-09" \
    -H "Authorization: Bearer sk_live_..."
  ```

  ```json response theme={null}
  {
    "from": "2026-08-11",
    "to": "2026-09-09",
    "total_micros": 4858130000,
    "by_integration": {
      "compute": { "cost_micros": 2100000000 },
      "llm": { "cost_micros": 2588130000, "calls": 410212, "input_tokens": 23400000000, "output_tokens": 610000000 },
      "brave": { "cost_micros": 110000000 },
      "composio": { "cost_micros": 60000000 }
    },
    "by_model": [
      { "model": "openai/gpt-5.6-luna", "cost_micros": 2401000000, "calls": 380100, "input_tokens": 21900000000, "output_tokens": 570000000 },
      { "model": "deepseek/deepseek-v4-flash", "cost_micros": 187130000, "calls": 30112, "input_tokens": 1500000000, "output_tokens": 40000000 }
    ],
    "days": [
      {
        "date": "2026-08-11",
        "total_micros": 151200000,
        "compute_micros": 70000000,
        "llm_micros": 76200000,
        "brave_micros": 3500000,
        "composio_micros": 1500000,
        "llm_calls": 12840,
        "input_tokens": 720000000,
        "output_tokens": 19000000
      }
    ],
    "instances": [
      {
        "id": "ab12cd34ef",
        "total_micros": 312400000,
        "compute_micros": 21000000,
        "llm_micros": 291400000,
        "brave_micros": 0,
        "composio_micros": 0,
        "llm_calls": 9120,
        "input_tokens": 2100000000,
        "output_tokens": 48000000
      }
    ]
  }
  ```
</CodeGroup>

For managed spend on a single instance for one month, `GET /v1/instances/{id}/usage` returns a monthly rollup; see [Budgets](/docs/agents-api/budgets#read-managed-spend).
