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

# Credentials and billing

> Check balances, credential usage, and a task's final charge.

| Method and path | What it returns |
| - | - |
| `GET /v1/credentials/balance` | Available and reserved balance and credential limits. |
| `GET /v1/credentials/usage` | Recent usage scoped to the current credential. |
| `GET /v1/tasks/{task_id}/billing` | The specified task's reserved amount and final charge. |

Use the submitting credential to read task billing. OAuth financial reads require `billing:read`.

```bash theme={null}
curl -fsS "https://api.mouter.ai/v1/tasks/${TASK_ID}/billing" \
  -H "Authorization: Bearer ${MOUTER_API_KEY}"
```

The task billing response returns `reserved_amount` and `charged_amount` as JSON numbers in Credits, with up to four decimal places. A pending charge is `null`. A settled charge can be zero.

## Credit amounts and legacy quota fields

Balance and usage responses now include `*_amount` fields in Credits, the same unit as task billing. Amounts are JSON numbers with up to four decimal places, and each response carries `unit: "credit"`. The earlier `*_quota` fields are still returned for compatibility. Prefer the `*_amount` fields in new integrations.

| Endpoint | Credit field | Legacy field |
| - | - | - |
| `GET /v1/credentials/balance` | `wallet.available_amount`, `wallet.reserved_amount` | `wallet.available_quota`, `wallet.reserved_quota` |
| `GET /v1/credentials/balance` | `credential.limit_amount`, `spent_amount`, `reserved_amount`, `available_amount` | `credential.limit_quota`, `spent_quota`, `reserved_quota`, `available_quota` |
| `GET /v1/credentials/usage` | `charged_amount`, `reserved_amount` (per item) | `charged_quota`, `reserved_quota` |

A `null` credential `limit_amount` or `available_amount` means the credential has no cap of its own. It does not grant wallet credit. `quota_per_usd` is unchanged and remains for compatibility.

```json theme={null}
{
  "code": 0,
  "message": "",
  "data": {
    "wallet": {
      "available_quota": 930000,
      "reserved_quota": 70000,
      "available_amount": 93,
      "reserved_amount": 7
    },
    "credential": {
      "limit_quota": 500000,
      "spent_quota": 0,
      "reserved_quota": 70000,
      "available_quota": 430000,
      "limit_amount": 50,
      "spent_amount": 0,
      "reserved_amount": 7,
      "available_amount": 43
    },
    "unit": "credit",
    "quota_per_usd": 1000000
  },
  "request_id": "req_example"
}
```

Read amounts with a decimal JSON parser when you reconcile exact values; a binary float can round very large amounts.


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