Account

Where the credits went this month

By product AND by origin, so you can tell your script from your team's browser. Origin is read from the debit that paid for a job: a refund does not record which surface made it.

GET
/v1/usage
GET
/v1/usage
Where the credits went this month
By product AND by origin, so you can tell your script from your team's browser.
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
windowstring
The window report covers: this calendar month (the default), the last one, the last ninety days, or the last twelve months. One of "month", "last_month", "90d", "12m".
formatstring
csv answers one row per charged job in the window — what it cost, what came back, the key it went through and where it came in (door, the last column: desktop, api, mcp, or unknown for a key's job charged before the API and MCP were recorded apart) — instead of the document. One of "json", "csv".
Where the credits went this month
curl --request GET \
  --url 'https://api.auray.ai/v1/usage' \
  --header 'Authorization: Bearer <api-key>'
{
  "object": "<string>",
  "period": "<string>",
  "window": "<string>",
  "credits": {
    "balance": 123,
    "monthly_allowance": 123,
    "spent_this_period": 123,
    "refunded_this_period": 123,
    "net_this_period": 123,
    "waived_this_period": 123,
    "waived_jobs_this_period": 123
  },
  "by_product": [
    {
      "product": "<string>",
      "origin": "<string>",
      "spent": 123,
      "refunded": 123,
      "net": 123,
      "jobs": 123,
      "waived": 123,
      "waived_jobs": 123
    }
  ],
  "keys": {},
  "keys_truncated": true,
  "rate_limits": {},
  "warmup_ends_at": "<string>",
  "report": {},
  "note": "<string>"
}
Where the credits went this month
curl https://api.auray.ai/v1/usage \
  -H "Authorization: Bearer $AURAY_API_KEY"
{
  "object": "<string>",
  "period": "<string>",
  "window": "<string>",
  "credits": {
    "balance": 123,
    "monthly_allowance": 123,
    "spent_this_period": 123,
    "refunded_this_period": 123,
    "net_this_period": 123,
    "waived_this_period": 123,
    "waived_jobs_this_period": 123
  },
  "by_product": [
    {
      "product": "<string>",
      "origin": "<string>",
      "spent": 123,
      "refunded": 123,
      "net": 123,
      "jobs": 123,
      "waived": 123,
      "waived_jobs": 123
    }
  ],
  "keys": {},
  "keys_truncated": true,
  "rate_limits": {},
  "warmup_ends_at": "<string>",
  "report": {},
  "note": "<string>"
}

Authorizations

Authorizationstringheaderrequired

Bearer auray_sk_… — Any key. The read bucket paces it.

Query Parameters

windowstring
The window report covers: this calendar month (the default), the last one, the last ninety days, or the last twelve months. One of "month", "last_month", "90d", "12m".
formatstring
csv answers one row per charged job in the window — what it cost, what came back, the key it went through and where it came in (door, the last column: desktop, api, mcp, or unknown for a key's job charged before the API and MCP were recorded apart) — instead of the document. One of "json", "csv".

Response

application/json

OK

objectstring
One of "usage".
periodstring
windowstring
The window report covers. One of "month", "last_month", "90d", "12m".
creditsobject
Show child attributes
balanceinteger
monthly_allowanceinteger
spent_this_periodinteger
refunded_this_periodinteger
net_this_periodinteger
waived_this_periodinteger
Credits a promotion covered this period, at the price each job was charged. Jobs a promotion covers write no ledger row, so they are counted here and not in spent_this_period.
waived_jobs_this_periodinteger
How many jobs a promotion covered this period.
by_productobject[]
Show child attributes
productstring
Every product the credit ledger can charge, which is wider than the Product enum used elsewhere: usage sums the whole shared ledger. external is every model somebody else runs, submitted by its address; embeddings is POST /embeddings on the OpenAI-compatible server; the desktop's Code product charges it too, and there is no POST /code — code can be spent, but not submitted from this API. director is the AI Director's rounds in a Cinema Studio project, spent from the desktop and not submitted from this API; what it starts is charged to each model's own product. The monthly grant is not a product here; it is credits.monthly_allowance. One of "photo", "music", "video", "threed", "external", "chat", "code", "embeddings", "director".
originstring
Whether the credits went to a script or to the desktop, read from the debit that paid for the job. ui is the jobs tables' word for app and never reaches this field. The ledger's third origin, admin, marks an adjustment of ours, which is booked to the non-spendable platform product and so never appears in this list. One of "api", "app".
spentinteger
refundedinteger
netinteger
jobsinteger
waivedinteger
Credits a promotion covered for this product and origin.
waived_jobsinteger
Jobs a promotion covered for this product and origin.
keysobject[]
Your secret API keys, most recently used first and never-used ones last, at most 100, revoked ones included: each carries credits_spent_period against its own ceiling (credit_ceiling, null when the key has none). The desktop's own session keys are not listed.
keys_truncatedboolean
True when you hold more than 100 secret keys, so keys is not all of them. The ones left out are the least recently used; the credit figures above are summed from the ledger and still count every key.
rate_limitsobject
Each bucket this key is admitted from — read, write, generate, interactive and egress — as {capacity, refill_per_second}, at the strength the key is admitted at now: the plan's figures in force, and during the account's warm-up — the plan's own hours after sign-up — its warm-up share of them (limits.api.warmup on GET /v1/plans; see warmup_ends_at). egress is in megabytes. A capacity of zero is a bucket the plan does not have.
warmup_ends_atstring
When the account's warm-up ends — its plan's warm-up hours after sign-up — and rate_limits steps up to the plan's full figures; null once it has, or when the plan has no warm-up. May be null.
reportobject
The one usage document — what Account > Usage draws, for window: totals, products, origins, doors (doors: desktop, api, mcp, and unknown for a key's jobs charged before the API and MCP were recorded apart), a series, keys, models, the language models' tokens by door, the balance's purchased and granted parts, the promotion seat, and the platform's grants and adjustments. Every figure is read from the credit ledger; one that could not be read is 503 usage_unavailable, never a zero.
notestring
The caveat that belongs beside these figures: origin is taken from the debit that paid for a job, because a refund does not record which surface made it, and the numbers cover the current calendar month.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Where the credits went this month
curl https://api.auray.ai/v1/usage \
  -H "Authorization: Bearer $AURAY_API_KEY"
{
  "object": "<string>",
  "period": "<string>",
  "window": "<string>",
  "credits": {
    "balance": 123,
    "monthly_allowance": 123,
    "spent_this_period": 123,
    "refunded_this_period": 123,
    "net_this_period": 123,
    "waived_this_period": 123,
    "waived_jobs_this_period": 123
  },
  "by_product": [
    {
      "product": "<string>",
      "origin": "<string>",
      "spent": 123,
      "refunded": 123,
      "net": 123,
      "jobs": 123,
      "waived": 123,
      "waived_jobs": 123
    }
  ],
  "keys": {},
  "keys_truncated": true,
  "rate_limits": {},
  "warmup_ends_at": "<string>",
  "report": {},
  "note": "<string>"
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.