Pricing API
Get a model's base price and your effective discount, or estimate the price of a specific request from its input parameters.
API Information
| Item | Description |
|---|---|
| API Path | /v1/models/price |
| HTTP Method | POST |
| Content-Type | application/json |
| Authentication | Bearer token via Authorization header |
Request
bash
curl -X POST "https://api.get3w.com/v1/models/price" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_id": "kling/kling-3/text-to-video",
"inputs": {
"prompt": "A cat walking on the beach at sunset",
"duration": 5,
"resolution": "1080p",
"generate_audio": true
}
}'python
import requests
response = requests.post(
"https://api.get3w.com/v1/models/price",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model_id": "kling/kling-3/text-to-video",
"inputs": {"duration": 5, "resolution": "1080p", "generate_audio": True},
},
timeout=(10, 60),
)
response.raise_for_status()
data = response.json()["data"]
print(f"Price: ${data['price']}, you pay: ${data['discounted_price']}")Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | Model slug {provider_id}/{model_id}/{run_type}, as returned by List Models |
inputs | object | No | Omit to get the base price. Send an object, including {}, to estimate a specific request |
inputs Semantics
Whether inputs is present changes what price means:
- Omitted —
priceis the model's base price, the same asbase_pricein List Models. The response still includes your account's discount. - Object (including
{}) —priceis calculated frominputsmerged over the model's schema defaults. Parameters you leave out use their default values, so{}quotes a request with all defaults. Media you have not provided yet (for example reference audio or video) counts as zero, so the quote can be lower than the final charge. To get only the base price and discount:
json
{
"model_id": "kling/kling-3/text-to-video"
}Response
| Field | Type | Description | Example |
|---|---|---|---|
code | integer | 200 on success | 200 |
message | string | Status message | "success" |
data.model_id | string | Model slug | "kling/kling-3/text-to-video" |
data.price | number | Original price in USD before your discount | 0.857 |
data.discounted_price | number | Amount payable in USD after your discount | 0.686 |
data.discount_rate | number | Payable percentage. 100 means no discount; 80 means 20% off | 80 |
data.currency | string | Always USD | "USD" |
Response Example
json
{
"code": 200,
"message": "success",
"data": {
"model_id": "kling/kling-3/text-to-video",
"price": 0.857,
"discounted_price": 0.686,
"discount_rate": 80,
"currency": "USD"
}
}Pricing Errors
Errors use the standard /v1/ error format. For pricing failures, error is a nested object with a business code:
| HTTP | Code | Meaning | Action |
|---|---|---|---|
| 404 | — | model_id is malformed or does not exist | Check the slug with List Models |
| 400 | 1401 | An input value is invalid, for example any channel on a model that rejects channels (Veo 3.1) | Fix the parameter and retry |
| 400 | 4005 | The price could not be calculated | Check the pricing inputs. If valid inputs still fail, contact support |
json
{
"code": 400,
"error": {
"code": 4005,
"error": "Failed to calculate model price"
}
}A failed request does not return a usable price; it never falls back to the base price. For a UI preview you can make a separate request without inputs, but that value is not a quote for the failed request.
Notes
- Prices can depend on parameters such as
duration,resolution,generate_audio, andchannel. - An unknown
channelis priced the same way it is submitted: as the model's first channel, or ignored if the model has no channels. See Channels. priceis the list price;discounted_priceis what your account pays at its current tier.- Submitting a task recalculates the price, including measuring any reference media. The charge at submission is final.
Next Steps
- How to List Models — Find
model_idvalues and parameters - How Pricing Works
- How to Submit Task