# Read the account and credit balance

`GET /api/v1/account`

- Authentication: Secret API key as a bearer token
- Billing: Free.
- Group: Account

The account behind the presented key: its name and email, the plan, the live credit balance, and the monthly free grant. Useful for dashboards and pre-flight checks before a big run. Reading the balance applies the month's free grant if it has not been applied yet.

## Example request

```bash
curl https://spaw.co/api/v1/account \
  -H "Authorization: Bearer sk_live_…"
```

## Responses

### 200 — The account.

```json
{
    "success": true,
    "data": {
        "name": "Mia Kowalski",
        "email": "mia@acme.com",
        "plan": "free",
        "credits": {
            "balance": 9,
            "monthly_grant": 10
        }
    }
}
```

### 401 — The key is missing, malformed, or revoked.

```json
{
    "success": false,
    "error": {
        "code": "UNAUTHENTICATED",
        "message": "Provide a valid API key as a bearer token.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}
```

### 429 — Over 5 requests per second for the key. Retry after the limit resets.

```json
{
    "success": false,
    "error": {
        "code": "RATE_LIMITED",
        "message": "Too many requests. Retry after the limit resets.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}
```

## Error codes

- `UNAUTHENTICATED` — https://spaw.co/docs/errors/UNAUTHENTICATED
- `RATE_LIMITED` — https://spaw.co/docs/errors/RATE_LIMITED

---

Canonical page: https://spaw.co/docs/api/get-account · OpenAPI document: https://spaw.co/openapi.json · All endpoints: https://spaw.co/docs/api
