青峰智影青峰智影
API ReferenceMirava
AI Model APIVideosSeedance Format

Create Video Generation Task

POST /v1/video/generations — supports text-to-video, image-to-video, and reference-asset-to-video.

Endpoint

POST https://qfzyapi.qfzy.art/v1/video/generations
Authorization: Bearer {api_key}
Content-Type: application/json

OpenAI Video compatible alias: POST /v1/videos.

Request Body

FieldTypeRequiredDescription
modelstringYesModel code, see model list
contentarrayYesContent array; may contain text, image, video, and audio references
metadataobjectNoGeneration parameters, see parameters

The content Array

Each item in content is an object distinguished by type and described by role.

typeDescriptionKey Fields
textText prompttext
image_urlImage referenceimage_url.url, role
video_urlVideo referencevideo_url.url, role
audio_urlAudio referenceaudio_url.url, role

Reference Roles (role)

roleApplies ToDescription
first_frameimage_urlFirst frame image
last_frameimage_urlLast frame image
reference_imageimage_urlReference image
reference_videovideo_urlReference video
reference_audioaudio_urlReference audio

Text-to-Video Example

curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "content": [
      { "type": "text", "text": "Sunset by the sea, waves crashing on the rocks, slow aerial push-in" }
    ],
    "metadata": { "resolution": "1080p", "duration": 5, "ratio": "16:9" }
  }'

Image-to-Video Example

curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-260628",
    "content": [
      { "type": "text", "text": "Camera slowly orbits the subject" },
      {
        "type": "image_url",
        "role": "first_frame",
        "image_url": { "url": "https://example.com/first.png" }
      }
    ],
    "metadata": { "resolution": "1080p", "duration": 5, "ratio": "adaptive" }
  }'

Reference Asset Example

curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-260628",
    "content": [
      { "type": "text", "text": "Generate a city time-lapse in the style of the reference image" },
      {
        "type": "image_url",
        "role": "reference_image",
        "image_url": { "url": "https://example.com/ref.png" }
      },
      {
        "type": "audio_url",
        "role": "reference_audio",
        "audio_url": { "url": "https://example.com/bgm.mp3" }
      }
    ],
    "metadata": { "resolution": "1080p", "duration": 8, "ratio": "16:9", "generate_audio": true }
  }'

Response

{
  "id": "task_xxxxxxxx",
  "task_id": "task_xxxxxxxx",
  "object": "video.generation",
  "model": "doubao-seedance-2-0-260128",
  "status": "queued",
  "created_at": 1735660800
}

Once you have the task_id, poll the result via the Query Task Status endpoint.

Common Errors

ErrorCauseHandling
400 invalid modelWrong model codeVerify the model code spelling
400 group mismatchGroup does not match the channel familyConfirm the group the api_key belongs to
400 invalid content typeUnsupported content item typeCheck whether the type is in the supported list
413 Payload Too LargeRequest body too largeUse asset library references instead of embedding large files

How is this guide?