> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kiteml.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Usage

> Per-day token usage (default: the last 30 days), per resource family, API key or source.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/usage
openapi: 3.1.0
info:
  title: Kite Platform API
  description: >-
    Public API for Kite. Authenticate with `Authorization: Bearer kite_...`, and
    send `Kite-Version: 2026-10-12` to pin the dated contract your code was
    written against (without it you get 2026-09-27). Every response carries the
    version that served it.
  version: '2026-10-12'
servers:
  - url: https://api.kiteml.com
    description: Kite Platform API
security:
  - bearerAuth: []
tags:
  - name: Augmentations
    description: Beta. Generate new episodes from a LeRobot dataset.
  - name: Training runs
    description: Fine-tune a policy on a dataset, one run per policy.
  - name: Twins
    description: >-
      Rebuild a robot episode as an interactable MuJoCo scene (beta, enabled per
      account).
  - name: RL runs
    description: >-
      Train a robot policy in simulation from a task spec; get the policy, its
      scene and a verdict.
  - name: Evaluations
    description: >-
      Evaluate a policy on a Kite SDK spec on Kite's machines: episodes,
      evaluators and a scorecard (beta).
  - name: Objects and environments
    description: Register your own objects and background scenes (beta).
  - name: Augmentation environments
    description: >-
      What an augmentation puts behind the work cell: from Kite's library, a
      photo, a prompt or a panorama (beta, enabled per account).
  - name: Catalog
    description: Policies, hardware tiers, and dataset inspection.
  - name: Operations
    description: Poll any run by its id.
  - name: Webhooks
    description: Endpoints that receive events, and the event log.
  - name: API keys
    description: The key making the request.
  - name: Usage
    description: Token usage and credit balance.
  - name: Requests
    description: >-
      The request log: every call of the last 30 days, who made it and how it
      ended.
  - name: Status
    description: Whether Kite is up, part by part. Needs no key.
