Overview
Returns usage statistics for your API key, including job count and storage usage.
Your API key for authentication
Response
Total number of jobs created
Total storage used in gigabytes
Start of current billing period (if Stripe billing enabled)
End of current billing period (if Stripe billing enabled)
Storage used in current billing period (if Stripe billing enabled)
Storage limit in gigabytes (only present for trial/limited keys)
Storage limit in bytes (only present for trial/limited keys)
Remaining storage in gigabytes before quota is reached (only present for trial/limited keys)
Example
Request
Response
Response (With Billing)
Response (Trial Key with Storage Limit)
curl -X GET "https://api.tornadoapi.io/usage" \
-H "x-api-key: sk_your_api_key"
Success Response
{
"client_name" : "My Application" ,
"usage_count" : 1523 ,
"storage_usage_gb" : 45.67
}
Error Responses
401 Unauthorized
401 Unauthorized
{
"error" : "Missing x-api-key header"
}
Usage Tracking
Job Count
Incremented each time you call POST /jobs. For batch operations, each episode counts as one job.
Storage Usage
Cumulative total of all files uploaded to S3. This includes:
Successfully completed videos
All formats (MP4, MKV, MP3)
Deleting files from S3 does not decrease the storage counter. This metric tracks total data transferred.
Storage Quota (Trial Keys)
API keys with a storage limit (e.g., 1 TB trial keys) include quota information in the response.
When the limit is reached, new jobs are rejected with a 403 Forbidden error:
{
"error" : "Storage quota exceeded" ,
"limit_gb" : "1024.00" ,
"used_gb" : "1024.00" ,
"message" : "This API key has a 1024 GB limit and has used 1024.00 GB"
}
The response fields vary depending on your key type:
Field Stripe Key Trial Key No Limit client_name✓ ✓ ✓ usage_count✓ ✓ ✓ storage_usage_gb✓ ✓ ✓ billing_period_start✓ — — billing_period_end✓ — — current_period_usage_gb✓ — — storage_limit_gb— ✓ — storage_limit_bytes— ✓ — storage_remaining_gb— ✓ —
Monitoring Usage
import requests
def check_usage ( api_key ):
response = requests.get(
"https://api.tornadoapi.io/usage" ,
headers = { "x-api-key" : api_key}
)
data = response.json()
print ( f "Client: { data[ 'client_name' ] } " )
print ( f "Jobs: { data[ 'usage_count' ] } " )
print ( f "Storage: { data[ 'storage_usage_gb' ] :.2f} GB" )
# Trial key with storage limit
if "storage_limit_gb" in data:
print ( f "Limit: { data[ 'storage_limit_gb' ] :.2f} GB" )
print ( f "Remaining: { data[ 'storage_remaining_gb' ] :.2f} GB" )
# Stripe billing key
if "current_period_usage_gb" in data:
print ( f "Current period: { data[ 'current_period_usage_gb' ] :.2f} GB" )
check_usage( "sk_your_api_key" )