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

# Check balance

> Read the authenticated API key owner's Agent API credits without starting work.

# Check balance

`GET /v1/balance` returns the balance owned by the supplied API key. It accepts no user or account selector, calls no image service, and costs nothing.

```bash theme={null}
curl 'https://api.dreamlayer.io/v1/balance?pricing=current' \
  -H "Authorization: Bearer $DREAMLAYER_API_KEY"
```

```json theme={null}
{
  "promotional": 0,
  "purchased": 58,
  "available": 58,
  "credit_usd": "0.15"
}
```

Use `pricing=current` for your account's current purchase rate and four-decimal credit display. The public rate is \$0.15. Accounts with an approved private rate receive their own rate. Without the parameter, the response retains `credit_usd: "0.17"` and a one-decimal display for compatibility with older CLI/MCP versions. That legacy rate is not the price of a new purchase. The `DreamLayer-Credit-Price-USD` header reports the account's current purchase rate in either mode. Neither mode changes stored funds or usage charges.

The snapshot is serialized with credit reservation, settlement, and restoration. Balances cannot be negative. Responses use `Cache-Control: private, no-store`, `Pragma: no-cache`, and `Vary: Authorization`, so shared caches must not retain one account's balance.

Compare `available` with the complete order quote in credits to decide affordability. Do not add the displayed funding buckets to calculate available funds. Other account, rate, spend, or concurrency limits can still refuse a submit. Handle the documented [error contract](/agent-api/errors) on every request.

Current balances round down to four decimal credits; stored funds keep their exact precision. New sprite charges round upward to four decimals after the whole price is calculated. For example, a public 12-frame sprite with its background kept costs \$0.44 in reference dollars, or 2.9334 API credits. Restorations return the original hold to its original funding buckets.

All rounding here is in **credits**, not dollars. A current available balance of 2.9333 cannot cover 2.9334 credits; 2.9334 can. Legacy balance reads round down to one decimal and may understate affordability for new fractional charges. Use `pricing=current` for spending decisions. A later reservation can still change availability before submission.

Promotional and purchased balances are floored independently, while `available` is the floored combined total. It can exceed the sum of the displayed buckets by 0.0001 in current mode, or 0.1 in legacy mode. That difference reflects preserved fractions, not newly granted credits.


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