Clarity Agent Usage API

The agent-usage API from Clarity — 8 operation(s) for agent-usage.

Operations 9

GET /api/v1/agent-usage/summary Get Summary #
GET /api/v1/agent-usage/trend Get Trend #
GET /api/v1/agent-usage/breakdown Get Breakdown #
GET /api/v1/agent-usage/people Get People #
GET /api/v1/agent-usage/activity Get Activity #
GET /api/v1/agent-usage/outcomes Get Outcomes #
GET /api/v1/agent-usage/statement Get Statement #
GET /api/v1/agent-usage/digest Get Digest #
PUT /api/v1/agent-usage/digest Put Digest #

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/onclarity-com:onclarity-com-agent-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

onclarity-com-agent-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fast Agent Usage API
  version: 0.1.0
tags:
- name: agent-usage
paths:
  /api/v1/agent-usage/summary:
    get:
      tags:
      - agent-usage
      summary: Get Summary
      description: Range KPIs + the same-length prior period + a per-surface split.
      operationId: get_summary_api_v1_agent_usage_summary_get
      security:
      - HTTPBearer: []
      parameters:
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/src__agent_usage__schemas__SummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/trend:
    get:
      tags:
      - agent-usage
      summary: Get Trend
      description: Daily activity series, optionally split by surface (stacked chart).
      operationId: get_trend_api_v1_agent_usage_trend_get
      security:
      - HTTPBearer: []
      parameters:
      - name: group_by
        in: query
        required: false
        schema:
          enum:
          - none
          - surface
          type: string
          default: none
          title: Group By
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/src__agent_usage__schemas__TrendResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/breakdown:
    get:
      tags:
      - agent-usage
      summary: Get Breakdown
      description: Per-key totals of one dimension with a per-day agent-hours spark series.
      operationId: get_breakdown_api_v1_agent_usage_breakdown_get
      security:
      - HTTPBearer: []
      parameters:
      - name: by
        in: query
        required: true
        schema:
          enum:
          - surface
          - routine
          type: string
          title: By
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/src__agent_usage__schemas__BreakdownResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/people:
    get:
      tags:
      - agent-usage
      summary: Get People
      description: 'Adoption counters computed from the full team rollup + the viewer''s OWN row only

        (flat privacy rule — no other member''s activity is exposed).'
      operationId: get_people_api_v1_agent_usage_people_get
      security:
      - HTTPBearer: []
      parameters:
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PeopleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/activity:
    get:
      tags:
      - agent-usage
      summary: Get Activity
      description: 'Merged conversations + routine-runs feed, newest first. Only conversations the

        viewer owns or that were shared with them (or with everyone) are included — other

        members'' conversations never appear; routine runs are shared project config and are

        always listed.'
      operationId: get_activity_api_v1_agent_usage_activity_get
      security:
      - HTTPBearer: []
      parameters:
      - name: type
        in: query
        required: false
        schema:
          enum:
          - all
          - conversation
          - routine_run
          type: string
          default: all
          title: Type
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 25
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/src__agent_usage__schemas__ActivityResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/outcomes:
    get:
      tags:
      - agent-usage
      summary: Get Outcomes
      description: 'What the usage produced: reports, mini apps, dashboard pins, shares, files, and

        per-routine run outcomes.'
      operationId: get_outcomes_api_v1_agent_usage_outcomes_get
      security:
      - HTTPBearer: []
      parameters:
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutcomesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/statement:
    get:
      tags:
      - agent-usage
      summary: Get Statement
      description: 'Month statement as CSV. ``summary`` = day × surface totals; ``detail`` = one row

        per viewer-accessible conversation and routine run (flat privacy rule — other

        members'' conversations are not in the file).'
      operationId: get_statement_api_v1_agent_usage_statement_get
      security:
      - HTTPBearer: []
      parameters:
      - name: month
        in: query
        required: true
        schema:
          type: string
          description: Statement month, YYYY-MM (UTC-aligned)
          title: Month
        description: Statement month, YYYY-MM (UTC-aligned)
      - name: grain
        in: query
        required: false
        schema:
          enum:
          - summary
          - detail
          type: string
          default: summary
          title: Grain
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agent-usage/digest:
    get:
      tags:
      - agent-usage
      summary: Get Digest
      description: 'The viewer''s digest state. Open to every member — non-eligible viewers simply get

        ``eligible=false`` (the page hides the card) and no subscriber list.'
      operationId: get_digest_api_v1_agent_usage_digest_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigestStateResponse'
      security:
      - HTTPBearer: []
    put:
      tags:
      - agent-usage
      summary: Put Digest
      description: 'Opt the viewer in or out of the monthly usage digest (403 unless the viewer is a

        staff admin, project owner, or superuser). Syncs the managed notifications_v2 row.'
      operationId: put_digest_api_v1_agent_usage_digest_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DigestUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigestStateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    src__agent_usage__schemas__TrendPoint:
      properties:
        day:
          type: string
          format: date
          title: Day
        conversations:
          type: integer
          title: Conversations
          default: 0
        agent_turns:
          type: integer
          title: Agent Turns
          default: 0
        agent_hours:
          type: number
          title: Agent Hours
          default: 0.0
      type: object
      required:
      - day
      title: TrendPoint
    src__agent_usage__schemas__BreakdownResponse:
      properties:
        range:
          $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
        by:
          type: string
          enum:
          - surface
          - routine
          title: By
        rows:
          items:
            $ref: '#/components/schemas/src__agent_usage__schemas__BreakdownRow'
          type: array
          title: Rows
          default: []
      type: object
      required:
      - range
      - by
      title: BreakdownResponse
    UsageKpis:
      properties:
        active_users:
          type: integer
          title: Active Users
          default: 0
        conversations:
          type: integer
          title: Conversations
          default: 0
        agent_turns:
          type: integer
          title: Agent Turns
          default: 0
        routine_runs:
          type: integer
          title: Routine Runs
          default: 0
        reports_created:
          type: integer
          title: Reports Created
          default: 0
        agent_hours:
          type: number
          title: Agent Hours
          default: 0.0
      type: object
      title: UsageKpis
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    src__agent_usage__schemas__SparkPoint:
      properties:
        day:
          type: string
          format: date
          title: Day
        agent_hours:
          type: number
          title: Agent Hours
          default: 0.0
      type: object
      required:
      - day
      title: SparkPoint
    RoutineOutcomeRow:
      properties:
        routine_id:
          type: integer
          title: Routine Id
        name:
          type: string
          title: Name
        runs:
          type: integer
          title: Runs
          default: 0
        succeeded:
          type: integer
          title: Succeeded
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        needs_input:
          type: integer
          title: Needs Input
          default: 0
        last_run_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Run At
      type: object
      required:
      - routine_id
      - name
      title: RoutineOutcomeRow
    OutcomesResponse:
      properties:
        range:
          $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
        previous_range:
          anyOf:
          - $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
          - type: 'null'
        previous:
          anyOf:
          - $ref: '#/components/schemas/OutcomeCounts'
          - type: 'null'
        reports_created:
          type: integer
          title: Reports Created
          default: 0
        mini_apps_published:
          type: integer
          title: Mini Apps Published
          default: 0
        dashboard_pins:
          type: integer
          title: Dashboard Pins
          default: 0
        conversation_shares:
          type: integer
          title: Conversation Shares
          default: 0
        artifact_links:
          type: integer
          title: Artifact Links
          default: 0
        shares_created:
          type: integer
          title: Shares Created
          default: 0
        files_produced:
          type: integer
          title: Files Produced
          default: 0
        routines:
          items:
            $ref: '#/components/schemas/RoutineOutcomeRow'
          type: array
          title: Routines
          default: []
      type: object
      required:
      - range
      title: OutcomesResponse
    DigestUpdateRequest:
      properties:
        subscribed:
          type: boolean
          title: Subscribed
      type: object
      required:
      - subscribed
      title: DigestUpdateRequest
    ConversationActivity:
      properties:
        session_id:
          type: integer
          title: Session Id
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        is_visible:
          type: boolean
          title: Is Visible
          default: false
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        agent_turns:
          anyOf:
          - type: integer
          - type: 'null'
          title: Agent Turns
        owner:
          anyOf:
          - $ref: '#/components/schemas/ActorRef'
          - type: 'null'
      type: object
      required:
      - session_id
      title: ConversationActivity
    src__agent_usage__schemas__SummaryResponse:
      properties:
        range:
          $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
        previous_range:
          anyOf:
          - $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
          - type: 'null'
        current:
          $ref: '#/components/schemas/UsageKpis'
        previous:
          anyOf:
          - $ref: '#/components/schemas/UsageKpis'
          - type: 'null'
        by_surface:
          additionalProperties:
            $ref: '#/components/schemas/UsageKpis'
          type: object
          title: By Surface
          default: {}
      type: object
      required:
      - range
      - current
      title: SummaryResponse
    DigestStateResponse:
      properties:
        eligible:
          type: boolean
          title: Eligible
          default: false
        subscribed:
          type: boolean
          title: Subscribed
          default: false
        enabled:
          type: boolean
          title: Enabled
          default: false
        subscriber_count:
          type: integer
          title: Subscriber Count
          default: 0
      type: object
      title: DigestStateResponse
    src__agent_usage__schemas__DateRange:
      properties:
        from:
          type: string
          format: date
          title: From
        to:
          type: string
          format: date
          title: To
      type: object
      required:
      - from
      - to
      title: DateRange
      description: Effective (post-clamp) INCLUSIVE date range a response covers.
    DayCount:
      properties:
        day:
          type: string
          format: date
          title: Day
        count:
          type: integer
          title: Count
          default: 0
      type: object
      required:
      - day
      title: DayCount
    TrendSeries:
      properties:
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        points:
          items:
            $ref: '#/components/schemas/src__agent_usage__schemas__TrendPoint'
          type: array
          title: Points
          default: []
      type: object
      title: TrendSeries
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    src__agent_usage__schemas__ActivityResponse:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        items:
          items:
            $ref: '#/components/schemas/ActivityItem'
          type: array
          title: Items
          default: []
      type: object
      title: ActivityResponse
    src__agent_usage__schemas__BreakdownRow:
      properties:
        key:
          type: string
          title: Key
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        conversations:
          type: integer
          title: Conversations
          default: 0
        agent_turns:
          type: integer
          title: Agent Turns
          default: 0
        agent_hours:
          type: number
          title: Agent Hours
          default: 0.0
        spark:
          items:
            $ref: '#/components/schemas/src__agent_usage__schemas__SparkPoint'
          type: array
          title: Spark
          default: []
      type: object
      required:
      - key
      title: BreakdownRow
    ActorRef:
      properties:
        user_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: User Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        is_former:
          type: boolean
          title: Is Former
          default: false
      type: object
      title: ActorRef
    RoutineRunActivity:
      properties:
        run_id:
          type: integer
          title: Run Id
        routine_id:
          type: integer
          title: Routine Id
        routine_name:
          type: string
          title: Routine Name
        status:
          type: string
          title: Status
        trigger_type:
          type: string
          title: Trigger Type
        started_at:
          type: string
          format: date-time
          title: Started At
        finished_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Finished At
        duration_seconds:
          anyOf:
          - type: number
          - type: 'null'
          title: Duration Seconds
        session_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Session Id
      type: object
      required:
      - run_id
      - routine_id
      - routine_name
      - status
      - trigger_type
      - started_at
      title: RoutineRunActivity
    PersonRow:
      properties:
        user_id:
          type: integer
          title: User Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        is_former:
          type: boolean
          title: Is Former
          default: false
        conversations:
          type: integer
          title: Conversations
          default: 0
        agent_turns:
          type: integer
          title: Agent Turns
          default: 0
        agent_hours:
          type: number
          title: Agent Hours
          default: 0.0
        last_active:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Active
        is_new:
          type: boolean
          title: Is New
          default: false
        is_lapsed:
          type: boolean
          title: Is Lapsed
          default: false
      type: object
      required:
      - user_id
      title: PersonRow
    ActivityItem:
      properties:
        type:
          type: string
          enum:
          - conversation
          - routine_run
          title: Type
        ts:
          type: string
          format: date-time
          title: Ts
        conversation:
          anyOf:
          - $ref: '#/components/schemas/ConversationActivity'
          - type: 'null'
        routine_run:
          anyOf:
          - $ref: '#/components/schemas/RoutineRunActivity'
          - type: 'null'
      type: object
      required:
      - type
      - ts
      title: ActivityItem
    OutcomeCounts:
      properties:
        reports_created:
          type: integer
          title: Reports Created
          default: 0
        mini_apps_published:
          type: integer
          title: Mini Apps Published
          default: 0
        dashboard_pins:
          type: integer
          title: Dashboard Pins
          default: 0
        conversation_shares:
          type: integer
          title: Conversation Shares
          default: 0
        artifact_links:
          type: integer
          title: Artifact Links
          default: 0
        shares_created:
          type: integer
          title: Shares Created
          default: 0
        files_produced:
          type: integer
          title: Files Produced
          default: 0
      type: object
      title: OutcomeCounts
      description: The scalar outcome counts for one window — used for the prior-period comparison.
    src__agent_usage__schemas__TrendResponse:
      properties:
        range:
          $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
        group_by:
          type: string
          enum:
          - none
          - surface
          title: Group By
        series:
          items:
            $ref: '#/components/schemas/TrendSeries'
          type: array
          title: Series
          default: []
        routine_runs:
          items:
            $ref: '#/components/schemas/DayCount'
          type: array
          title: Routine Runs
          default: []
      type: object
      required:
      - range
      - group_by
      title: TrendResponse
    PeopleResponse:
      properties:
        range:
          $ref: '#/components/schemas/src__agent_usage__schemas__DateRange'
        members_total:
          type: integer
          title: Members Total
          default: 0
        active_count:
          type: integer
          title: Active Count
          default: 0
        new_count:
          type: integer
          title: New Count
          default: 0
        lapsed_count:
          type: integer
          title: Lapsed Count
          default: 0
        me:
          anyOf:
          - $ref: '#/components/schemas/PersonRow'
          - type: 'null'
      type: object
      required:
      - range
      title: PeopleResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    HTTPBasic:
      type: http
      scheme: basic