Skip to main content
Every model page on sunra.ai shows the price of each endpoint next to the model name — for example $0.045-$0.09 per image. Hovering the price shows a tooltip with the exact rule, such as which resolutions or options change the price. For most models the price of a request is fixed at submission time: it is computed from your request parameters before the model runs, and that exact amount is what appears in your billing history. The same request parameters always cost the same amount, so you can budget deterministically. A few models (for example video models billed per output second) settle after completion based on actual usage; their tooltips say so.

Pricing API

You can read prices programmatically — both as human-readable strings and as machine-readable rules.
EndpointAuthDescription
api.sunra.ai/v1/pricingAPI keyLists all models with display and tooltip price strings
api.sunra.ai/v1/modelsnoneLists all models; gives you the model id
api.sunra.ai/v1/pricing/model/{model_id}/endpoint/{endpoint}noneFull machine-readable price rules for one endpoint
To compute the exact price of a request before sending it, first look up the model id:
Then fetch the price rules for the endpoint you plan to call:

How price rules are evaluated

The prices array is evaluated top to bottom against your request payload, and the first row whose matches conditions all hold determines the price. A row without matches always matches — it is the fallback. Conditions compare your request parameters:
ConditionMeaning
"resolution": "1K"Parameter equals the value exactly
"duration": { "$gte": 5, "$lte": 10 }Numeric parameter is in range ($gt, $gte, $lt, $lte, $in, $nin)
"images": { "$size": 3 }Array parameter has exactly 3 items ($size_gt, $size_gte, $size_lt, $size_lte for ranges)
A parameter that is absent from your request never matches a condition — defaults are not filled in before matching. Price tables are ordered so that omitting an optional parameter lands on the row for its default behavior. Worked example, using the table above:
  • {"images": [a], "resolution": "1K"} → first row → $0.045
  • {"images": [a, b, c], "resolution": "1K"} → 1K row with $size: 3$0.053
  • {"images": [a]} (resolution omitted, model defaults to 2K) → skips the 1K rows, hits $size_lte: 1$0.09
If a matched row has a usage_key, the amount is unit_amount × that parameter’s value (for example price per second of requested duration). LLM models (chat, messages, responses) are billed per token instead — see their price pages under sunra.ai/models and GET /v1/pricing/model/{model_id}/endpoint/llm.