RoxyAPI Usage API

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.

Operations 1

GET /usage Get API usage statistics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/roxyapi:roxyapi-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

roxyapi-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Roxy Usage API
  version: 2.0.0
  description: '# RoxyAPI: the Spiritual OS layer for agentic AI


    > **Base URL:** `https://roxyapi.com/api/v2`.'
  x-error-codes:
  - code: validation_error
    status: 400
    meaning: A field is missing or invalid. The body lists every failing field at once in issues, each with its path and the expected shape.
  - code: bad_request
    status: 400
    meaning: The request was rejected as a whole, for example a body that is not valid JSON or a date range that ends before it starts.
  - code: date_out_of_range
    status: 400
    meaning: A date lies outside the span the planetary positions are served for. The error names the supported dates.
  - code: api_key_required
    status: 401
    meaning: No API key was sent.
  - code: invalid_api_key
    status: 401
    meaning: The key sent is malformed or cannot be verified.
  - code: api_key_revoked
    status: 401
    meaning: The key was valid once and has since been revoked from the account page.
  - code: subscription_not_found
    status: 401
    meaning: The key verifies, but the subscription behind it no longer exists.
  - code: subscription_inactive
    status: 401
    meaning: The subscription behind the key is cancelled, expired or suspended, or a trial is past its end date.
  - code: publishable_key_not_allowed_on_mcp
    status: 401
    meaning: A publishable key was used on a Remote MCP server, which takes a secret key.
  - code: invalid_client_ip
    status: 401
    meaning: A keyless request could not be attributed to a caller.
  - code: unauthorized
    status: 401
    meaning: Authentication failed with no more specific reason to give.
  - code: forbidden
    status: 403
    meaning: The key is valid, but this request is not permitted.
  - code: origin_required
    status: 403
    meaning: A publishable key with an origin allowlist was used with no Origin header, as from a server or a native app.
  - code: origin_not_allowed
    status: 403
    meaning: The calling site is not on the origin allowlist of this publishable key.
  - code: not_found
    status: 404
    meaning: Nothing is served at this path, or the identifier in it does not exist. A path miss adds suggestions, the closest real endpoints.
  - code: method_not_allowed
    status: 405
    meaning: The path exists for a different HTTP method. The body lists the accepted methods in allow, as does the Allow header.
  - code: conflict
    status: 409
    meaning: The request cannot be applied in the current state.
  - code: gone
    status: 410
    meaning: The path was removed permanently.
  - code: payload_too_large
    status: 413
    meaning: The request body is larger than the API accepts.
  - code: unsupported_media_type
    status: 415
    meaning: 'A request with a body was sent without Content-Type: application/json.'
  - code: unprocessable_entity
    status: 422
    meaning: Every field is valid, but the combination cannot be computed.
  - code: rate_limit_exceeded
    status: 429
    meaning: The monthly request allowance is used up. Retry-After gives the seconds to the reset.
  - code: rate_limit_per_minute
    status: 429
    meaning: The per-minute limit of the plan was reached. Retry-After gives the seconds to the next minute, and the monthly allowance is not charged.
  - code: rate_limited
    status: 429
    meaning: A rate limit was reached, reported without the plan detail.
  - code: free_tier_exhausted
    status: 429
    meaning: A keyless request has used up its trial allowance.
  - code: internal_error
    status: 500
    meaning: The request failed inside our service. Retry with exponential backoff.
  - code: compute_saturated
    status: 503
    meaning: Heavy calculations are briefly at capacity. Send the same request again after Retry-After seconds.
  - code: error
    status: null
    meaning: A fallback for a status with no more specific code. The status and the error field carry the signal.
  contact:
    name: RoxyAPI Support
    url: https://roxyapi.com/contact
  license:
    name: Proprietary
    url: https://roxyapi.com/policy/terms
servers:
- url: https://roxyapi.com/api/v2
  description: Production API v2
security:
- apiKey: []
tags:
- name: Usage
  description: 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.
