role: reference_image (up to 9). They are numbered in order as image 1, image 2…; say in the prompt what each one is for, e.g. [image 1].
Want to try it? Open Create video task, pick “Multi-image reference” in the request example dropdown, enter your API Key and click Try it.
Request
$DREAMTO_API_KEY is your API Key.
curl -X POST "https://api.dreamto.ai/api/v3/contents/generations/tasks" \
-H "Authorization: Bearer $DREAMTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.5-flash",
"content": [
{
"type": "text",
"text": "The boy with glasses in a blue T-shirt from [image 1] and the corgi from [image 2] sit on the lawn from [image 3], cartoon style"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/boy.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/dog.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/grass.png"
},
"role": "reference_image"
}
],
"ratio": "16:9",
"duration": 5,
"resolution": "720p"
}'
import os
import requests
payload = {
"model": "seedance-2.5-flash",
"content": [
{
"type": "text",
"text": "The boy with glasses in a blue T-shirt from [image 1] and the corgi from [image 2] sit on the lawn from [image 3], cartoon style"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/boy.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/dog.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/grass.png"
},
"role": "reference_image"
}
],
"ratio": "16:9",
"duration": 5,
"resolution": "720p"
}
resp = requests.post(
"https://api.dreamto.ai/api/v3/contents/generations/tasks",
headers={"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"},
json=payload,
timeout=60,
)
print(resp.status_code, resp.json()) # {'id': 'task_...', 'request_id': 'req_...'}
const payload = {
"model": "seedance-2.5-flash",
"content": [
{
"type": "text",
"text": "The boy with glasses in a blue T-shirt from [image 1] and the corgi from [image 2] sit on the lawn from [image 3], cartoon style"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/boy.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/dog.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/grass.png"
},
"role": "reference_image"
}
],
"ratio": "16:9",
"duration": 5,
"resolution": "720p"
};
const resp = await fetch("https://api.dreamto.ai/api/v3/contents/generations/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DREAMTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(resp.status, await resp.json()); // { id: 'task_...', request_id: 'req_...' }
Response
On success the API returns HTTP 200.request_id equals the X-Request-Id header; include it when contacting support:
{
"id": "task_8c1d2e3f4a5b6c7d8e9f0a1b",
"request_id": "req_3f9a1c2b7d4e5f60718293a4"
}
id, poll Get task; when status is succeeded, read content.video_url. See Create video task for every parameter and value.
