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

# Usage and limits

> Check your API credits, daily ceiling, rate limit and fetch caps, and see where the API credits went.

## The month so far

`GET /v1/usage` is free and returns the workspace's plan, API credits used and left this month, today's use against the daily ceiling, the rate limit, today's fetch caps, the spend by operation and by client, and the price of every operation:

<CodeGroup>
  ```bash cURL theme={null}
  curl --fail-with-body -sS https://api.alura.io/v1/usage \
    -H "Authorization: Bearer $ALURA_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  interface Usage {
    plan: string;
    credits: { allowance: number; used: number; remaining: number };
    daily: { limit: number; used: number; resets_at: string } | null;
    rate_limit: { requests_per_minute: number };
    period: { end: string };
  }

  const res = await fetch('https://api.alura.io/v1/usage', { headers: { Authorization: `Bearer ${process.env.ALURA_API_KEY}` } });
  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
  const usage = (await res.json()) as Usage;

  console.log(`${usage.plan}: ${usage.credits.used} of ${usage.credits.allowance} API credits used, ${usage.credits.remaining} left until ${usage.period.end}`);
  console.log(usage.daily ? `today: ${usage.daily.used} of ${usage.daily.limit}` : 'no daily ceiling');
  console.log(`rate limit: ${usage.rate_limit.requests_per_minute} requests a minute`);
  // Every response also says what it cost and what is left.
  console.log(`this call: cost ${res.headers.get('Alura-Credits-Cost')}, remaining ${res.headers.get('Alura-Credits-Remaining')}`);
  ```

  ```python Python theme={null}
  import json
  import os
  import urllib.request

  request = urllib.request.Request(
      "https://api.alura.io/v1/usage",
      headers={"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}"},
  )
  with urllib.request.urlopen(request) as response:
      usage = json.load(response)
      headers = response.headers

  credits = usage["credits"]
  print(f"{usage['plan']}: {credits['used']} of {credits['allowance']} API credits used, {credits['remaining']} left until {usage['period']['end']}")
  daily = usage["daily"]
  print(f"today: {daily['used']} of {daily['limit']}" if daily else "no daily ceiling")
  print(f"rate limit: {usage['rate_limit']['requests_per_minute']} requests a minute")
  # Every response also says what it cost and what is left.
  print(f"this call: cost {headers['Alura-Credits-Cost']}, remaining {headers['Alura-Credits-Remaining']}")
  ```
</CodeGroup>

`credits.used` includes API credits held by calls still running, so it is what limits the next call. `daily` is `null` on Free, which has no daily ceiling. `by_client` splits the spend between `claude`, `chatgpt`, `cursor`, `script`, `other` and `unknown`.

## Where the API credits went

* `GET /v1/usage/by-day?from=2026-10-01&to=2026-10-14` returns, per day and operation, the API credits, calls, errors and average latency.
* `GET /v1/usage/events` lists every charge from the last 90 days, newest first: the operation, API credits, the item it was for, the client, the API key and the `request_id`. Filter with `operation`, `client`, `key_id`, `from` and `to`.

Both are free and need the `usage:read` scope.

## Rate limits

Each plan has a number of requests per minute, counted per API key and per workspace: Free 30, Basic 60, Growth 120 and Professional 300. Every response carries `RateLimit-Policy` and `RateLimit` headers, and over the limit the answer is `429 rate_limited` with `Retry-After`. Rate limits apply to free calls too. [Rate and fetch limits](/api-reference/rate-limits) has the headers, the fetch caps and what to do on each `429`.


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