ドキュメントVideo Generate
Video

POST /unified-video/generate

Create the real video generation task after the customer accepts the setup and quote.

POST /unified-video/generate権限: api.generate

向いている用途

Teams implementing submission flow, task creation, and success states.

Create task
Show final charged points
Use callback as the main completion flow

呼び出し例

bash

curl --request POST \
  --url https://api-dev.midsync.ai/unified-video/generate \
  --header "Authorization: Bearer <midsync_api_key>" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "seedance-1.5-pro",
    "prompt": "A cinematic beach at sunset with gentle waves",
    "duration": 8,
    "resolution": "720p"
  }'

What this API is for

Use the same request body that passed quote.

After success, store taskId, providerTaskId, model, and pointsCharged, then wait for your callback as the main completion signal.

Request fields

model

Required. Selected video model id.

prompt

Required. Main generation prompt.

duration

Optional or required depending on model.

resolution

Optional or required depending on model.

quality

Optional. For models with quality tiers.

aspectRatio

Optional. Use values allowed by the selected model.

mode

Optional. Used by models with multiple modes.

generateAudio

Optional boolean. Only for supported models.

images

Optional image URLs for image-to-video models.

referenceVideoUrls

Optional video reference URLs when supported.

Response fields

success

Whether task creation succeeded.

taskId

Internal task id used for polling status.

providerTaskId

Upstream provider task id.

model

Model id used for generation.

providerModel

Resolved provider model name.

pointsCharged

Final charged points for this create request.

status

Initial task status, usually submitted.

estimatedTime / estimatedTimeSec

Estimated processing time if available.

Frontend notes

  • Disable the primary action while submitting.
  • Show pointsCharged after create succeeds.
  • Use callback or webhook as the main completion path. Treat /unified-video/:taskId/status as fallback, manual lookup, or recovery.

すぐに試したいですか?

Settings で general API key を作成してから、ここに戻ってリクエスト例をコピーしてください。

API キーを開く