Skip to content

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 ​

ItemDescription
API Path/v1/models/price
HTTP MethodPOST
Content-Typeapplication/json
AuthenticationBearer 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 ​

ParameterTypeRequiredDescription
model_idstringYesModel slug {provider_id}/{model_id}/{run_type}, as returned by List Models
inputsobjectNoOmit 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 — price is the model's base price, the same as base_price in List Models. The response still includes your account's discount.
  • Object (including {}) — price is calculated from inputs merged 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 ​

FieldTypeDescriptionExample
codeinteger200 on success200
messagestringStatus message"success"
data.model_idstringModel slug"kling/kling-3/text-to-video"
data.pricenumberOriginal price in USD before your discount0.857
data.discounted_pricenumberAmount payable in USD after your discount0.686
data.discount_ratenumberPayable percentage. 100 means no discount; 80 means 20% off80
data.currencystringAlways 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:

HTTPCodeMeaningAction
404—model_id is malformed or does not existCheck the slug with List Models
4001401An input value is invalid, for example any channel on a model that rejects channels (Veo 3.1)Fix the parameter and retry
4004005The price could not be calculatedCheck 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, and channel.
  • An unknown channel is priced the same way it is submitted: as the model's first channel, or ignored if the model has no channels. See Channels.
  • price is the list price; discounted_price is 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 ​

Released under the MIT License.