Billing
Get credit balance
client.aiGateway.billing.creditBalance(BillingCreditBalanceParams { account_id } params, RequestOptionsoptions?): BillingCreditBalanceResponse { balance, has_default_payment_method, payment_method, 2 more }
GET/accounts/{account_id}/ai-gateway/billing/credit-balance
Get usage history
client.aiGateway.billing.usageHistory(BillingUsageHistoryParams { account_id, value_grouping_window, end_time, start_time } params, RequestOptionsoptions?): BillingUsageHistoryResponse { history }
GET/accounts/{account_id}/ai-gateway/billing/usage-history
Get invoice history
client.aiGateway.billing.invoiceHistory(BillingInvoiceHistoryParams { account_id, type } params, RequestOptionsoptions?): BillingInvoiceHistoryResponse { invoices, pagination }
GET/accounts/{account_id}/ai-gateway/billing/invoice-history
Get invoice preview
client.aiGateway.billing.invoicePreview(BillingInvoicePreviewParams { account_id } params, RequestOptionsoptions?): BillingInvoicePreviewResponse { id, amount_due, amount_paid, 6 more }
GET/accounts/{account_id}/ai-gateway/billing/invoice-preview
BillingTopup
Create a top-up
client.aiGateway.billing.topup.create(TopupCreateParams { account_id, amount } params, RequestOptionsoptions?): TopupCreateResponse { client_secret, onboarding, payment_intent_id, 2 more }
POST/accounts/{account_id}/ai-gateway/billing/topup
Check top-up status
client.aiGateway.billing.topup.status(TopupStatusParams { account_id, payment_intent_id } params, RequestOptionsoptions?): TopupStatusResponse { payment_intent_id, status }
POST/accounts/{account_id}/ai-gateway/billing/topup/status
BillingTopupConfig
Get auto top-up configuration
client.aiGateway.billing.topup.config.get(ConfigGetParams { account_id } params, RequestOptionsoptions?): ConfigGetResponse { amount, disabledReason, error, 2 more }
GET/accounts/{account_id}/ai-gateway/billing/topup/config
Set auto top-up configuration
client.aiGateway.billing.topup.config.create(ConfigCreateParams { account_id, amount, threshold } params, RequestOptionsoptions?): ConfigCreateResponse { amount, threshold }
POST/accounts/{account_id}/ai-gateway/billing/topup/config
Delete auto top-up configuration
client.aiGateway.billing.topup.config.delete(ConfigDeleteParams { account_id } params, RequestOptionsoptions?): ConfigDeleteResponse
DELETE/accounts/{account_id}/ai-gateway/billing/topup/config
BillingSpending Limit
Get spending limit
client.aiGateway.billing.spendingLimit.get(SpendingLimitGetParams { account_id } params, RequestOptionsoptions?): SpendingLimitGetResponse { config, enabled }
GET/accounts/{account_id}/ai-gateway/billing/spending-limit
Set spending limit
client.aiGateway.billing.spendingLimit.create(SpendingLimitCreateParams { account_id, amount, duration, strategy } params, RequestOptionsoptions?): SpendingLimitCreateResponse
POST/accounts/{account_id}/ai-gateway/billing/spending-limit
Delete spending limit
client.aiGateway.billing.spendingLimit.delete(SpendingLimitDeleteParams { account_id } params, RequestOptionsoptions?): SpendingLimitDeleteResponse
DELETE/accounts/{account_id}/ai-gateway/billing/spending-limit