Common APIBillings

Search billings

Endpoint

POST https://api.wavespeed.ai/api/v3/billings/search

Description

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

Example cURL request:

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

The response will be a paginated JSON object of billing records:

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

Query Parameters

ParameterTypeRequiredDefaultRangeDescription
billing_typestringNo--Filter by billing type (e.g., deduct).
prediction_uuidsarray[string]No--Filter by one or more related prediction UUIDs.
sortstringNo--Sort order, e.g., created_at ASC or created_at DESC.
start_timestringNo--Start of time range (milliseconds since Unix epoch, as string).
end_timestringNo--End of time range (milliseconds since Unix epoch, as string).
pageintegerYes1>=1Page number to return.
page_sizeintegerYes101~100Number of items per page.
© 2025 WaveSpeedAI. All rights reserved.