Pricing API
Get the estimated cost for running a model inference based on the provided parameters.
API Information
| Item | Description |
|---|---|
| API Path | /api/v3/model/pricing |
| HTTP Method | POST |
| Content-Type | application/json |
| Authentication | Bearer Token via Authorization header |
Request
curl -X POST "https://api.wavespeed.ai/api/v3/model/pricing" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_id": "pixverse/pixverse-v5.5/image-to-video",
"inputs": {
"aspect_ratio": "16:9",
"duration": 5,
"image": "https://example.com/image.jpg",
"prompt": "A stylish model, fashion show",
"sound": true
}
}'
Parameters
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Access Key in format: Bearer {access_key} |
| Content-Type | string | Yes | application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | The model ID to get pricing for |
| inputs | object | Yes | The parameters for model inference (duration, resolution, etc.) |
Response
| Field | Type | Description | Example |
|---|---|---|---|
| code | integer | HTTP status code | 200 |
| message | string | Status message | "success" |
| data.model_id | string | Model identifier | "pixverse/pixverse-v5.5/image-to-video" |
| data.unit_price | float | Price for one inference in USD | 0.45 |
| data.currency | string | Currency code | "USD" |
Response Example
{
"code": 200,
"message": "success",
"data": {
"model_id": "pixverse/pixverse-v5.5/image-to-video",
"unit_price": 0.45,
"currency": "USD"
}
}Notes
- Pricing depends on input parameters (e.g., duration, aspect ratio, sound)
- Different input values affect the final cost
unit_pricerepresents the price for one inference request with the provided parameters