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

# Usage

> Get your Stophy credit balance and lifetime usage with one API call: credits left, credits used and how many requests you have made.

Returns your current balance and totals for every call you have paid for. Needs an API key. Free.

<ResponseField name="balanceMicros" type="integer" required>
  Your balance in millionths of a dollar. `1000000` is \$1.
</ResponseField>

<ResponseField name="creditsUsed" type="integer" required>
  Credits used by all your calls so far.
</ResponseField>

<ResponseField name="requestCount" type="integer" required>
  How many paid calls you have made.
</ResponseField>

<RequestExample>
  ```bash cURL icon="terminal" theme={null}
  curl https://api.stophy.dev/v1/usage \
    -H "Authorization: Bearer $STOPHY_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "balanceMicros": 0,
    "creditsUsed": 0,
    "requestCount": 0
  }
  ```
</ResponseExample>

This response is not wrapped in `success` and `data`. Without a valid key it answers `401` with code `unauthorized`.
