cURL
curl --request POST \
--url https://api.ttapi.io/sd/api/v3/images/generations/tasks \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "将两张图片中的人物融合在同一场景中",
"image": [
"https://example.com/ref1.jpg",
"https://example.com/ref2.jpg"
],
"size": "2K",
"watermark": false
}
'import requests
url = "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload = {
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "将两张图片中的人物融合在同一场景中",
"image": ["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"],
"size": "2K",
"watermark": False
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedream-5-0-pro-260628',
prompt: '将两张图片中的人物融合在同一场景中',
image: ['https://example.com/ref1.jpg', 'https://example.com/ref2.jpg'],
size: '2K',
watermark: false
})
};
fetch('https://api.ttapi.io/sd/api/v3/images/generations/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ttapi.io/sd/api/v3/images/generations/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedream-5-0-pro-260628',
'prompt' => '将两张图片中的人物融合在同一场景中',
'image' => [
'https://example.com/ref1.jpg',
'https://example.com/ref2.jpg'
],
'size' => '2K',
'watermark' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ttapi.io/sd/api/v3/images/generations/tasks")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/sd/api/v3/images/generations/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PENDING_QUEUE",
"message": "success",
"id": "30d9b07d-7349-4cbc-8e11-9ba302c6d165"
}Seedream
多图融合
多图融合 - 提交异步图片生成任务,返回 id
POST
/
sd
/
api
/
v3
/
images
/
generations
/
tasks
cURL
curl --request POST \
--url https://api.ttapi.io/sd/api/v3/images/generations/tasks \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "将两张图片中的人物融合在同一场景中",
"image": [
"https://example.com/ref1.jpg",
"https://example.com/ref2.jpg"
],
"size": "2K",
"watermark": false
}
'import requests
url = "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload = {
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "将两张图片中的人物融合在同一场景中",
"image": ["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"],
"size": "2K",
"watermark": False
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedream-5-0-pro-260628',
prompt: '将两张图片中的人物融合在同一场景中',
image: ['https://example.com/ref1.jpg', 'https://example.com/ref2.jpg'],
size: '2K',
watermark: false
})
};
fetch('https://api.ttapi.io/sd/api/v3/images/generations/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ttapi.io/sd/api/v3/images/generations/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedream-5-0-pro-260628',
'prompt' => '将两张图片中的人物融合在同一场景中',
'image' => [
'https://example.com/ref1.jpg',
'https://example.com/ref2.jpg'
],
'size' => '2K',
'watermark' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ttapi.io/sd/api/v3/images/generations/tasks")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/sd/api/v3/images/generations/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seedream-5-0-pro-260628\",\n \"prompt\": \"将两张图片中的人物融合在同一场景中\",\n \"image\": [\n \"https://example.com/ref1.jpg\",\n \"https://example.com/ref2.jpg\"\n ],\n \"size\": \"2K\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PENDING_QUEUE",
"message": "success",
"id": "30d9b07d-7349-4cbc-8e11-9ba302c6d165"
}这是 Seedream 图片生成 API 的多图融合接口。基于多张参考图片(2-10 张)融合生成新图片。提交异步任务后返回
id,需通过查询接口获取结果。请求体
application/json
多图融合请求参数
模型名称。
可用选项:
doubao-seedream-5-0-pro-260628, doubao-seedream-5-0-flash-260915 示例:
"doubao-seedream-5-0-pro-260628"
文本提示词,用于描述融合生成意图。
参考图片 URL 数组,支持 2-10 张。
Required array length:
2 - 10 elements图像尺寸。5.0 pro/flash 可选:1K、1.5K、2K(默认 2K),或指定像素值。
可用选项:
1K, 1.5K, 2K 输出图像格式。
可用选项:
png, jpeg 返回格式。
可用选项:
url, b64_json 是否添加水印。true=右下角显示「AI 生成」,false=不添加。
可用选项:
true, false 示例:
false
提示词优化配置
Show child attributes
Show child attributes
任务超时阈值(秒)。范围 [3600, 259200](1~72 小时),默认 172800(48 小时)
执行优先级。范围 [0, 9],数值越大优先级越高,默认 0(FIFO)
终端用户唯一标识符,不超过 64 字符。建议传入哈希处理后的字符串
最后修改于 2026年10月23日