curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5-pro",
"prompt": "A serene Japanese garden at dawn, soft light",
"image_size": "2K",
"ratio": "16:9"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "seedream-5-pro",
"prompt": "A serene Japanese garden at dawn, soft light",
"image_size": "2K",
"ratio": "16:9"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedream-5-pro',
prompt: 'A serene Japanese garden at dawn, soft light',
image_size: '2K',
ratio: '16:9'
})
};
fetch('https://api.goenhance.ai/api/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.goenhance.ai/api/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' => 'seedream-5-pro',
'prompt' => 'A serene Japanese garden at dawn, soft light',
'image_size' => '2K',
'ratio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Seedream 5.0 Pro
Seedream 5.0 Pro text-to-image and image-to-image. Pass image_list to use reference images (up to 10), or omit it for pure text-to-image. Always returns a single image — this model does not support sequential (grouped) image generation.
To split an image into editable layers, use the separate seedream-5-pro-layers model instead.
Transparent output
Set background to transparent for an image with an alpha channel. This works for image-to-image only, and the input image must already have transparency.
Pricing
| What | Tokens | USD |
|---|---|---|
| Output, 1K or 1.5K | 1.725 | $0.0345 |
| Output, 2K | 3.45 | $0.069 |
| Each reference image after the first | 0.115 | $0.0023 |
The first reference image is free.
Example: 2K with 3 reference images costs 3.45 plus 2 surcharges, so 3.68 tokens.
Returns an img_uuid; poll GET /api/v1/jobs/detail (or use custom_callback_url) to get the generated image.
curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5-pro",
"prompt": "A serene Japanese garden at dawn, soft light",
"image_size": "2K",
"ratio": "16:9"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "seedream-5-pro",
"prompt": "A serene Japanese garden at dawn, soft light",
"image_size": "2K",
"ratio": "16:9"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedream-5-pro',
prompt: 'A serene Japanese garden at dawn, soft light',
image_size: '2K',
ratio: '16:9'
})
};
fetch('https://api.goenhance.ai/api/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.goenhance.ai/api/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' => 'seedream-5-pro',
'prompt' => 'A serene Japanese garden at dawn, soft light',
'image_size' => '2K',
'ratio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedream-5-pro\",\n \"prompt\": \"A serene Japanese garden at dawn, soft light\",\n \"image_size\": \"2K\",\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Headers
Body
Model name. Must be seedream-5-pro.
seedream-5-pro Text prompt describing the image.
1 - 2000Output aspect ratio. Defaults to auto, which lets the model choose the framing from your prompt.
auto, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9 Output quality tier. 1K, 1.5K and 2K are available for 5.0 Pro (5.0 Lite offers 2K/3K/4K). 1.5K costs the same as 1K and looks better.
1K, 1.5K, 2K Optional reference images for image-to-image, [{"url": "https://..."}]. Up to 10 images. Each one adds 0.15 tokens (= $0.0030).
1 - 10 elementsShow child attributes
Show child attributes
Set to transparent to get an image with an alpha channel. Image-to-image only, and the input image must itself have transparency. Output is png; combining it with output_format: jpeg is rejected.
opaque, transparent Output file format. Defaults to png when background is transparent.
png, jpeg Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.
"https://your-server.com/goenhance/callback"
