Me

Get the caller's credit balance and usage

GET
/v1/me/credits

Balance split by bucket (cycle allowance, purchased on-demand, personal), the per-cycle allowance and on-demand unit price, and ledger totals over a window.

The window defaults to the current calendar month to date (UTC). Figures are for the caller's own membership in their active organization — the same organization the API meters requests against.

Authorization

x-api-key<token>

In: header

Query Parameters

startDate?string

Usage window start (YYYY-MM-DD, inclusive)

Match^\d{4}-\d{2}-\d{2}$/u
endDate?string

Usage window end (YYYY-MM-DD, inclusive)

Match^\d{4}-\d{2}-\d{2}$/u

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/me/credits"
{
  "allowance": {
    "perCycle": 0,
    "unitPriceCents": 0
  },
  "balance": {
    "cycle": 0,
    "onDemand": 0,
    "personal": 0,
    "total": 0
  },
  "organizationId": "string",
  "usage": {
    "granted": 0,
    "purchased": 0,
    "spent": 0,
    "spentByCategory": {
      "ai_agent": 0,
      "ai_chat": 0,
      "api": 0,
      "enrichment": 0
    },
    "window": {
      "endDate": "string",
      "startDate": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string",
  "limit": 0,
  "size": 0
}
{
  "error": "string"
}