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": "Convert image to watercolor style",
"image": "https://example.com/reference.jpg",
"size": "2K",
"output_format": "png",
"watermark": false
}
'import requests
url = "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload = {
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "Convert image to watercolor style",
"image": "https://example.com/reference.jpg",
"size": "2K",
"output_format": "png",
"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: 'Convert image to watercolor style',
image: 'https://example.com/reference.jpg',
size: '2K',
output_format: 'png',
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' => 'Convert image to watercolor style',
'image' => 'https://example.com/reference.jpg',
'size' => '2K',
'output_format' => 'png',
'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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PENDING_QUEUE",
"message": "success",
"id": "30d9b07d-7349-4cbc-8e11-9ba302c6d165"
}Image-to-Image
Image-to-Image - Submit async image generation task, return id
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": "Convert image to watercolor style",
"image": "https://example.com/reference.jpg",
"size": "2K",
"output_format": "png",
"watermark": false
}
'import requests
url = "https://api.ttapi.io/sd/api/v3/images/generations/tasks"
payload = {
"model": "doubao-seedream-5-0-pro-260628",
"prompt": "Convert image to watercolor style",
"image": "https://example.com/reference.jpg",
"size": "2K",
"output_format": "png",
"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: 'Convert image to watercolor style',
image: 'https://example.com/reference.jpg',
size: '2K',
output_format: 'png',
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' => 'Convert image to watercolor style',
'image' => 'https://example.com/reference.jpg',
'size' => '2K',
'output_format' => 'png',
'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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\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\": \"Convert image to watercolor style\",\n \"image\": \"https://example.com/reference.jpg\",\n \"size\": \"2K\",\n \"output_format\": \"png\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PENDING_QUEUE",
"message": "success",
"id": "30d9b07d-7349-4cbc-8e11-9ba302c6d165"
}background: transparent) mode. Submit async task and return id, use query endpoint to get results.Authorizations
Get your API key from the TTAPI Dashboard.
Body
Image-to-Image request parameters
Model name.
doubao-seedream-5-0-pro-260628, doubao-seedream-5-0-flash-260915 "doubao-seedream-5-0-pro-260628"
Text prompt describing the editing intent.
Reference image URL. Supports jpeg/png/webp/bmp/tiff/gif/heic/heif formats, aspect ratio [1/16, 16], max size 30MB.
Image size. 5.0 pro/flash options: 1K, 1.5K, 2K (default 2K), or pixel values like 2048x1024.
1K, 1.5K, 2K Output image format.
png, jpeg Return format. url returns image download link, b64_json returns Base64 encoded data.
url, b64_json Image alpha channel setting. transparent generates transparent background, opaque generates opaque background.
transparent, opaque Whether to add watermark. true=Display "AI Generated" in bottom-right, false=Do not add.
true, false false
Prompt optimization config
Show child attributes
Show child attributes
Task timeout threshold (seconds). Range [3600, 259200] (1-72 hours), default 172800 (48 hours)
Execution priority. Range [0, 9], higher value = higher priority, default 0 (FIFO)
End user unique identifier, max 64 characters. Recommend passing a hashed string