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_bodySeedream 5.0 Pro Layers
Split one image into a base image plus up to 16 independently editable layers. Every layer is a transparent PNG, and each comes back with the coordinates you need to put it back together.
Pass exactly one image in image_list. prompt is optional — leave it out for an automatic split.
Reading the result
Each item in the result carries:
z_index— 0 is the base image; layers ascend from 1bounding_box.absolute—[left, top, right, bottom]in the base image’s pixelsbounding_box.normalized— the same box on a 0-1000 scale, for any canvas sizenameanddescription— what the layer contains
Sort by z_index, then place each layer using its bounding box to restore or recompose the artwork.
Pricing
| Tier | Tokens | USD |
|---|---|---|
| 1K, 1.5K or auto | 14.66 | $0.2932 |
| 2K | 15.53 | $0.3106 |
Charged per request, not per image. The model decides how many layers to produce, so a request is billed as one base image plus 16 layers regardless of how many come back. Layers are billed at half the rate of a normal image, which is why a split costs far less than 17 separate generations.
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_bodyHeaders
Body
Model name. Must be seedream-5-pro-layers.
seedream-5-pro-layers The single image to split. Exactly one image is required.
1 elementShow child attributes
Show child attributes
Optional. Leave it out and the model finds and splits the main elements on its own. Provide it to name the elements to split, in plain language or with <bbox> coordinates.
1 - 2000Output tier. auto follows the input image's size. Only tier names are accepted here — pixel values such as 2048x2048 are rejected.
1K, 1.5K, 2K, auto Output file format. This only affects the base image — every layer is always a transparent png.
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"
