Developer API

Usage and balances

Read current balances, live usage, reservations, credit wallets, transactions, and entitlements. Balance top-ups and subscriptions are managed in the signed-in web account, not through server-side API keys.

Read-only usage and balances

Use these endpoints for B2B reconciliation: current balances, settled usage, reservations, credit wallets, transactions, and entitlements. Payment provider checkout and subscription management stay in the signed-in web account.

GET/billing/credits

Return product credit wallets plus ai_gateway_balance_micros.

Auth: API keyScope: billing.readAudience: Developers
GET/billing/transactions

List billing transactions with optional product filter.

Auth: API keyScope: billing.readAudience: Developers
GET/billing/entitlements

Return active subscriptions and period-end cancellation fields.

Auth: API keyScope: billing.readAudience: Developers
GET/ai-gateway/balance

Return balance_micros, pending reservation micros, available balance, and USD display values.

Auth: API keyScope: ai.gatewayAudience: Developers
GET/ai-gateway/usage

List AI Gateway usage events with provider, model, status, date, and limit filters.

Auth: API keyScope: ai.gatewayAudience: Developers
GET/ai-gateway/reservations

List active, failed, and settled preflight reservations for idempotency and pending-balance debugging.

Auth: API keyScope: ai.gatewayAudience: Developers

Credit fields

Video, Ricochet, and AI Gateway responses expose credit, token, charge, and balance fields so clients can show clear usage state.

credits_deductedremaining_creditsapproval_requiredbudget_exceededinput_tokensoutput_tokensestimated_charge_microscustomer_charge_microsavailable_balance_micros

Idempotency

Only implemented create/hosted-usage flows should send Idempotency-Key: video generation, repurpose, AI Gateway chat, and Ricochet hosted usage.

Idempotency-Key

Use a stable key per user action, not per retry attempt.