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

# Get billing costs

> Agent usage and credits for the current billing period.

Operation ID: get__account_billing_costs.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json get /account/billing-costs
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /account/billing-costs:
    get:
      tags:
        - Account
      summary: Get billing costs
      description: |-
        Agent usage and credits for the current billing period.

        Operation ID: get__account_billing_costs.
      operationId: get__account_billing_costs
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingCosts'
          description: Billing costs
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal error
      security:
        - bearerAuth: []
components:
  schemas:
    BillingCosts:
      properties:
        avg_credits_per_invocation:
          type: number
        billing_config:
          properties:
            billing_enabled:
              type: boolean
          required:
            - billing_enabled
          type: object
        block_reason:
          enum:
            - free_tier_exhausted
            - spending_cap_reached
            - subscription_inactive
            - not_configured
          type: string
        bonus_credits:
          minimum: 0
          type: integer
        credits_included:
          minimum: 0
          type: integer
        credits_remaining:
          minimum: 0
          type: integer
        current_tier:
          enum:
            - free
            - included
            - overage
          type: string
        effective_credits_included:
          minimum: 0
          type: integer
        has_payment_method:
          type: boolean
        input_tokens:
          type: integer
        invocation_count:
          type: integer
        is_warning_threshold:
          type: boolean
        is_within_limit:
          type: boolean
        output_tokens:
          type: integer
        overage_credits:
          minimum: 0
          type: integer
        overage_rate_cents_per_credit:
          minimum: 0
          type: number
        payg_spending_cap_cents:
          minimum: 0
          type:
            - integer
            - 'null'
        payg_spent_cents:
          minimum: 0
          type: number
        percentage_used:
          maximum: 100
          minimum: 0
          type: number
        period_end:
          type: string
        period_start:
          type: string
        total_credits_used:
          type: number
        total_duration_seconds:
          type: integer
        total_tokens:
          type: integer
      required:
        - period_start
        - period_end
        - total_credits_used
        - invocation_count
        - total_tokens
        - input_tokens
        - output_tokens
        - total_duration_seconds
        - avg_credits_per_invocation
        - billing_config
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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