Capy Usage API

The usage API from Capy — 1 operation(s) for usage.

Operations 1

GET /api/v1/usage Get usage report #

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/capy:capy-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

capy-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Capy Usage API
  version: 1.0.0
  description: Programmatic access to Capy's agent platform.
servers:
- url: https://api.capy.ai
security:
- bearerAuth: []
tags:
- name: Usage
paths:
  /api/v1/usage:
    get:
      tags:
      - Usage
      operationId: usage.get
      parameters:
      - name: from
        in: query
        schema:
          type: string
        required: false
      - name: to
        in: query
        schema:
          type: string
        required: false
      security:
      - bearerAuth: []
      responses:
        '200':
          description: UsageReport
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageReportEncoded'
        '400':
          description: capy/InvalidRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_InvalidRequestEncoded'
        '401':
          description: capy/Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_UnauthorizedEncoded'
        '403':
          description: capy/Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_ForbiddenEncoded'
        '429':
          description: capy/RateLimited
          headers:
            retry-after:
              schema:
                type: integer
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_RateLimitedEncoded'
      summary: Get usage report
components:
  schemas:
    UsageDollarsEncoded:
      type: object
      properties:
        llmDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        imageDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        vmDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        totalDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
      required:
      - llmDollars
      - imageDollars
      - vmDollars
      - totalDollars
      additionalProperties: false
    UsageMemberDollarsEncoded:
      type: object
      properties:
        principalUserId:
          anyOf:
          - type: string
          - type: 'null'
        llmDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        imageDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        vmDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        totalDollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
      required:
      - principalUserId
      - llmDollars
      - imageDollars
      - vmDollars
      - totalDollars
      additionalProperties: false
    UsageReportEncoded:
      type: object
      properties:
        from:
          type: string
        to:
          type: string
        totals:
          $ref: '#/components/schemas/UsageDollarsEncoded'
        tokens:
          $ref: '#/components/schemas/UsageTokenTotalsEncoded'
        members:
          type: array
          items:
            $ref: '#/components/schemas/UsageMemberDollarsEncoded'
        models:
          type: array
          items:
            $ref: '#/components/schemas/UsageModelDollarsEncoded'
        images:
          type: array
          items:
            $ref: '#/components/schemas/UsageImageDollarsEncoded'
      required:
      - from
      - to
      - totals
      - tokens
      - members
      - models
      - images
      additionalProperties: false
    capy_RateLimitedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - capy/RateLimited
        retryAfterSeconds:
          type: integer
      required:
      - _tag
      - retryAfterSeconds
      additionalProperties: false
    capy_UnauthorizedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - capy/Unauthorized
      required:
      - _tag
      additionalProperties: false
    UsageModelDollarsEncoded:
      type: object
      properties:
        model:
          type: string
        label:
          type: string
        dollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        unbilled:
          type: boolean
        tokens:
          $ref: '#/components/schemas/UsageTokenTotalsEncoded'
      required:
      - model
      - label
      - dollars
      - unbilled
      - tokens
      additionalProperties: false
    UsageImageDollarsEncoded:
      type: object
      properties:
        endpoint:
          type: string
        label:
          type: string
        dollars:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
      required:
      - endpoint
      - label
      - dollars
      additionalProperties: false
    capy_InvalidRequestEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - capy/InvalidRequest
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
    capy_ForbiddenEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - capy/Forbidden
      required:
      - _tag
      additionalProperties: false
    UsageTokenTotalsEncoded:
      type: object
      properties:
        inputTokens:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        outputTokens:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        cacheReadTokens:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
        cacheWriteTokens:
          anyOf:
          - type: number
          - type: string
            enum:
            - Infinity
            - -Infinity
            - NaN
      required:
      - inputTokens
      - outputTokens
      - cacheReadTokens
      - cacheWriteTokens
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Capy API key
      description: An API key created in Capy under Settings → API.
x-provenance:
  method: harvested
  publisher: Capy
  source: https://docs.capy.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)