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-5-251128",
  "prompt": "A cute corgi running on grass, sunny day, realistic style",
  "size": "2048x2048",
  "response_format": "url"
}
'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "size": "<string>",
      "error": {
        "code": "<string>",
        "message": "<string>"
      }
    }
  ],
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Image generation model name. Supported models include seedream-5-0-260128, seedream-4-5-251128, and seedream-4-0-250828.

Available options:
seedream-5-0-260128,
seedream-4-5-251128,
seedream-4-0-250828
prompt
string
required

Image generation prompt. Recommended max 300 Chinese characters or 600 English words.

image

Reference images. The public Seedream models currently documented here support 1-14 reference images.

size
string

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].

sequential_image_generation
enum<string>
default:disabled

Sequential image generation switch. auto for auto mode, disabled for single image. Supported by the Seedream models currently documented here.

Available options:
auto,
disabled
sequential_image_generation_options
object

Sequential image generation options. Effective only when sequential_image_generation=auto.

watermark
boolean
default:true

Whether to add watermark.

Response

Success, returns image generation result.

created
integer<int64>

Unix timestamp of creation time (seconds).

data
object[]

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

metadata
object

Additional result metadata. Returned fields may vary by capability.