# Usage API Reference

> Monitor your API usage, check rate limits, and track request consumption. Get detailed usage breakdowns by endpoint, current month statistics, and recommendations for plan upgrades when approaching limits. Essential for managing API quotas and optimizing subscription plans.

## Get API usage statistics

`GET https://roxyapi.com/api/v2/usage`. MCP tool `get_usage`.

Returns the live quota position for the API key on the request: plan name, billable requests used in the current UTC calendar month, the monthly allowance, and how many requests remain. It also returns the subscription status, billing email and the date the current billing period ends, so a dashboard can show quota and renewal together. Poll it to drive usage meters, low balance warnings, and upgrade prompts before a 429 ever happens.

### Response

- `plan` (string, required): Name of the subscription plan the API key belongs to. One flat plan covers every domain and the Remote MCP servers, so this is a quota tier, never a per product entitlement.
- `usedThisMonth` (number, required): Billable requests counted against the current calendar month. The quota window is the UTC calendar month and resets on the 1st at 12:00 AM UTC, never on your renewal date, so an annual plan refills every month and a plan bought mid month still refills on the 1st. Read from the durable request ledger, which can trail the live limiter by up to 5 minutes; for the exact live position read the X-RateLimit-Used header on any response, including this one. Cached responses still count; a request that failed on our side with a 5xx never does.
- `requestsPerMonth` (number, required): Monthly request allowance for the plan. Every data endpoint call, API or MCP, is one request and a report spends the cost its operation lists in x-request-cost: there is no per domain fee.
- `remainingThisMonth` (number, required): Requests left before the monthly allowance is exhausted, floored at zero. Equal to requestsPerMonth minus usedThisMonth. Refills at the calendar month rollover, whose exact instant every API response carries as a Unix timestamp in the X-RateLimit-Reset header.
- `email` (string (email), required): Billing email the subscription is registered under.
- `status` (string, required): Subscription lifecycle state. Values: active, cancelled (no longer renewing but usable until endDate), suspended (payment failed, usable until endDate), expired (past endDate), pending (checkout started, payment not captured).
- `endDate` (string (date-time), required): ISO 8601 timestamp when the current billing period ends. A renewal extends this date in place. API access survives a cancelled or suspended status until this moment passes. This is a BILLING date, not a quota date: the monthly allowance resets on the 1st of each month independently of it.

### Example request

```bash
curl "https://roxyapi.com/api/v2/usage" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "plan": "Pro",
  "usedThisMonth": 1523,
  "requestsPerMonth": 10000,
  "remainingThisMonth": 8477,
  "email": "dev@example.com",
  "status": "active",
  "endDate": "2026-09-01T00:00:00.000Z"
}
```
