Search Billings API

Search billing records with optional filters such as billing type, prediction UUIDs, sort order, and time range. Returns paginated results.

API Information

ItemDescription
API Path/api/v3/billings/search
HTTP MethodPOST
Content-Typeapplication/json
AuthenticationBearer Token via Authorization header

Request


curl -X POST "https://api.wavespeed.ai/api/v3/billings/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "billing_type": "deduct",
  "prediction_uuids": ["cb54bb552ff94e1ea6a5c2976fe1c0c1"],
  "sort": "created_at ASC",
  "start_time": "1759317210051",
  "end_time": "1759317227408",
  "page": 1,
  "page_size": 10
}'

Parameters

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesAccess Key in format: Bearer {access_key}
Content-TypestringYesapplication/json

Body Parameters

ParameterTypeRequiredDefaultDescription
billing_typestringNo-Filter by billing type (e.g., deduct)
prediction_uuidsarrayNo-Filter by one or more related prediction UUIDs
sortstringNo-Sort order: created_at ASC or created_at DESC
start_timestringNo-Start of time range (milliseconds since Unix epoch)
end_timestringNo-End of time range (milliseconds since Unix epoch)
pageintegerYes1Page number (>=1)
page_sizeintegerYes10Items per page (1-100)

Response

FieldTypeDescription
codeintegerHTTP status code
messagestringStatus message
data.pageintegerCurrent page number
data.totalintegerTotal number of records
data.itemsarrayArray of billing records

Billing Record Object

FieldTypeDescription
uuidstringBilling record UUID
billing_typestringType of billing (e.g., deduct)
pricefloatAmount in USD
created_atstringCreation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)
orderobjectRelated order information
predictionobjectRelated prediction information
access_key_namestringName of the access key used

Response Example

{
  "code": 200,
  "message": "success",
  "data": {
    "page": 1,
    "total": 1,
    "items": [
      {
        "uuid": "d6b45aaa54fb4d12930acc36c9ae639f",
        "billing_type": "deduct",
        "price": 0.02,
        "created_at": "2025-10-01T11:13:30.051Z",
        "updated_at": "2025-10-01T11:13:30.051Z",
        "order": {
          "uuid": "2bf7346d433e4b0e9e70bc24e5e24644",
          "state": "done",
          "price": 0.02,
          "origin_price": 0.02,
          "status": "",
          "ak_id": 0
        },
        "prediction": {
          "uuid": "cb54bb552ff94e1ea6a5c2976fe1c0c1",
          "model_uuid": "bytedance/seedream-v3",
          "status": "completed"
        },
        "access_key_name": ""
      }
    ]
  }
}
© 2025 WaveSpeedAI. All rights reserved.