Usage API Reference: every endpoint, tested live | RoxyAPI
Skip to content

API Reference

Usage

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.

Kept in this tab only. Without a key, a small daily allowance still answers every request on this page.

Get API usage statistics

GET
https://roxyapi.com/api/v2/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.

Call it

TypeScript
import { createRoxy } from '@roxyapi/sdk'

const roxy = createRoxy(process.env.ROXY_API_KEY!)
const { data } = await roxy.usage.getUsageStats()

Install: npm install @roxyapi/sdk

Typed SDKs in 6 languages.

Response fields

FieldTypeDescription
plan
required
stringName 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
required
numberBillable 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
required
numberMonthly request allowance for the plan. One request, API or MCP, equals one unit: there is no credit weighting and no per domain fee.
remainingThisMonth
required
numberRequests 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
required
string (email)Billing email the subscription is registered under.
status
required
stringSubscription 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
required
string (date-time)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 response

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