curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5-5-layers",
"prompt": "Split out the title text and the product",
"image_size": "auto",
"max_layers": 16,
"text_recognition": true,
"image_list": [
{
"url": "https://your-cdn.com/poster.jpg"
}
]
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "seedream-5-5-layers",
"prompt": "Split out the title text and the product",
"image_size": "auto",
"max_layers": 16,
"text_recognition": True,
"image_list": [{ "url": "https://your-cdn.com/poster.jpg" }]
}
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-5-layers',
prompt: 'Split out the title text and the product',
image_size: 'auto',
max_layers: 16,
text_recognition: true,
image_list: [{url: 'https://your-cdn.com/poster.jpg'}]
})
};
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-5-layers',
'prompt' => 'Split out the title text and the product',
'image_size' => 'auto',
'max_layers' => 16,
'text_recognition' => true,
'image_list' => [
[
'url' => 'https://your-cdn.com/poster.jpg'
]
]
]),
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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 31.36
}
}Seedream 5.5 Layers
Split one image into a base image plus up to 99 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. max_layers caps how many layers come back (default 16). Splitting takes about two to three minutes, longer with more layers.
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 containsbackground—opaquefor the base image,transparentfor layerstext_recognition— only withtext_recognition: true, on clean text layers: the text, each line’s box, and font styles
Sort by z_index, then place each layer using its bounding box to restore or recompose the artwork.
Pricing
Charged per request: one input image plus max_layers + 1 output images (the base image and every layer), whatever number of layers actually comes back.
| What | Tokens | USD |
|---|---|---|
| Input image | 0.42 | $0.0084 |
| Each output image, 1K or 1.5K | 1.04 | $0.0208 |
| Each output image, 2K or auto | 1.82 | $0.0364 |
With the default max_layers of 16: 18.10 tokens (0.3620)at1Kor1.5K,and31.36tokens(0.6272) at 2K or auto.
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-5-layers",
"prompt": "Split out the title text and the product",
"image_size": "auto",
"max_layers": 16,
"text_recognition": true,
"image_list": [
{
"url": "https://your-cdn.com/poster.jpg"
}
]
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "seedream-5-5-layers",
"prompt": "Split out the title text and the product",
"image_size": "auto",
"max_layers": 16,
"text_recognition": True,
"image_list": [{ "url": "https://your-cdn.com/poster.jpg" }]
}
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-5-layers',
prompt: 'Split out the title text and the product',
image_size: 'auto',
max_layers: 16,
text_recognition: true,
image_list: [{url: 'https://your-cdn.com/poster.jpg'}]
})
};
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-5-layers',
'prompt' => 'Split out the title text and the product',
'image_size' => 'auto',
'max_layers' => 16,
'text_recognition' => true,
'image_list' => [
[
'url' => 'https://your-cdn.com/poster.jpg'
]
]
]),
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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\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-5-layers\",\n \"prompt\": \"Split out the title text and the product\",\n \"image_size\": \"auto\",\n \"max_layers\": 16,\n \"text_recognition\": true,\n \"image_list\": [\n {\n \"url\": \"https://your-cdn.com/poster.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 31.36
}
}Body
Set to true to get the recognized text, line boxes and font styles for clean text layers. Stylized or handwritten text is not recognized. Free.
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"
