# Usage & spending

Every gateway call counts towards two things \u2014 your plan's rate limits and your metered spend. Here's how to see and control both.

## Where to see it

- Dashboard → Overview — six-month activity heatmap.
- Dashboard → Usage — per-day breakdown of requests and tokens.
- Dashboard → Spending — per-day USD breakdown grouped by model.
- Dashboard → Billing — invoices and payment methods.

## What gets metered

### Tokens

Every chat completion is billed by token, split into input (the prompt) and output (the completion). Pricing per 1,000 tokens depends on the model — see /v1/models.

### Requests

Each HTTP call counts as one request, regardless of token volume. Requests are what your plan’s rate limits gate.

### Cloud agent runs

Cloud agent runs charge for the model tokens they consume plus a small per-run platform fee (currently $0.001 per run on paid plans, free on Free).

## Pulling usage programmatically

```
curl "https://api.foxora.ai/v1/me/usage?days=30" \
  -H "Authorization: Bearer $FOXORA_API_KEY"
```

Returns an array of day buckets with request count, input/output tokens, and USD spend. The dashboard heatmap and graphs are built from this exact endpoint.

## Spend caps

Set a monthly USD ceiling in Billing → Spend cap. When you hit it, gateway requests start returning 402 until the next billing cycle (or until you raise the cap). Requests that would push you past the cap are rejected before they leave the gateway, so you’re never charged for them.

> Free plans always have a capFree accounts have a built-in $1 monthly model-credit cap that can’t be raised. To go higher, upgrade to Pro.

## Invoices

Invoices arrive on the first of each month for the previous month’s usage. They’re downloadable as PDF from Billing → Invoices and emailed to your account address.
