Skip to content

Billing

AutoDB uses pay-per-request billing. All new accounts receive $10.00 in free credits. Each billable API request costs $0.005.

FreeBillable ($0.005/request)
Connection CRUDSchema introspection
API key managementMigration analysis
Agent managementQuery optimization
Billing endpointsText-to-SQL
Database provisioningAgent chat
Health checkSQL execution
Terminal window
curl https://api.autodb.app/api/v1/billing/balance \
-H "Authorization: Bearer YOUR_JWT"
{
"success": true,
"data": {
"balance": "9.5000",
"total_spent": "0.5000",
"total_requests": 100,
"cost_per_request": "0.0050"
}
}
Terminal window
curl -X POST https://api.autodb.app/api/v1/billing/checkout \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT" \
-d '{"amount_cents": 1000}'
amount_centsCredits Added
500$5.00
1000$10.00
2500$25.00
5000$50.00

Returns a checkout_url that redirects the user to Stripe Checkout.

Terminal window
curl https://api.autodb.app/api/v1/billing/usage \
-H "Authorization: Bearer YOUR_JWT"

Returns the last 100 billable requests with endpoint path, method, cost, and timestamp.

Terminal window
curl https://api.autodb.app/api/v1/billing/payments \
-H "Authorization: Bearer YOUR_JWT"

Returns past payments with amount, credits added, status, and Stripe receipt URL.

When credits are depleted, billable endpoints return HTTP 402:

{
"detail": "Insufficient credits. Please add funds to continue."
}

Free endpoints (connections, API keys, billing) continue to work.

Every billable response includes:

X-Credits-Remaining: 8.5000

The Stripe webhook at POST /api/v1/billing/webhook processes checkout.session.completed events to add credits. It is idempotent — duplicate events are safely ignored.