Pricing API
Get a model’s base price and effective discount, or estimate the price of a specific inference request from its input parameters.
API Information
| Item | Description |
|---|---|
| API Path | /api/v3/model/price |
| HTTP Method | POST |
| Content-Type | application/json |
| Authentication | Bearer Token via Authorization header |
Request
curl --fail-with-body --connect-timeout 10 --max-time 60 \
-X POST "https://api.wavespeed.ai/api/v3/model/price" \
-H "Authorization: Bearer $WAVESPEED_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 or null | No | Omit this field or send null to return the configured base price and effective discount. Send an object, including {}, to evaluate the model’s dynamic pricing formula. |
inputs Semantics
The presence of inputs changes what price means:
- When
inputsis omitted ornull,priceis the model’s configured base price. The response still includes the effective discount for the authenticated account. - When
inputsis an object, including an empty object,priceis calculated by the model’s pricing formula using that object. If required pricing parameters are missing, the request may return an error.
To query only the base price and effective discount:
{
"model_id": "pixverse/pixverse-v5.5/image-to-video"
}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.price | float | Original price in USD before the effective discount | 0.45 |
| data.discounted_price | float | Amount payable in USD after the effective discount | 0.0 |
| data.discount_rate | float | Payable percentage. 100 means no discount; 0 means free | 0 |
| data.currency | string | Currency code | "USD" |
Response Example
{
"code": 200,
"message": "success",
"data": {
"model_id": "pixverse/pixverse-v5.5/image-to-video",
"price": 0.45,
"discounted_price": 0.0,
"discount_rate": 0,
"currency": "USD"
}
}Notes
- Pricing can depend on input parameters such as duration, aspect ratio, and sound.
priceis the original price;discounted_priceis the amount payable by the authenticated account.- The final charge is enforced by the server when the inference request is submitted.