POST /unified-video/quote
Preview point cost for the exact video request body before creating the task.
Best for
Frontend teams building live quote, price preview, and validation loops.
How to call it
ts
const quote = await fetch("/unified-video/quote", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "seedance-1.5-pro",
prompt: "A cinematic dog running through a bright studio",
duration: 8,
resolution: "720p"
})
}).then((resp) => resp.json());What this API is for
Use the same body as generate.
Call quote whenever pricing-sensitive inputs change, such as model, duration, resolution, quality, audio, or mode.
Request fields
Required. Video model id, for example seedance-1.5-pro or grok-video.
Required. Main generation prompt.
Optional or required depending on model. Use supported values returned by /unified-video/models.
Optional or required depending on model.
Optional. Used by models such as Runway.
Optional. Use only model-supported values.
Optional. Used when the selected model has multiple render modes.
Optional boolean. Only send when the model supports audio pricing.
Optional array of image URLs when the model supports image-to-video.
Optional array when the selected model supports video reference pricing.
Response fields
Whether quote succeeded.
Resolved model id used for pricing.
Estimated point cost for the current body.
When invalid, use this to build a clear customer-facing error message.
Frontend notes
- Debounce calls by roughly 300-500ms.
- If /models already tells you a combination is invalid, block it before calling quote.
- Show the estimated points close to the primary action.
Ready to test with your own key?
Create a general API key in Settings, then come back here to copy a request example.