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

# List account charges

> Returns fleet-run and settled setup-chat costs with the newest record first. Use `limit` and `cursor` to read more records. 



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/tenants/me/billing/charges
openapi: 3.1.0
info:
  title: agentsfleet API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/tenants/me/billing/charges:
    get:
      tags:
        - Billing
      summary: List account charges
      description: >-
        Returns fleet-run and settled setup-chat costs with the newest record
        first. Use `limit` and `cursor` to read more records. 
      operationId: get_tenant_billing_charges
      parameters:
        - name: cursor
          in: query
          description: >-
            Token from `next_cursor` in the previous response. Omit it for the
            first page.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            Number of records to return. The default is 50. Valid values are 1
            through 200.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargesResponse'
        '401':
          description: Authentication is missing, invalid, or not accepted by this endpoint
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: You do not have permission for this action
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: A request or capacity limit has been reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: An internal server error occurred
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A required service is unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    ChargesResponse:
      type: object
      description: '`GET /v1/tenants/me/billing/charges` — one page of the ledger.'
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ChargeSummary'
          description: The rows on this page, newest first.
        next_cursor:
          type:
            - string
            - 'null'
          description: |-
            Where the next page resumes, or `null` on the last page — emitted
            either way, for the module's null rule.
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    ChargeSummary:
      type: object
      description: >-
        One runtime charge or settled setup-chat cost.


        Field order is wire order — the struct is serialized straight to JSON,
        so

        the row IS the wire shape.
      required:
        - id
        - tenant_id
        - workspace_id
        - charge_type
        - posture
        - model
        - credit_deducted_nanos
        - recorded_at
      properties:
        authoring_attempt_id:
          type:
            - string
            - 'null'
          description: |-
            The setup attempt, or `null` for a fleet run. Identifies the charge
            without exposing the chat's content or depending on its retention.
        charge_type:
          type: string
          description: '`receive`, `stage`, or `authoring` (a settled setup-chat attempt).'
        credit_deducted_nanos:
          $ref: '#/components/schemas/Nanos'
          description: What this row drained, in nanos.
        event_id:
          type:
            - string
            - 'null'
          description: The event that triggered the work, or `null` for a setup chat.
        fleet_id:
          type:
            - string
            - 'null'
          description: >-
            Fleet charged for this work. Run charges retain the identifier after
            deletion. Setup

            chats use the saved fleet's identifier, or null before saving.
        fleet_name:
          type:
            - string
            - 'null'
          description: >-
            Fleet name captured when a run charge was recorded; later renames do
            not change it.


            A value equal to `fleet_id` means no name was captured. Setup chats
            show the saved

            fleet's current name, or null before saving.
        id:
          type: string
          description: The runtime ledger row's or setup settlement's identifier.
        model:
          type: string
          description: The model used by the run or setup chat.
        posture:
          type: string
          description: Whose model bill the tokens landed on.
        recorded_at:
          type: string
          format: date-time
          description: |-
            When the row was written — the walk's sort key, and what its cursor
            half is rendered from.
        tenant_id:
          type: string
          description: Whose charge it is.
        token_count_input:
          type:
            - integer
            - 'null'
          format: int64
          description: Recorded input tokens for a run or settled setup chat.
        token_count_output:
          type:
            - integer
            - 'null'
          format: int64
          description: Tokens out, likewise.
        wall_ms:
          type:
            - integer
            - 'null'
          format: int64
          description: Recorded runtime in milliseconds.
        workspace_id:
          type: string
          description: |-
            The workspace it was incurred in. It survives that workspace's
            deletion, because a charge outlives what it was incurred on.
    Nanos:
      type: string
      description: A whole number of nanos (10⁻⁹ US dollars) as a decimal string.
      pattern: ^(0|[1-9][0-9]*)$
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Send a dashboard session token, an account API key (`agt_t`), or a
        command-line credential (`afc_`) as a Bearer token. Each endpoint lists
        accepted credential types.

````

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