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

# Billing & Pricing

> How Declaw meters sandbox compute and guardrails scans, the per-unit rates, and how the waterfall wallet model consumes free credits before your paid balance.

Declaw Cloud bills in **microdollars** (1 USD = 1,000,000 µ\$) with second-level resolution. Every Pro and Enterprise operation is metered; every account starts with free credits. There are no fixed monthly fees — you pay only for what you run.

## Wallet model

Each account has one wallet with three separate pools that drain in a strict waterfall order:

<Steps>
  <Step title="Sandbox free credits">
    \$100 grant at account creation. Consumed first by sandbox compute charges (vCPU, memory, disk). Never refilled by deposits.
  </Step>

  <Step title="Guardrails free credits">
    \$200 grant at account creation. Consumed first by guardrails scan charges (PII, injection, etc.). Never refilled by deposits.
  </Step>

  <Step title="Paid balance">
    Single shared pool. Topped up by deposits. Used for **both** sandbox compute and guardrails charges once the respective free credits are drained.
  </Step>
</Steps>

Charges against the sandbox wallet drain `sandbox_free_micros` first, then fall through to `balance_micros`. Guardrails charges do the same with `guardrails_free_micros`. You can watch both drain in real time via [GET /accounts/:owner\_id](/platform/usage#get-accountsowner_id).

<Note>
  The $100 + $200 free credits are one-time grants. They do not refill monthly or on deposit.
</Note>

## Sandbox compute pricing

Sandbox compute is metered every **30 seconds** based on the sandbox's provisioned resources (vCPUs, memory, disk). The metering tick caps at 90 seconds of billable time to bound exposure from delayed ticks.

| Dimension      | Rate                  | Equivalent             |
| -------------- | --------------------- | ---------------------- |
| vCPU           | 14.0 µ\$ / vCPU / sec | \$0.0504 / vCPU / hour |
| Memory         | 4.5 µ\$ / GB / sec    | \$0.0162 / GB / hour   |
| Disk (overlay) | 0.0424 µ\$ / GB / sec | \$0.110 / GB / month   |

### Example

A sandbox with 2 vCPUs, 4 GB RAM, and 10 GB disk running for 1 hour costs:

```
vCPU:    2  × 14.0    × 3600 =  100,800 µ$
Memory:  4  × 4.5     × 3600 =   64,800 µ$
Disk:    10 × 0.0424  × 3600 =    1,526 µ$
                               ─────────
Total:                         ~167,126 µ$  ≈  $0.167
```

Charges accrue continuously as the sandbox runs. Killing or pausing the sandbox stops compute metering immediately. Resuming a paused sandbox resumes metering at the same rate.

## Guardrails scan pricing

Each guardrails scan is billed per invocation from the sandbox's security proxy. **Regex-based scans run locally in the proxy and are free**. Only scans dispatched to the ML guardrails service are metered:

| Scanner                             | Rate per scan | Equivalent |
| ----------------------------------- | ------------- | ---------- |
| PII (Presidio + spaCy NER)          | 600 µ\$       | \$0.0006   |
| Prompt injection (Prompt-Guard-86M) | 600 µ\$       | \$0.0006   |
| Toxicity (RoBERTa ONNX)             | 400 µ\$       | \$0.0004   |
| Code security                       | 300 µ\$       | \$0.0003   |
| Language detection (XLM-RoBERTa)    | 200 µ\$       | \$0.0002   |
| Invisible text                      | 100 µ\$       | \$0.0001   |
| Regex (local, in-proxy)             | 0             | Free       |

Guardrails charges are metered in batches every 30 seconds. The [usage endpoint](/platform/usage#get-accountsowner_idusage) returns per-scanner scan counts so you can attribute cost back to which policies were actively scanning.

## Deposits

Paid balance is topped up by explicit deposits — there is no auto-refill. Deposit amounts are bounded per tier:

| Tier       | Min deposit | Max deposit | Monthly recharge commitment |
| ---------- | ----------- | ----------- | --------------------------- |
| Free       | \$5         | \$100       | None                        |
| Pro        | \$10        | \$5,000     | \$100 / month               |
| Enterprise | Custom      | Custom      | Custom                      |

Deposits go straight into `balance_micros` and are drawn down by either sandbox or guardrails charges once free credits are exhausted.

<Warning>
  Pro and Enterprise require a **positive wallet balance** for every billable API call. If sandbox free credits + paid balance drops to zero, the API returns `402 Payment Required` on the next sandbox create, command, or filesystem call until you top up. See [Errors](/platform/errors#402-insufficient-balance) for details.
</Warning>

## What's not billed

* Sandbox list / get / kill endpoints
* Health and status checks
* Template listing and snapshot metadata
* Regex guardrails scans (always local, always free)
* Failed or rejected requests (400 / 401 / 403 / 429 responses)
* Paused sandbox time (compute metering stops at pause, resumes on resume)
