Pricing API
POST https://api.wavespeed.ai/api/v3/model/pricing
Retrieve the estimated cost for running a model inference based on the provided parameters.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer your_access_key |
| Content-Type | string | Yes | application/json |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | The model ID to get the pricing for. |
| inputs | object | Yes | The parameters required for model inference. The final pricing is computed dynamically based on these inputs, as different parameter values (such as duration, resolution, or additional features) may affect the cost. |
Example Request
curl --location 'https://api.wavespeed.ai/api/v3/model/pricing' \
--header 'Authorization: Bearer your_access_key' \
--header 'Content-Type: application/json' \
--data '{
"model_id": "pixverse/pixverse-v5.5/image-to-video",
"inputs": {
"aspect_ratio": "16:9",
"duration": 5,
"image": "https://d2p7pge43lyniu.cloudfront.net/output/30554d6f-1b46-4845-aaec-d0e901c2151a-u1_2472bd3c-17f2-4197-9fc5-1f5e1b2fc0c1.jpeg",
"prompt": "A stylish model, fashion show, showcase a designer outfit",
"sound": true
}
}'Example Response
{
"code": 200,
"message": "success",
"data": {
"model_id": "pixverse/pixverse-v5.5/image-to-video",
"unit_price": 0.45,
"currency": "USD"
}
}Notes
-
The pricing calculation depends on inputs.
-
Different input values (e.g., duration, aspect ratio, sound) can affect the final cost.
-
unit_price represents the price for one inference request with the provided parameters.