Billing
The billing API exposes your account’s plan, credit balance, and subscription management. Most billing actions can also be performed from the Usage & Billing page in the dashboard.Get billing info
Returns your current plan, credit balance, and usage for the current period.GET /api/billing
Response (200)
List plans
Returns all available subscription plans with pricing and limits.GET /api/billing/plans
Response (200)
Subscribe to a plan
Initiates a Stripe checkout session to upgrade or downgrade your subscription. Returns acheckoutUrl to redirect your user to.
POST /api/billing/subscribe
Body
Add credits
Initiates a Stripe checkout to top up your prepaid credit balance.POST /api/billing/recharge
Body
| Field | Type | Description |
|---|---|---|
amount | number | USD amount to add to prepaid balance |