paths:
  /usage:
    get:
      operationId: getUsageStats
      tags:
      - Usage
      summary: Get API usage statistics
      description: '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.'
      security:
      - apiKey: []
      x-key-types:
      - secret
      responses:
        '200':
          description: Usage statistics retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  plan:
                    type: string
                    description: 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.
                    example: Pro
                  usedThisMonth:
                    type: number
                    description: 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.
                    example: 1523
                  requestsPerMonth:
                    type: number
                    description: 'Monthly request allowance for the plan. One request, API or MCP, equals one unit: there is no credit weighting and no per domain fee.'
                    example: 10000
                  remainingThisMonth:
                    type: number
                    description: 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.
                    example: 8477
                  email:
                    type: string
                    format: email
                    description: Billing email the subscription is registered under.
                    example: dev@example.com
                  status:
                    type: string
                    description: '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).'
                    example: active
                  endDate:
                    type: string
                    format: date-time
                    description: '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: '2026-09-01T00:00:00.000Z'
                required:
                - plan
                - usedThisMonth
                - requestsPerMonth
                - remainingThisMonth
                - email
                - status
                - endDate
        '400':
          description: Validation error. `issues[]` lists every failed field.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: First issue summary.
                  code:
                    type: string
                    enum:
                    - validation_error
                  doc_url:
                    type: string
                    description: Absolute URL of the documented explanation of this code, anchored at the code itself, for example https://roxyapi.com/docs/errors#not_found.
                  issues:
                    type: array
                    description: Every validation failure. Use this to rebuild a valid request.
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          description: Dot-separated field path, or "(root)" for top-level.
                        message:
                          type: string
                        code:
                          type: string
                          description: Zod issue code (invalid_type, too_small, too_big, invalid_string, ...).
                        expected:
                          type: string
                          description: Expected type for invalid_type.
                        minimum:
                          description: Minimum bound for too_small issues.
                          oneOf:
                          - type: number
                          - type: string
                        maximum:
                          description: Maximum bound for too_big issues.
                          oneOf:
                          - type: number
                          - type: string
                        inclusive:
                          type: boolean
                        format:
                          type: string
                          description: Format name for string issues (regex, email, url, uuid).
                        pattern:
                          type: string
                          description: Regex pattern when format is regex.
                      required:
                      - path
                      - message
                required:
                - error
                - code
                - doc_url
                - issues
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message. May change wording.
                  code:
                    type: string
                    description: Machine-readable error code. Stable identifier.
                  doc_url:
                    type: string
                    description: Absolute URL of the documented explanation of this code, anchored at the code itself, for example https://roxyapi.com/docs/errors#not_found.
                required:
                - error
                - code
                - doc_url
        '404':
          description: Subscription not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '405':
          description: Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.
          headers:
            Allow:
              description: Comma-separated list of allowed methods (RFC 9110).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                    - method_not_allowed
                  doc_url:
                    type: string
                    description: Absolute URL of the documented explanation of this code, anchored at the code itself, for example https://roxyapi.com/docs/errors#not_found.
                  allow:
                    type: array
                    items:
                      type: string
                    description: Allowed HTTP methods for this path. Mirrors the Allow response header.
                  docs:
                    type: string
                    description: Link to the product page for this domain.
                required:
                - error
                - code
                - doc_url
                - allow
        '429':
          description: Monthly rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message. May change wording.
                  code:
                    type: string
                    description: Machine-readable error code. Stable identifier.
                  doc_url:
                    type: string
                    description: Absolute URL of the documented explanation of this code, anchored at the code itself, for example https://roxyapi.com/docs/errors#not_found.
                required:
                - error
                - code
                - doc_url
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message. May change wording.
                  code:
                    type: string
                    description: Machine-readable error code. Stable identifier.
                  doc_url:
                    type: string
                    description: Absolute URL of the documented explanation of this code, anchored at the code itself, for example https://roxyapi.com/docs/errors#not_found.
                required:
                - error
                - code
                - doc_url
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key for accessing RoxyAPI. Alternatively, you can pass the API key as a query parameter "api_key".
externalDocs:
  description: Complete API Documentation with Examples
  url: https://roxyapi.com/docs