Skip to main content
POST
/
v1
/
images
/
generations
curl --request POST \
  --url https://api.powertokens.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedream-4-0-250828",
  "prompt": "Convert the image to Hayao Miyazaki animation style",
  "image": "https://example.com/input.jpg",
  "size": "2048x2048"
}
'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "size": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Image generation model name. Supported models include seedream-4-0-250828.

Available options:
seedream-4-0-250828
prompt
string
required

Image generation prompt. Recommended to be no more than 300 Chinese characters or 600 English words.

image
required

Reference image(s). Currently supported Seedream models accept 1-14 reference images.

size
string
default:1K

Output image size.

  • seedream-5-0-260128: supports 2K/3K or custom (total pixels 3686400-10404496, aspect ratio 1/16-16)
  • seedream-4-5-251128: supports 2K/4K or custom (total pixels 3686400-16777216, aspect ratio 1/16-16)
  • seedream-4-0-250828: supports 1K/2K/4K or custom (total pixels 921600-16777216, aspect ratio 1/16-16)
Example:

"2048x2048"

response_format
enum<string>
default:url

Response format.

Available options:
url,
b64_json
seed
integer
default:-1

Random seed. Supported by some Seedream models. Range [-1, 2147483647].

Required range: -1 <= x <= 2147483647
sequential_image_generation
enum<string>
default:disabled

Sequential image generation toggle. auto enables automatic detection mode, disabled turns off sequential generation (single image only). All currently supported Seedream models can use this capability.

Available options:
auto,
disabled
sequential_image_generation_options
object

Sequential image generation options. Only effective when sequential_image_generation=auto.

watermark
boolean
default:false

Whether to add a watermark.

Response

Call successful, returns image generation results.

created
integer<int64>

Creation time as a Unix timestamp (seconds).

data
object[]

List of generated images. May contain multiple images in sequential generation scenarios.