---
title: "My Credit Usage"
method: GET
path: "/api/my_credit_usage"
tags: ["Billing"]
---

# My Credit Usage

`GET /api/my_credit_usage`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/my_credit_usage`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)

The requesting user's rolling-7-day weekly-cap status (banner + out-of-credits popup).

Open to any authenticated user — it only ever reveals the caller's own limit
and usage (or their group pool's), never org billing data. Plain `def` on
purpose: the DuckDB open can block on the usage-writer lock, so FastAPI must
run it in the threadpool, not on the event loop. Deliberately NOT scoped by
the active_groups query param axios injects: the stream/ask enforcement paths
check against the user's full groups, and the display must match what blocks.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
