How to Check Usage

How to Check Usage

Monitor your WaveSpeedAI API usage via API.

Endpoint

GET https://api.wavespeed.ai/api/v3/account/usage

Request

curl --location --request GET 'https://api.wavespeed.ai/api/v3/account/usage' \
--header 'Authorization: Bearer ${WAVESPEED_API_KEY}'

Response

{
  "code": 200,
  "message": "success",
  "data": {
    "period": "2024-01",
    "total_requests": 1250,
    "total_cost": 45.67,
    "by_model": [
      {
        "model": "wavespeed-ai/flux-dev",
        "requests": 500,
        "cost": 15.00
      },
      {
        "model": "google/veo3",
        "requests": 100,
        "cost": 25.00
      }
    ]
  }
}

Response Fields

FieldTypeDescription
periodstringBilling period
total_requestsintegerTotal API calls
total_costnumberTotal spending
by_modelarrayBreakdown by model

Query Parameters

ParameterDescriptionExample
start_dateStart of period2024-01-01
end_dateEnd of period2024-01-31
modelFilter by modelwavespeed-ai/flux-dev

Example: Date Range

curl --location --request GET 'https://api.wavespeed.ai/api/v3/account/usage?start_date=2024-01-01&end_date=2024-01-31' \
--header 'Authorization: Bearer ${WAVESPEED_API_KEY}'

Python Example

import os
import requests
 
api_key = os.environ.get("WAVESPEED_API_KEY")
 
def get_usage(start_date=None, end_date=None):
    url = "https://api.wavespeed.ai/api/v3/account/usage"
    params = {}
    if start_date:
        params["start_date"] = start_date
    if end_date:
        params["end_date"] = end_date
 
    response = requests.get(
        url,
        headers={"Authorization": f"Bearer {api_key}"},
        params=params
    )
    return response.json()["data"]
 
# Get current month usage
usage = get_usage()
print(f"Total requests: {usage['total_requests']}")
print(f"Total cost: ${usage['total_cost']}")
 
# Show top models
for model in usage["by_model"][:5]:
    print(f"- {model['model']}: {model['requests']} requests, ${model['cost']}")

Use Cases

Use CaseImplementation
Cost trackingMonitor spending by model
OptimizationIdentify expensive operations
ReportingGenerate usage reports
BudgetingPlan based on usage patterns
© 2025 WaveSpeedAI. All rights reserved.