curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "volcengine/doubao-seedream-4.5",
"prompt": "The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.",
"size": "1024x1024"
}
'import requests
url = "https://api.tikway.ai/v1/images/generations"
payload = {
"model": "volcengine/doubao-seedream-4.5",
"prompt": "The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.",
"size": "1024x1024"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'volcengine/doubao-seedream-4.5',
prompt: 'The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.',
size: '1024x1024'
})
};
fetch('https://api.tikway.ai/v1/images/generations', 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.tikway.ai/v1/images/generations",
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' => 'volcengine/doubao-seedream-4.5',
'prompt' => 'The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.',
'size' => '1024x1024'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tikway.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tikway.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1788920400,
"data": [
{
"index": 0,
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
],
"model": "volcengine/doubao-seedream-5.0-pro",
"size": "2048x2048"
}Image generation
Seedream uses /v1/images/generations. model and prompt are required, response_format is optional.
| Model | Dimensions | Other parameters |
|---|---|---|
volcengine/doubao-seedream-5.0-pro | 2K, 3K or compliant WIDTHxHEIGHT | output_format, background, response_format, watermark, optimize_prompt_options |
volcengine/doubao-seedream-4.5 | 2K, 4K or compliance WIDTHxHEIGHT | response_format, watermark, optimize_prompt_options; transparent background capability is subject to the account upstream |
Transparent backgrounds must also be used with output_format=png. The current specification does not expose group diagram control and reference diagram fields.
curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "volcengine/doubao-seedream-4.5",
"prompt": "The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.",
"size": "1024x1024"
}
'import requests
url = "https://api.tikway.ai/v1/images/generations"
payload = {
"model": "volcengine/doubao-seedream-4.5",
"prompt": "The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.",
"size": "1024x1024"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'volcengine/doubao-seedream-4.5',
prompt: 'The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.',
size: '1024x1024'
})
};
fetch('https://api.tikway.ai/v1/images/generations', 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.tikway.ai/v1/images/generations",
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' => 'volcengine/doubao-seedream-4.5',
'prompt' => 'The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.',
'size' => '1024x1024'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tikway.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tikway.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"volcengine/doubao-seedream-4.5\",\n \"prompt\": \"The scenery of the mountains at sunset, the setting sun reflects the mountains and the sky, the light and shadow are soft, the picture is natural and delicate, and has a cinematic feel.\",\n \"size\": \"1024x1024\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1788920400,
"data": [
{
"index": 0,
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
],
"model": "volcengine/doubao-seedream-5.0-pro",
"size": "2048x2048"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Use Doubao Seedream 5.0 Pro to generate images from text.
Required. Forward exposes the model ID. The gateway forwards to the OFOX OpenAI Images compatible interface according to the doubao/seedream model family.
volcengine/doubao-seedream-5.0-pro, volcengine/doubao-seedream-4.5 Pictures generate prompt words. Official recommendations are no more than about 300 Chinese characters or 600 English words.
1"A future city floating on the sea of clouds, with movie-level light and shadow and rich architectural details at sunrise"
doubao-seedream-5.0: Supports 2K, 3K or specified width and height pixel values; default 2048x2048; total pixel range [2560x1440, 3072x3072x1.1025]; aspect ratio range [1/16, 16]. doubao-seedream-4.5: Supports 2K, 4K or specified width and height pixel values; default 2048x2048; total pixel range [2560x1440, 4096x4096]; aspect ratio range [1/16, 16]. doubao-seedream-4.0: Supports 1K, 2K, 4K or specified width and height pixel values; default 2048x2048; total pixel range [1280x720, 4096x4096]; aspect ratio range [1/16, 16].
auto, 1K, 1.5K, 2K Output picture format. Transparent backgrounds must use png.
png, jpeg Output background. transparent can only be used with output_format=png.
opaque, transparent Response format. b64_json returns Base64; url returns a temporary image link; the default is b64_json.
b64_json, url Whether to add a watermark to the generated image.
Response
Doubao Seedream 5.0 Pro image generation successful response.
Image creation time, Unix timestamp, unit is seconds.
x >= 0Generate results. The model returns one image at a time.
1 elementThe model ID that actually executes the request.
actual generated size.
^[1-9][0-9]*x[1-9][0-9]*$Actual output format.
png, jpeg The actual background type used.
opaque, transparent The usage information generated this time.
Hide child attributes
Hide child attributes
Enter the number of tokens.
x >= 0Output the number of tokens.
x >= 0Total number of tokens.
x >= 0Number of images generated.
x >= 0
