Tokaify APITokaify API
API Reference
AI Model APIImagesDoubao APIdoubao-seedream-4-5-251128

Image Generation

doubao-seedream-4-5-251128 Image Generation API

Designed for highly consistent multi-image generation, brand assets, product showcase visuals, and text-heavy creative assets.

POST
/v1/images/generations

Authorization

BearerAuth

AuthorizationBearer <token>

Model relay interface recognition. Request heading: Autoration: Bearer .

In: header

Request Body

application/json

model*string

Picture model name.

Default"doubao-seedream-4-5-251128"
prompt*string

Inverted words. Range: 1 to 200000 characters, with a specific upper limit based on the model official interface.

n?integer

Returns the number of pictures. Creates the number of candidates. Scope: 1 to 10; specific ceilings are based on the model official interface.

Range1 <= value <= 10
size?string

Generates dimensions, such as FD_PROTEC_0.

quality?string

Generates a quality slot.

style?string

Generates style.

response_format?string

Picture returns format, e. g. FD_PROTEC_0 or FD_PROTEC_1__.

user?string

End-user identification.

Response Body

application/json

curl -X POST "https://api.tokaify.com/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "doubao-seedream-4-5-251128",    "prompt": "The ability to describe this API gateway in plain Chinese."  }'
{
  "created": 1,
  "data": {}
}

Request Parameters

FieldTypeRequiredDefaultDescription
modelstringYesNoneFixed to doubao-seedream-4-5-251128.
promptstringYesNoneGeneration prompt, supporting both Chinese and English. For complex layouts, clearly specify the aspect ratio, text content, subject, and style.
imagestring or string[]NoNoneReference image URL or Base64 for image-to-image generation, multi-image blending, and character or product consistency.
sizestringNo2KSupports 1K, 2K, 4K, or <width>x<height>; an aspect ratio between 1:16 and 16:1 is recommended.
response_formatstringNourlResponse format. Supports url or b64_json.
watermarkbooleanNotrueWhether to add an AI-generated watermark.
sequential_image_generationstringNodisabledImage-set mode. Supports disabled or auto.
sequential_image_generation_options.max_imagesintegerNo1Maximum output count for image sets, from 1 to 15.
streambooleanNofalseWhether to enable streaming output.
userstringNoNoneEnd-user identifier.

Example Code

curl https://api.tokaify.com/v1/images/generations \
  -H "Authorization: Bearer $TOKAIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-4-5-251128",
    "prompt": "Generate a Tokaify product launch poster titled Tokaify API with a futuristic style and strong contrast lighting.",
    "size": "2K",
    "watermark": false,
    "response_format": "url"
  }'
import requests

response = requests.post(
    "https://api.tokaify.com/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_TOKAIFY_API_KEY"},
    json={
        "model": "doubao-seedream-4-5-251128",
        "prompt": "Generate a Tokaify product launch poster titled Tokaify API with a futuristic style and strong contrast lighting.",
        "size": "2K",
        "watermark": False,
        "response_format": "url",
    },
)
print(response.json())
const response = await fetch("https://api.tokaify.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TOKAIFY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "doubao-seedream-4-5-251128",
    prompt: "Generate a Tokaify product launch poster titled Tokaify API with a futuristic style and strong contrast lighting.",
    size: "2K",
    watermark: false,
    response_format: "url",
  }),
});
console.log(await response.json());

Response Example

{
  "created": 1777432320,
  "data": [
    {
      "url": "https://api.tokaify.com/assets/images/seedream-4-5.png",
      "b64_json": null,
      "revised_prompt": "Tokaify API product launch poster, futuristic tone, high-contrast lighting, clear title text."
    }
  ]
}

Notes

Billing follows the configured model and channel ratios. Seedream 4.5 emphasizes text rendering and consistency, does not support guidance_scale, and high resolution plus image-set generation will increase latency and cost.

How is this guide?

Last updated on