Logo

doubao-seedance-2-0-260128(Image To Video)

POST/v3/contents/generations/tasks

Authentication

  1. Sign up for an account
  2. Navigate to the API Keys section in your dashboard
  3. Generate a new API key (sk-xxxxx)
  4. Copy and securely store your API key

Create Task Request

curl --location 'http://45.32.108.182:15555/api/v3/contents/generations/tasks' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "model": "doubao-seedance-2-0-260128",
  "content": [
      {
          "type": "text",
          "text": "Cute pet birthday scene, puppy wearing a party hat in a cozy home setting, mini birthday cake, warm lighting, wagging tail and licking cream, soft and heartwarming style, dynamic short video, HD 60fps, soft filter"
      },
      {
          "type": "image_url",
          "image_url": {
              "url": "https://docs.test.maxtoken.io/dog.png"
          },
          "role": "reference_image",
      },
      {
          "type": "image_url",
          "image_url": {
              "url": "https://docs.test.maxtoken.io/happy.png"
          },
          "role": "reference_image",
      }
  ],
  "generate_audio": true,
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "camera_fixed": false,
  "watermark": true
}'

Resopnese Example

  {
    "id": "cgt-20251225201056-abc"
  }

Get Task Result Request

curl --location 'http://45.32.108.182:15555/api/v3/contents/generations/tasks/id' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json'

Core Parameters

ParameterTypeRequiredDefaultRangeDescription
modelstring✅ Yes--
contentarray✅ Yes--Information input to the model for video generation, supporting text, image, video, audio information.
>content.typestring✅ Yes-text
image_url
video_url
audio_url
Type of input content. Use text for text input, image_url for image input ,video_url for video input,audio_url for video input
>content.textstring✅ Yes (if type is text)--Text content input to the model, describing the expected video to be generated.
>content.image_urlobject✅ Yes (if type is image_url)--Image object input to the model.
>>content.image_url.urlstring✅ Yes (if image_url is used)--Image information, which can be an image URL or Base64 encoded image.
>content.video_urlobject✅ Yes (if type is video_url)--Video object input to the model.
>>content.video_url.urlstring✅ Yes (if video_url is used)--Video information, which can be an video URL
>content.audio_urlobject✅ Yes (if type is audio_url)--Audio object input to the model.
>>content.audio_url.urlstring✅ Yes (if audio_url is used)--Audio information, which can be an audio URL
>content.rolestring❌ No-first_frame
last_frame
reference_image
reference_video
reference_audio
Position or purpose of the image. Different roles correspond to different video generation scenarios.
generate_audioboolean❌ Notrue-Whether to include synchronized sound with the video.
resolutionstring❌ No480p 720p 1080p-Video resolution. Default values vary by model.
ratiostring❌ No21:9 16:9 4:3 1:1 3:4 9:16-Aspect ratio of the generated video.
durationinteger❌ No4~155Duration of the generated video in seconds.
camera_fixedboolean❌ Notrue-Whether to fix the camera.
watermarkboolean❌ Notrue-Whether to include watermark in the generated video.