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

# Get Billing Info

> Returns credits remaining, credits used, and subscription status for the organization. The organization is automatically determined from the API key. Only organization-scoped API keys are supported.



## OpenAPI

````yaml get /test_framework/billing/info/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/billing/info/:
    get:
      tags:
        - test_framework
      summary: Get billing information
      description: >-
        Returns credits remaining, credits used, balance expiry, and
        subscription status for an organization. When called with an
        organization-scoped API key, the org is taken from the key. When called
        with a user session or OAuth bearer, pass `organization_id` as a query
        parameter — the caller must be an admin of that organization.
      operationId: billing-info-retrieve
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingInfo'
          description: ''
        '403':
          description: Project-scoped API keys are not allowed
        '404':
          description: Billing information not found
      security:
        - api_key: []
components:
  schemas:
    BillingInfo:
      type: object
      properties:
        organization:
          type: integer
          readOnly: true
          description: |-
            Organization ID this billing record belongs to.
            Example: `37`
        credits_remaining:
          type: string
          readOnly: true
          description: |-
            Credits currently available to spend on runs and calls.
            Example: `7436.08`
        credits_used:
          type: string
          readOnly: true
          description: >-
            Total credits consumed across all non-refunded transactions on this
            billing record.

            Example: `36462.14`
        initial_balance:
          type: string
          readOnly: true
          description: >-
            Credits granted by the current pack at the start of the billing
            period (before any usage).

            Example: `50000.00`
        balance_expiry:
          type: string
          format: date-time
          description: |-
            Date the current credit balance expires (null if no expiry is set).
            Example: `2026-06-23T10:00:00Z`
        subscription_status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
          readOnly: true
          description: >

            Current subscription state for the org plus the active pack's
            max-allowed plan caps. `status` is one of `active`, `trial`,
            `expired`, `inactive`. `days_until_expiry` is negative when
            `expire_at` is in the past. Nested `pack` caps are the plan's
            ceilings — the org's currently configured limits may be lower. All
            fields are null/false when there is no active subscription.


            Example:

            ```json

            {
              "status": "active",
              "is_active": true,
              "is_trial": false,
              "pack_name": "Enterprise",
              "expire_at": "2026-06-15T10:00:00Z",
              "last_payment_at": "2026-05-15T10:00:00Z",
              "days_until_expiry": 34,
              "created_at": "2025-08-01T09:00:00Z",
              "pack": {
                "name": "Enterprise",
                "max_concurrent_runs_limit": 50,
                "max_concurrent_chat_runs_limit": 50,
                "max_agents_limit": 20,
                "max_members_limit": 10,
                "max_projects_limit": 10,
                "billing_type": "subscription",
                "subscription_overage": "0.08"
              }
            }

            ```
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this billing record was first created.
            Example: `2024-01-15T10:30:00Z`
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this billing record was last modified.
            Example: `2026-05-12T14:25:30Z`
      required:
        - balance_expiry
    SubscriptionStatus:
      type: object
      properties:
        status:
          enum:
            - active
            - trial
            - expired
            - inactive
          type: string
          x-spec-enum-id: 00a3c2044965e0ec
          description: |-
            One-shot lifecycle signal for the subscription.

            * `active` - active
            * `trial` - trial
            * `expired` - expired
            * `inactive` - inactive
        is_active:
          type: boolean
          description: Whether the subscription row is flagged active.
        is_trial:
          type: boolean
          description: True if the customer is on a trial pack.
        pack_name:
          type:
            - string
            - 'null'
          description: Display name of the current pack.
        expire_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the current billing period ends.
        last_payment_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp of the last successful charge.
        days_until_expiry:
          type:
            - integer
            - 'null'
          description: Days until `expire_at`; negative if already past.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the subscription was first created.
        pack:
          oneOf:
            - $ref: '#/components/schemas/SubscriptionStatusPack'
            - type: 'null'
      required:
        - created_at
        - days_until_expiry
        - expire_at
        - is_active
        - is_trial
        - last_payment_at
        - pack
        - pack_name
        - status
    SubscriptionStatusPack:
      type: object
      properties:
        name:
          type: string
          description: Pack display name.
        max_concurrent_runs_limit:
          type: integer
          description: Maximum parallel call/voice runs allowed by the plan.
        max_concurrent_chat_runs_limit:
          type: integer
          description: Maximum parallel chat runs allowed by the plan.
        max_agents_limit:
          type: integer
          description: Maximum agents allowed by the plan (`-1` = unlimited).
        max_members_limit:
          type: integer
          description: Maximum org members allowed by the plan (`-1` = unlimited).
        max_projects_limit:
          type: integer
          description: Maximum projects allowed by the plan (`-1` = unlimited).
        billing_type:
          type: string
          description: Pack billing type, e.g. `subscription` or `self_serve`.
        subscription_overage:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          description: Price per credit for overage purchases. `-1` disables overage.
      required:
        - billing_type
        - max_agents_limit
        - max_concurrent_chat_runs_limit
        - max_concurrent_runs_limit
        - max_members_limit
        - max_projects_limit
        - name
        - subscription_overage
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````