test_framework

Get billing information

Changed on

Returns credits remaining, current billing-cycle credits used, balance expiry, and subscription status for an organization. Credits used comes from the current billing-cycle aggregate and may lag usage by up to 30 minutes. 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.

get/test_framework/billing/info/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/test_framework/billing/info/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer

Query parameters

organization_idinteger

Tenant scope. Supply one of organization_id when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant.

Response

organizationinteger

Organization ID this billing record belongs to. Example: 37

credits_remainingstring

Credits currently available to spend on runs and calls. Example: 7436.08

credits_usedstring

Credits consumed in the current billing cycle, calculated from that cycle's billing-cycle aggregate (run_credits + calllog_credits). Returns 0 until the cycle's aggregate is created and may lag usage by up to 30 minutes. Example: 36462.14

initial_balancestring

Credits granted by the current pack at the start of the billing period (before any usage). Example: 50000.00

balance_expirystring date-time required

Date the current credit balance expires (null if no expiry is set). Example: 2026-06-23T10:00:00Z

created_atstring date-time

When this billing record was first created. Example: 2024-01-15T10:30:00Z

updated_atstring date-time

When this billing record was last modified. Example: 2026-05-12T14:25:30Z

Changes

    • breaking

      the //// response's property type changed from no type to object for status

    • info

      the endpoint scheme security oauth2 was added to the API

    • info

      the endpoint scheme security supabase_session was added to the API

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property ///// to the response with the status