Skip to main content
Conduit.im

Usage

Track your spending, check your account balance, and view transaction history.

Authentication required: All usage endpoints require authentication via a Bearer token in the Authorization header.

Get Balance

GET /api/billing/balance

Returns your current account balance. No query parameters required.

Example Request

curl "https://conduit.im/api/billing/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "balanceInCents": 4250,
  "balanceInDollars": 42.5
}

Response Fields

FieldTypeDescription
balanceInCentsintegerCurrent balance in cents
balanceInDollarsnumberCurrent balance in dollars

Transaction History

GET /api/billing/ledger

Returns a paginated list of your transaction history, ordered by most recent first.

Query Parameters

ParameterTypeDefaultDescription
limitinteger10Number of entries to return (1–100)
offsetinteger0Number of entries to skip for pagination

Example Request

curl "https://conduit.im/api/billing/ledger?limit=5&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "entries": [
    {
      "id": "clx1abc2def3ghi4jkl",
      "type": "USAGE_DEBIT",
      "amountInCents": -12,
      "balanceAfterInCents": 4250,
      "metadata": {
        "model": "gpt-4",
        "tokens": 1523
      },
      "createdAt": "2026-03-09T14:32:00.000Z"
    },
    {
      "id": "clx1mno5pqr6stu7vwx",
      "type": "CREDIT_PURCHASE",
      "amountInCents": 2000,
      "balanceAfterInCents": 4262,
      "metadata": {
        "stripePaymentId": "pi_abc123"
      },
      "createdAt": "2026-03-08T10:15:00.000Z"
    }
  ],
  "limit": 5,
  "offset": 0,
  "count": 2
}

Entry Fields

FieldTypeDescription
idstringUnique identifier for the ledger entry
typestringTransaction type (see below)
amountInCentsintegerTransaction amount in cents (negative for debits)
balanceAfterInCentsintegerAccount balance after this transaction
metadataobjectAdditional context (model used, payment ID, etc.)
createdAtstringISO 8601 timestamp of the transaction

Transaction Types

TypeDescription
CREDIT_PURCHASEFunds added to your account via Stripe payment
USAGE_DEBITCharges deducted for API usage
SUPPORT_CREDITCredits added by the support team
REFUND_DEBITRefund transactions processed on your account

API Key Spending Limits

Each API key can have individual spending limits configured to help you control costs. These are managed through the API Keys dashboard.

FieldDescription
spendingLimitMaximum amount (in cents) the key can spend per period
spendingTypeFIXED (one-time limit) or RECURRING (resets each period)
spendingPeriodReset period for recurring limits: DAILY, WEEKLY, or MONTHLY

Next Steps