DocsVideo Quote
Video

POST /unified-video/quote

Preview point cost for the exact video request body before creating the task.

POST /unified-video/quoteScope: api.generate

Best for

Frontend teams building live quote, price preview, and validation loops.

Live point preview
Authoritative pricing before submit
Friendly error handling

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

model

Required. Video model id, for example seedance-1.5-pro or grok-video.

prompt

Required. Main generation prompt.

duration

Optional or required depending on model. Use supported values returned by /unified-video/models.

resolution

Optional or required depending on model.

quality

Optional. Used by models such as Runway.

aspectRatio

Optional. Use only model-supported values.

mode

Optional. Used when the selected model has multiple render modes.

generateAudio

Optional boolean. Only send when the model supports audio pricing.

images

Optional array of image URLs when the model supports image-to-video.

referenceVideoUrls

Optional array when the selected model supports video reference pricing.

Response fields

success

Whether quote succeeded.

model

Resolved model id used for pricing.

pointsCharged

Estimated point cost for the current body.

error

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.

Open API Keys