paths:
  /v1/usage:
    get:
      tags:
        - Usage
      summary: Get Usage
      description: >-
        Per-day token usage (default: the last 30 days), per resource family,
        API key or source.
      operationId: get_usage_v1_usage_get
      parameters:
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Start
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: End
        - name: group_by
          in: query
          required: false
          schema:
            enum:
              - resource
              - api_key
              - source
            type: string
            description: >-
              Group each day's tokens by resource family, by the API key that
              started the runs, or by where they were started
            default: resource
            title: Group By
          description: >-
            Group each day's tokens by resource family, by the API key that
            started the runs, or by where they were started
        - name: api_key_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only the runs this API key started
            title: Api Key Id
          description: Only the runs this API key started
        - name: source
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - api
                  - cli
                  - mcp
                  - sdk
                  - dashboard
                  - unknown
                type: string
              - type: 'null'
            description: >-
              Only the runs started from this surface: the API, CLI, MCP server,
              Python SDK or the console. `unknown` is the work whose surface was
              never recorded (before October 2026, and worlds and motions), so
              the sources add up to the whole account
            title: Source
          description: >-
            Only the runs started from this surface: the API, CLI, MCP server,
            Python SDK or the console. `unknown` is the work whose surface was
            never recorded (before October 2026, and worlds and motions), so the
            sources add up to the whole account
        - $ref: '#/components/parameters/KiteVersion'
      responses:
        '200':
          description: Token usage in the range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Usage'
              example:
                data:
                  - date: '2026-09-27'
                    resource: augmentations
                    tokens_consumed: 32670
                    tokens_net: 21780
                    tokens_refunded: 10890
                end: '2026-09-27'
                object: usage
                start: '2026-09-01'
                totals:
                  tokens_consumed: 32670
                  tokens_net: 21780
                  tokens_refunded: 10890
        '400':
          description: >-
            Invalid request (`parameter_invalid`, `unsupported_version`, ...);
            `param` names the field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Missing or invalid API key (`unauthenticated`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The key lacks a scope this route needs (`missing_scope`), or the
            feature is not enabled for the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '429':
          description: >-
            Rate or concurrency limited (`rate_limit_exceeded`,
            `concurrency_limit_exceeded`, `capacity_exceeded`); honor
            `Retry-After`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  parameters:
    KiteVersion:
      name: Kite-Version
      in: header
      required: false
      description: >-
        The dated contract your code was written against. Without it you get
        2026-09-27; every response says which version served it.
      schema:
        type: string
        enum:
          - '2026-09-27'
          - '2026-10-12'
        default: '2026-09-27'
  schemas:
    Usage:
      properties:
        object:
          type: string
          enum:
            - usage
          const: usage
          title: Object
          default: usage
        start:
          type: string
          title: Start
          description: YYYY-MM-DD, inclusive
        end:
          type: string
          title: End
          description: YYYY-MM-DD, inclusive
        data:
          items:
            anyOf:
              - $ref: '#/components/schemas/UsageDay'
              - $ref: '#/components/schemas/UsageDayByKey'
              - $ref: '#/components/schemas/UsageDayBySource'
          type: array
          title: Data
          description: >-
            One row per day and group with any usage, oldest first. The group
            field is `resource`, `api_key_id` or `source`, as `group_by` asks
        totals:
          $ref: '#/components/schemas/UsageTotals'
      type: object
      required:
        - start
        - end
        - data
        - totals
      title: Usage
      description: Tokens used per day, grouped by resource family, API key or source.
      examples:
        - data:
            - date: '2026-09-27'
              resource: augmentations
              tokens_consumed: 32670
              tokens_net: 21780
              tokens_refunded: 10890
          end: '2026-09-27'
          object: usage
          start: '2026-09-01'
          totals:
            tokens_consumed: 32670
            tokens_net: 21780
            tokens_refunded: 10890
    ApiErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      type: object
      required:
        - error
      title: ApiErrorResponse
      description: Every /v1 error has this shape.
    UsageDay:
      properties:
        date:
          type: string
          title: Date
          description: YYYY-MM-DD (UTC)
        resource:
          type: string
          title: Resource
          description: >-
            `augmentations`, `training`, `rl_runs`, `evaluations`, `twins`,
            `worlds`, or `other`
        tokens_consumed:
          type: integer
          title: Tokens Consumed
        tokens_refunded:
          type: integer
          title: Tokens Refunded
          description: >-
            Returned for failed or unused work. Plan token grants are credits,
            not usage, and are not counted
        tokens_net:
          type: integer
          title: Tokens Net
          description: '`tokens_consumed` − `tokens_refunded`'
      type: object
      required:
        - date
        - resource
        - tokens_consumed
        - tokens_refunded
        - tokens_net
      title: UsageDay
      description: >-
        A day of usage for one resource family (`group_by=resource`, the
        default).
    UsageDayByKey:
      properties:
        date:
          type: string
          title: Date
          description: YYYY-MM-DD (UTC)
        api_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Id
          description: >-
            The key that started the runs the tokens paid for. Null for work no
            API key started through /v1: runs started while signed in to Kite,
            and runs from before usage was attributed
        tokens_consumed:
          type: integer
          title: Tokens Consumed
        tokens_refunded:
          type: integer
          title: Tokens Refunded
        tokens_net:
          type: integer
          title: Tokens Net
      type: object
      required:
        - date
        - api_key_id
        - tokens_consumed
        - tokens_refunded
        - tokens_net
      title: UsageDayByKey
      description: A day of usage for one API key (`group_by=api_key`).
    UsageDayBySource:
      properties:
        date:
          type: string
          title: Date
          description: YYYY-MM-DD (UTC)
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            Where the runs were started: `api` (your own code, with a key),
            `cli`, `mcp`, `sdk`, or `dashboard` (signed in to Kite). Null for
            work whose surface was never recorded, which `source=unknown`
            filters to
        tokens_consumed:
          type: integer
          title: Tokens Consumed
        tokens_refunded:
          type: integer
          title: Tokens Refunded
        tokens_net:
          type: integer
          title: Tokens Net
      type: object
      required:
        - date
        - source
        - tokens_consumed
        - tokens_refunded
        - tokens_net
      title: UsageDayBySource
      description: A day of usage for one source (`group_by=source`).
    UsageTotals:
      properties:
        tokens_consumed:
          type: integer
          title: Tokens Consumed
        tokens_refunded:
          type: integer
          title: Tokens Refunded
        tokens_net:
          type: integer
          title: Tokens Net
      type: object
      required:
        - tokens_consumed
        - tokens_refunded
        - tokens_net
      title: UsageTotals
    ApiErrorBody:
      properties:
        type:
          type: string
          title: Type
          description: >-
            invalid_request_error, authentication_error, permission_error,
            not_found_error, conflict_error, rate_limit_error, or api_error
        code:
          type: string
          title: Code
          description: 'Machine-readable: branch on this, not on the message'
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: The request field the error is about, when there is one
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Also in the X-Request-Id header; quote it to support
        details:
          anyOf:
            - type: object
            - type: 'null'
          title: Details
          description: >-
            Extra data for some codes (e.g. the cameras a dataset does have, for
            camera_not_found)
      type: object
      required:
        - type
        - code
        - message
      title: ApiErrorBody
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Kite API key (`kite_...`), from **Platform API → Keys** in the
        dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.