Seedream 5.5 Pro · Text to image
curl --request POST \
--url https://api.gravitex.ai/v1/images/generationsimport requests
url = "https://api.gravitex.ai/v1/images/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.gravitex.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.gravitex.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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gravitex.ai/v1/images/generations"
req, _ := http.NewRequest("POST", url, nil)
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.gravitex.ai/v1/images/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySeedream 5.5 Pro
Seedream 5.5 Pro · Text to image
Seedream 5.5 Pro Text to image parameters, limits, and copyable examples
POST
/
v1
/
images
/
generations
Seedream 5.5 Pro · Text to image
curl --request POST \
--url https://api.gravitex.ai/v1/images/generationsimport requests
url = "https://api.gravitex.ai/v1/images/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.gravitex.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.gravitex.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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gravitex.ai/v1/images/generations"
req, _ := http.NewRequest("POST", url, nil)
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.gravitex.ai/v1/images/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyIntroduction
Provide a prompt to generate one image; omitimage. Native transparent output is supported. For reference-based editing, fusion, and decomposition, see image-to-image.
Endpoint and authentication
POST https://api.gravitex.ai/v1/images/generations
Authorization: Bearer sk-xxxxxxxxxx and Content-Type: application/json. Parameters and pricing
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | dola-seedream-5-5-261028 |
prompt | string | Yes | Describe the image to generate; keep Chinese prompts within 300 characters and English prompts within 600 words |
size | string | No | Default 2K; 1K, 1.5K, 2K, or custom WIDTHxHEIGHT |
output_format | string | No | Default: png. jpeg / png; use PNG for transparent output. |
response_format | string | No | Default: url. url (valid for 24 hours) or b64_json |
watermark | boolean | No | Default: true. Add an AI-generated watermark in the bottom-right corner |
background | string | No | Default: auto. auto / transparent / opaque |
optimize_prompt_options | object | No | Default: {"mode":"standard"}. Only standard is supported |
n or use 1; send separate requests for multiple results. See shared parameters for full defaults and safety_identifier. Neither model supports quality, sequential generation, streaming, or web search.
size
Full size rules and dimension table Default2K. Use 1K, 1.5K, 2K, or custom WIDTHxHEIGHT. Custom total pixels: [921600, 4624220]; aspect ratio: [1/16, 16]. 1024x1024 is valid; 512x512 is not.
background
| Value | Description |
|---|---|
auto | Default; model decides from the prompt and output format. JPEG has no alpha channel. |
opaque | RGB output without an alpha channel |
transparent | RGBA output with an alpha channel; use PNG |
Text-to-image supports native transparency without a reference image. Check
data[].background for actual output transparency; it may differ from the request.Never combine
background: "transparent" with JPEG output.Request examples
Each example includes a complete JSON body and matching cURL. Replacesk-xxxxxxxxxx with your API Key.
Text to image
{
"model": "dola-seedream-5-5-261028",
"prompt": "Futuristic city at night, movie poster style, 16:9 landscape",
"size": "2K",
"output_format": "jpeg",
"watermark": false
}
curl --location 'https://api.gravitex.ai/v1/images/generations' \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "dola-seedream-5-5-261028",
"prompt": "Futuristic city at night, movie poster style, 16:9 landscape",
"size": "2K",
"output_format": "jpeg",
"watermark": false
}'
Transparent text to image
{
"model": "dola-seedream-5-5-261028",
"prompt": "A cartoon rocket sticker on a transparent background",
"background": "transparent",
"output_format": "png",
"size": "1K"
}
curl --location 'https://api.gravitex.ai/v1/images/generations' \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "dola-seedream-5-5-261028",
"prompt": "A cartoon rocket sticker on a transparent background",
"background": "transparent",
"output_format": "png",
"size": "1K"
}'
Success response
Readdata[].url and save within 24 hours, or decode data[].b64_json when using response_format: "b64_json". Response example, fields, and usage
