APIPASS API Marketplace Usage API

The Usage API from APIPASS API Marketplace — 6 operation(s) for usage.

Operations 6

GET /api/v1/usage/api-endpoints Get Api Endpoint Usage #
GET /api/v1/usage/per-key-breakdown Get Per Key Breakdown #
GET /api/v1/usage/claude-statistics Get Claude Statistics #
GET /api/v1/usage/logs Get Logs #
POST /api/v1/usage/logs/{task_id}/retry-callback Retry Task Callback #
GET /api/v1/usage/key-usage Get Key Usage #

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

apipass-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ApiPass Platform Usage API
  version: 1.0.0
tags:
- name: Usage
paths:
  /api/v1/usage/api-endpoints:
    get:
      tags:
      - Usage
      summary: Get Api Endpoint Usage
      description: '获取API端点使用统计


        通过 api_key + user_id 验证身份,返回该用户全部 active keys 的使用统计。'
      operationId: get_api_endpoint_usage_api_v1_usage_api_endpoints_get
      parameters:
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          description: API Key字符串
          title: Api Key
        description: API Key字符串
      - name: user_id
        in: query
        required: true
        schema:
          type: string
          description: 用户ID
          title: User Id
        description: 用户ID
      - name: days
        in: query
        required: false
        schema:
          type: integer
          description: 统计天数
          default: 30
          title: Days
        description: 统计天数
      - name: model_type_id
        in: query
        required: false
        schema:
          type: string
          description: 可选:指定模型类型ID进行过滤
          title: Model Type Id
        description: 可选:指定模型类型ID进行过滤
      - name: include_claude
        in: query
        required: false
        schema:
          type: boolean
          description: 是否包含Claude用量
          default: true
          title: Include Claude
        description: 是否包含Claude用量
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/usage/per-key-breakdown:
    get:
      tags:
      - Usage
      summary: Get Per Key Breakdown
      description: '按 API Key 维度返回用量汇总


        通过 api_key + user_id 验证身份,返回该用户全部 active keys 的分 key 数据。'
      operationId: get_per_key_breakdown_api_v1_usage_per_key_breakdown_get
      parameters:
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          description: API Key字符串
          title: Api Key
        description: API Key字符串
      - name: user_id
        in: query
        required: true
        schema:
          type: string
          description: 用户ID
          title: User Id
        description: 用户ID
      - name: days
        in: query
        required: false
        schema:
          type: integer
          description: 统计天数
          default: 30
          title: Days
        description: 统计天数
      - name: include_claude
        in: query
        required: false
        schema:
          type: boolean
          description: 是否包含Claude用量
          default: true
          title: Include Claude
        description: 是否包含Claude用量
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/usage/claude-statistics:
    get:
      tags:
      - Usage
      summary: Get Claude Statistics
      description: '获取Claude使用统计


        通过 api_key + user_id 验证身份,返回该用户全部 active keys 的 Claude 使用统计。'
      operationId: get_claude_statistics_api_v1_usage_claude_statistics_get
      parameters:
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          description: API Key字符串
          title: Api Key
        description: API Key字符串
      - name: user_id
        in: query
        required: true
        schema:
          type: string
          description: 用户ID
          title: User Id
        description: 用户ID
      - name: days
        in: query
        required: false
        schema:
          type: integer
          description: 统计天数
          default: 30
          title: Days
        description: 统计天数
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/usage/logs:
    get:
      tags:
      - Usage
      summary: Get Logs
      description: '获取任务日志


        通过 api_key + user_id 验证身份,返回该用户所有 key 的日志。'
      operationId: get_logs_api_v1_usage_logs_get
      parameters:
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          description: API Key字符串
          title: Api Key
        description: API Key字符串
      - name: user_id
        in: query
        required: true
        schema:
          type: string
          description: 用户ID
          title: User Id
        description: 用户ID
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: 页码
          default: 1
          title: Page
        description: 页码
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: 每页数量
          default: 20
          title: Page Size
        description: 每页数量
      - name: model
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 可选:按模型名称模糊筛选
          title: Model
        description: 可选:按模型名称模糊筛选
      - name: filter_api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 可选:按 API Key 精确筛选
          title: Filter Api Key
        description: 可选:按 API Key 精确筛选
      - name: task_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 可选:按 task_id 精确筛选
          title: Task Id
        description: 可选:按 task_id 精确筛选
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 可选:按状态筛选
          title: Status
        description: 可选:按状态筛选
      - name: created_from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: 可选:创建时间起始
          title: Created From
        description: 可选:创建时间起始
      - name: created_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: 可选:创建时间结束
          title: Created To
        description: 可选:创建时间结束
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/usage/logs/{task_id}/retry-callback:
    post:
      tags:
      - Usage
      summary: Retry Task Callback
      description: '重新向用户 callback_url 发送当前任务状态。


        使用 Supabase 登录态鉴权,只允许操作当前用户自己的任务。'
      operationId: retry_task_callback_api_v1_usage_logs__task_id__retry_callback_post
      security:
      - HTTPBearer: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryCallbackRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/usage/key-usage:
    get:
      tags:
      - Usage
      summary: Get Key Usage
      description: 通过 API Key 字符串 + User ID 查询该 key 的用量汇总
      operationId: get_key_usage_api_v1_usage_key_usage_get
      parameters:
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          description: API Key 字符串
          title: Api Key
        description: API Key 字符串
      - name: user_id
        in: query
        required: true
        schema:
          type: string
          description: 用户 ID
          title: User Id
        description: 用户 ID
      - name: days
        in: query
        required: false
        schema:
          type: integer
          description: 统计天数
          default: 30
          title: Days
        description: 统计天数
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    RetryCallbackRequest:
      properties:
        callback_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Callback Url
          description: 可选:覆盖任务原有 callback_url
      type: object
      title: RetryCallbackRequest
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer