Saperly Usage API

Read metered usage for the workspace — call and message counts, total call cost and duration, and the current prepaid balance. Aggregated over an optional time window; the balance is point-in-time.

Operations 1

GET /usage Get a usage summary (optionally since a timestamp) #

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/saperly:saperly-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

saperly-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Saperly Usage API
  version: 0.1.0
  description: 'Operations tagged usage across 2 of this provider''s published API definitions: api-saperly-com-openapi.json, saperly-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /
  description: This worker
- url: https://api.saperly.com
  description: Production
security: []
tags:
- name: Usage
  description: Read metered usage for the workspace — call and message counts, total call cost and duration, and the current prepaid balance. Aggregated over an optional time window; the balance is point-in-time.
paths:
  /usage:
    get:
      tags:
      - Usage
      operationId: usage.summary
      parameters:
      - name: since
        in: query
        schema:
          anyOf:
          - type: string
            description: Lower bound of the reporting window as an ISO-8601 timestamp (e.g. `2026-01-01T00:00:00Z`). Only usage at or after this instant is counted. Omit for all-time totals.
          - type: 'null'
        required: false
      security: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  calls:
                    type: object
                    properties:
                      count:
                        type: number
                      totalCostCents:
                        type: number
                      totalDurationSec:
                        type: number
                    required:
                    - count
                    - totalCostCents
                    - totalDurationSec
                    additionalProperties: false
                  messages:
                    type: object
                    properties:
                      count:
                        type: number
                    required:
                    - count
                    additionalProperties: false
                  balanceCents:
                    type: number
                required:
                - calls
                - messages
                - balanceCents
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: AuthorizationDenied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationDenied'
        '429':
          description: RateLimited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimited'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      summary: Get a usage summary (optionally since a timestamp)
    servers:
    - url: /
      description: This worker
components:
  schemas:
    AuthorizationDenied:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - AuthorizationDenied
        reason:
          type: string
      required:
      - _tag
      - reason
      additionalProperties: false
    RateLimited:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - RateLimited
        bucket:
          type: string
          description: The rate-limit bucket that was exhausted.
      required:
      - _tag
      - bucket
      additionalProperties: false
    Unauthorized:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - Unauthorized
        message:
          type: string
          description: Why the request was rejected (missing, invalid, or insufficient credentials).
      required:
      - _tag
      - message
      additionalProperties: false
    InternalError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - InternalError
        traceId:
          type: string
          description: A correlation id for this failure — quote it when reporting the problem so the request can be traced.
      required:
      - _tag
      - traceId
      additionalProperties: false
x-refined-from:
- api-saperly-com-openapi.json
- saperly-openapi.yml