Saltar a la navegación

Estimate Cost

Estimate the price of a generation from its model and duration. No media is fetched and nothing is created.

fps defaults to 25 for credit-billed organizations and 30 otherwise. Set workflow to translate-and-dub to include dubbing; the response then has a breakdown. durationCheck says whether your plan and the model allow that duration.

POST /v2/generate/estimate-cost is an alias. A duration or frame rate the billing calculation rejects returns 422 cost_estimate_unavailable.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Solicitud

This endpoint expects an object.
modelstringRequerido

Model to estimate, for example lipsync-2 or sync-3.

durationdoubleRequerido
Finite, positive billable duration in seconds.
fpsdoubleOpcional
Finite, positive source video frame rate. For standard plans, defaults to 25 for credit billing and 30 for usage billing when omitted.
workflowenumOpcional

Omit for lip-sync only. translate-and-dub includes dubbing and lip-sync, estimated using the source duration. Actual output duration may differ.

Valores permitidos:
reasoningEnabledbooleanOpcional
Include reasoning pricing when supported by the model.

Respuesta

A single estimate; estimatedCredits is null for dollar-billed organizations.

estimatedFrameCountdouble
The estimated frame count for the generation.
estimatedGenerationCostdouble
The estimated cost of the generation in USD.
estimatedCreditsdouble or null

Estimated credits for credit-billed organizations; null for dollar-billed organizations.

durationCheckobjectOpcional

Whether your account and the selected model can generate the quoted duration right now. A price is not permission to generate; admission rechecks every limit.

breakdownobjectOpcional

Present for translate-and-dub. Top-level amounts are the combined Sync estimate. External provider charges are unpriced (null) and excluded; included dubbing has no additional Sync charge. Estimates do not reserve credits or guarantee admission.

Errores

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error