Ir para a navegação

Estimate Cost

Estimate a generation from its model and billable duration in seconds. Supply a finite positive duration and, optionally, a finite positive fps (defaults to 30). No media is fetched and no generation is created. POST /v2/generate/estimate-cost is an alias of this endpoint. Invalid request fields return 400. If the billing calculation rejects the duration or frame rate, it returns 422 cost_estimate_unavailable without price fields.

Autenticação

x-api-keystring
Autenticação de chave de API via cabeçalho

Solicitação

This endpoint expects an object.
modelstringObrigatório

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

durationdoubleObrigatório
Finite, positive billable duration in seconds.
fpsdoubleOpcional
Finite, positive frame rate. Defaults to 30.
reasoningEnabledbooleanOpcional
Include reasoning pricing when supported by the model.

Resposta

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.

Erros

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