Skip to main content
POST
Price a generation
Prices one run of a model with these inputs (resolution, duration, audio, and the length of any attached video or audio). Nothing is charged. estimate is true while required files are still missing, so the final price may differ; credits can be null for models that can’t be priced until their files are attached.
Pass the quoted credits as expectedCredits to Generate to be sure you’re never charged more.

Authorizations

Authorization
string
header
required

An Unsora API key (uns_…). A Clerk session token also works.

Body

application/json
model
string
required

Model key from GET /catalog. Older names listed in the model's legacyDbModels (e.g. veo, kling-pro, seedance_2.0) also work. Retired names such as wan, wan_2.6, gpt-image-1.5 and seedream-v5-lite are rejected here; only POST /videos/create and POST /image-generations/create translate them.

Example:

"seedance-2.5"

category
enum<string>

Optional guard: reject the request if the model is from another category.

Available options:
video,
image,
motion-control
mode
string

Mode key from GET /catalog. Omit to pick it from the attached media.

Example:

"omni"

inputs
object

Inputs in the provider's field names, as listed by GET /catalog. Media fields take URLs; files hosted outside Unsora are imported into your library first. Omitted fields use the model's defaults.

Example:

Response

Quote

success
boolean
required
credits
integer | null
required

Credits one run costs. Null when the model can't be priced until its required files are attached.

estimate
boolean
required

True while required files are missing, so the final price may differ.

mode
string
modelId
string

Provider endpoint the request routes to.