Overview
Returns billing information for the current period, including total usage in GB. Requires a Stripe subscription linked to your API key.
Your API key for authentication
Response (Billing Enabled)
Whether Stripe billing is enabled for this API key
Unix timestamp of billing period start
Unix timestamp of billing period end
Total data transferred in GB during current period
Human-readable period start date (e.g., “Jan 01, 2024”)
Human-readable period end date (e.g., “Feb 01, 2024”)
Response (No Billing)
When no Stripe subscription is linked:
false when no subscription is linked
Examples
curl -X GET "https://tornado.velys.software/dashboard/billing" \
-H "x-api-key: sk_your_api_key"
Success Response
{
"billing_enabled": true,
"period_start": 1704067200,
"period_end": 1706745600,
"total_usage_gb": 45.67,
"period_start_formatted": "Jan 01, 2024",
"period_end_formatted": "Feb 01, 2024"
}
Error Responses
{
"error": "Missing x-api-key header"
}
Billing Model
Tornado uses usage-based billing through Stripe:
- Metered billing: Pay only for what you use
- Per-GB pricing: Charged based on total data transferred
- Monthly billing cycle: Usage resets each billing period