# Usage

> Draft

`GET https://paperpurr.com/v1/usage`

See your plan, how much of this month’s trial allowance you’ve used and have left, and your rate limit. This endpoint is free.

## Examples

curl:

```bash
curl "https://paperpurr.com/v1/usage" \
  -H "Authorization: Bearer $PAPERPURR_API_KEY"
```

Python:

```python
import os
import requests

r = requests.get(
    "https://paperpurr.com/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['PAPERPURR_API_KEY']}"},
)
print(r.json())
```

JS:

```javascript
const r = await fetch("https://paperpurr.com/v1/usage", {
  headers: {
    Authorization: `Bearer ${process.env.PAPERPURR_API_KEY}`,
  },
});
console.log(await r.json());
```

## Response

```json
{
  "plan": "std",
  "period": {
    "start": "2026-12-01T00:00:00.000Z",
    "end": "2027-01-01T00:00:00.000Z"
  },
  "trial": {
    "included": 500,
    "used": 5,
    "remaining": 495
  },
  "balance": {
    "units": 0
  },
  "rate_limit": {
    "requests": 60,
    "window_seconds": 60
  },
  "units": {
    "citations.lookup": "1 / 次",
    "citations.verify": "1 / 条（skipped、error 不计）"
  },
  "request_id": "req_09fe6b31c2d84a7e5f10b3c6"
}
```

> **Note:** Numbers in examples are illustrative. Real allowances are announced at launch.

- `plan` (string, required) — Your plan ID. `free` means no paid subscription and no trial allowance
- `period` (object, required) — The trial period: the calendar month in UTC
  - `start` (string, required) — Start (ISO 8601)
  - `end` (string, required) — End (ISO 8601), when the allowance resets
- `trial` (object, required) — The API trial allowance included with your plan, in units
  - `included` (integer, required) — Units included this month
  - `used` (integer, required) — Units used this month
  - `remaining` (integer, required) — Units left this month
- `balance.units` (integer, required) — Word pack balance. Word packs go on sale at launch, so this is 0 for now
- `rate_limit` (object, required) — This key’s rate limit
  - `requests` (integer, required) — Requests allowed per window
  - `window_seconds` (integer, required) — Window length in seconds
- `units` (object, required) — How each endpoint is metered, as human-readable text (currently in Chinese). Don’t parse it; see [Rate limits and metering](https://paperpurr.com/en/docs/limits) for the rules
- `request_id` (string, required) — Request ID

## Possible errors

| Status | code | Cause | What to do |
| --- | --- | --- | --- |
| `429` | `rate_limit_exceeded` | A rate limit was hit (per IP, per key or per account). `message` says which. | Wait the number of seconds in `Retry-After`, then retry. Queue requests if several processes share one key. |
| `503` | `coming_soon` | The API isn’t open yet. Every `/v1` and `/mcp` call returns this for now. | [Join the waitlist](https://paperpurr.com/#api). We’ll announce the launch on Discord. |
| `503` | `maintenance` | Under maintenance. | Retry later. |
| `503` | `busy` | The service is busy. Billable calls also return this when usage can’t be recorded, and nothing is charged. | Retry with backoff. |
| `503` | `not_configured` | The service is temporarily unavailable. | Retry later. |

## Metering

- Free, but counts toward your rate limit.
- Every billable response includes `usage`, so you don’t need to call this after each request.

Next: [Rewrite (async)](https://paperpurr.com/en/docs/rewrite.md)
