<!-- Generated from openapi/v2.json (md/account.md) — do not edit. Run: npm run generate -->

[Interactive reference](https://api-docs.syllaby.io/) · [OpenAPI 3.1 spec](https://api-docs.syllaby.io/openapi/v2.json) · [Docs index (llms.txt)](https://api-docs.syllaby.io/llms.txt)

# Account

The authenticated user — profile, per-feature credit costs, and the credit ledger.

## GET /me

**Get current account** (operationId: `getMyAccount`)

Returns the authenticated user's public account profile: identity, credit balance, and a high-level subscription summary (no billing-provider internals).

### Response `200`

```json
{
  "message": "Success.",
  "status": 200,
  "data": {
    "id": 1,
    "name": "Jane Doe",
    "email": "jane@example.com",
    "email_verified": true,
    "credits": {
      "remaining": 120,
      "total": 150,
      "extra": 0
    },
    "subscription": {
      "exists": true,
      "active": true,
      "trial": false,
      "plan": "Pro",
      "ends_at": "2026-02-01T00:00:00+00:00"
    },
    "created_at": "2026-01-01T12:00:00.000000Z",
    "updated_at": "2026-01-01T12:00:00.000000Z"
  }
}
```

### Errors

- `401` — Unauthenticated
- `429` — Rate limit exceeded — requests are limited per API token (30 per minute by default). The response carries `Retry-After` (seconds to wait) and `X-RateLimit-Reset` (Unix timestamp when the window resets); back off until then and retry. Successful responses include `X-RateLimit-Limit` and `X-RateLimit-Remaining` so you can pace requests proactively.

Error shapes and examples are shared across endpoints — see the **Error responses** section in [getting-started](getting-started.md).

## GET /credits/costs

**List credit costs** (operationId: `listCreditCosts`)

Returns the per-feature credit cost map so you can show users what each action will cost before they spend credits.

### Response `200`

```json
{
  "message": "Success.",
  "status": 200,
  "data": {
    "idea_discovery": {
      "credits": 15
    },
    "avatar": {
      "credits": 30
    },
    "faceless": {
      "credits": 13
    },
    "image_regenerations": {
      "credits": 1,
      "free": 3
    },
    "thumbnail_generation": {
      "credits": 3
    }
  }
}
```

### Errors

- `401` — Unauthenticated
- `429` — Rate limit exceeded — requests are limited per API token (30 per minute by default). The response carries `Retry-After` (seconds to wait) and `X-RateLimit-Reset` (Unix timestamp when the window resets); back off until then and retry. Successful responses include `X-RateLimit-Limit` and `X-RateLimit-Remaining` so you can pace requests proactively.

Error shapes and examples are shared across endpoints — see the **Error responses** section in [getting-started](getting-started.md).

## GET /credits/history

**List credit history** (operationId: `listCreditHistory`)

Returns the authenticated user's credit ledger (debits and credits), newest first by default. Pass `order=ASC` to reverse, and `per_page` to set the page size (default 12, max 50).

### Parameters

- `order` (query, string) — Sort direction by date. `DESC` (newest first, default) or `ASC`. Example: `DESC`
- `per_page` (query, integer) — Number of entries per page. Defaults to 12; capped at 50. Example: `12`

### Response `200`

```json
{
  "message": "Success.",
  "status": 200,
  "data": [
    {
      "label": "Faceless video",
      "content_type": "Faceless video generated",
      "credit_spend": "-30",
      "transaction_type": "Debit",
      "created_at": "2026-01-01T12:00:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 1
  }
}
```

### Errors

- `401` — Unauthenticated
- `429` — Rate limit exceeded — requests are limited per API token (30 per minute by default). The response carries `Retry-After` (seconds to wait) and `X-RateLimit-Reset` (Unix timestamp when the window resets); back off until then and retry. Successful responses include `X-RateLimit-Limit` and `X-RateLimit-Remaining` so you can pace requests proactively.

Error shapes and examples are shared across endpoints — see the **Error responses** section in [getting-started](getting-started.md).
