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

# Usage

> Current billing cycle of the calling key: plan, credits used, limit and remaining, request count. Free.

`GET /v1/usage`

Current billing cycle of the calling key: plan, credits used, limit and remaining, request count. The programmatic view of your own key and account, the data behind a usage dashboard. Free: never billed, and still reachable when the monthly credit allowance is exhausted (when billable endpoints answer `402`), so you can always inspect your own state. A key only ever sees its own account.

<Note>`month` is the current billing cycle (`YYYYMM`, calendar month, UTC). For keys created in the portal, `scope` is `"account"`: `credits` and `requests` cover the whole account (all its keys share one allowance), `tenant` is the account id and `credits.limit` is what the account can use this month (free credits left plus what the spend cap allows). Contract keys report `scope: "key"` and their own figures; on an unlimited contract, `credits.limit` and `credits.remaining` are `null`.</Note>

<Note>The same figure is on every billable response: the `X-Credits-Remaining` header carries the credits left in the current cycle.</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://api.serialized.xyz/v1/usage' \
    -H 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "keyId": "7c21e4b09d5a",
      "tenant": "acc_5d1e9b2a7c40f316",
      "plan": "payg",
      "month": "202609",
      "scope": "account",
      "credits": {
        "used": 14530,
        "limit": 1000000,
        "remaining": 985470
      },
      "requests": 5020
    },
    "meta": {
      "asOf": 1788980722243
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.json GET /v1/usage
openapi: 3.1.0
info:
  title: Serialized Data API
  description: >-
    On-chain data for trading apps - tokens, candles, token filters. Built on
    our own indexers. 18 EVM chains + Solana, live.
  version: 0.1.0
servers:
  - url: https://demo.serialized.xyz
    description: 'Demo: no key needed, read endpoints, rate-limited per IP'
  - url: https://api.serialized.xyz
    description: 'Production: your API key in the Authorization header'
security:
  - apiKey: []
  - {}
paths:
  /v1/usage:
    get:
      summary: Usage
      description: >-
        Current billing cycle of the calling key: plan, credits used, limit and
        remaining, request count. Free.
      operationId: usage
      responses:
        '200':
          description: Standard `{ data, meta }` envelope.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: Your raw API key (not needed on the demo server).

````

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