GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
rreAPI Docs

Seedream 5.0 Flash

ByteDance Seedream 5.0 Flash on reAPI — async image generation and editing at 1K, 1.5K or 2K for one flat per-image price. Full parameter reference, layer decomposition and billing.

ByteDance's Seedream 5.0 Flash image model on reAPI. Text-to-image, image-to-image and multi-reference fusion (up to 10 reference images), point / box / sketch-mark editing, transparent-background editing and layer decomposition, at 1K, 1.5K or 2K or an exact pixel size — all at one flat price per image. Async-first: submit returns a task_id; poll until ready. See current pricing on the model page.

Quick example

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-flash",
    "prompt": "A minimalist coffee shop poster with the headline \"SLOW MORNINGS\" in bold serif type",
    "resolution": "1.5K",
    "size": "3:4"
  }'
import requests

resp = requests.post(
    "https://reapi.ai/api/v1/images/generations",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "doubao-seedream-5-0-flash",
        "prompt": 'A minimalist coffee shop poster with the headline "SLOW MORNINGS"',
        "resolution": "1.5K",
        "size": "3:4",
    },
    timeout=30,
)
print(resp.json())
const r = await fetch("https://reapi.ai/api/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "doubao-seedream-5-0-flash",
    prompt: 'A minimalist coffee shop poster with the headline "SLOW MORNINGS"',
    resolution: "1.5K",
    size: "3:4",
  }),
});
console.log(await r.json());
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "model":      "doubao-seedream-5-0-flash",
        "prompt":     `A minimalist coffee shop poster with the headline "SLOW MORNINGS"`,
        "resolution": "1.5K",
        "size":       "3:4",
    })
    req, _ := http.NewRequest("POST",
        "https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}

Authentication

Every call needs a Bearer token. Generate keys at reapi.ai/settings/apikeys.

Authorization: Bearer YOUR_API_KEY

Endpoint

POST /api/v1/images/generations
GET  /api/v1/tasks/{id}

Submission is async. The POST returns immediately with a task_id; the task endpoint returns the same envelope until completion. Polling does not consume credits. Seedream 5.0 Flash favors quality over speed — a 1K image takes about 90 seconds and a 2K image about 160 seconds — so poll every 5–10 seconds and allow about five minutes before giving up.

Request body

Mode is implicit: no image_urls is text-to-image; one or more is image-to-image, multi-reference fusion or a marked-up edit. layer_decomposition: true switches to layer splitting.

FieldTypeDefaultNotes
modelstring—doubao-seedream-5-0-flash. Required.
promptstring—Describe the image, up to 32000 chars (the model works best under about 600 English words). Required, except with layer_decomposition: true. Supports <point> / <bbox> coordinates — see Editing.
sizestringautoauto, a ratio, a tier, or exact pixels — see size.
resolutionstring1K1K / 1.5K / 2K (case-insensitive). Every tier costs the same. Ignored when size is exact pixels; when size is a tier, size wins.
ninteger1Only 1 — one image per request.
image_urlsstring[]—Up to 10 reference images (jpeg / png / webp / bmp / tiff / gif / heic / heif, each ≤ 30 MB, ≤ 36,000,000 px, aspect ratio 1/16–16). Public HTTP(S) URLs.
output_formatstringjpegjpeg / png.
backgroundstringopaqueopaque / transparent. transparent edits one image that already has an alpha channel — needs exactly one image_urls entry and output_format: "png".
layer_decompositionbooleanfalseSplit one image into a base image plus up to 16 transparent layers — see Layer decomposition.
optimize_prompt_optionsobject{ "mode": "standard" }Prompt optimization. mode accepts standard only.
watermarkbooleanfalseStamp an "AI generated" mark in the bottom-right corner.
content_filterbooleantrueScreens the prompt and input images before generation — see content_filter.

Checked before anything is submitted or charged:

  • prompt is present unless layer_decomposition is true
  • n is 1; image_urls has at most 10 entries
  • resolution is 1K, 1.5K or 2K (no 3K / 4K)
  • size is one of the forms below; exact pixels total 921,600–4,624,220 with an aspect ratio between 1/16 and 16
  • layer_decomposition: true needs exactly one image and a size of auto, 1K, 1.5K or 2K
  • background: "transparent" needs exactly one image and output_format: "png"

size — string, default auto

Four forms are accepted:

  1. auto — send only the resolution tier and let the model pick the frame from the prompt and references.
  2. A ratio, combined with resolution: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9. The x spelling (16x9) is also accepted — lowercase, no spaces. Any other ratio returns 400.
  3. A tier — 1K, 1.5K or 2K, the same as setting resolution.
  4. Exact pixels — WIDTHxHEIGHT such as 2048x1024 (X and × also work). The total must be between 921,600 and 4,624,220 pixels and the aspect ratio between 1/16 and 16; resolution is ignored.

Tier × ratio → output pixels:

Tier1:14:33:416:99:163:22:32:11:221:9
1K1024×10241152×864864×11521312×736736×13121248×832832×12481440×720720×14401568×672
1.5K1536×15361792×13441344×17922048×11521152×20481872×12481248×18722176×10881088×21762352×1008
2K2048×20482304×17281728×23042560×14401440×25602496×16641664×24962880×14401440×28803024×1296

layer_decomposition — boolean, default false

When true, Seedream 5.0 Flash splits your image into one base image plus up to 16 transparent PNG layers, with the position and stacking order of each.

  • Send exactly one PNG or JPEG image in image_urls (total pixels 262,144–36,000,000, ≤ 30 MB).
  • size accepts auto, 1K, 1.5K or 2K only.
  • prompt is optional — without it the model finds the main elements itself. Use <bbox> coordinates to say which elements to separate, for example "Separate the title <bbox>180 64 812 198</bbox> and the parrot <bbox>347 305 642 997</bbox>".
  • output_format sets the base image's format only; layers are always PNG.

Billing is per image returned — see Pricing.

Editing with coordinates and marks

Point the model at a region in either of two ways:

  • Coordinates in the prompt — <point>x y</point> marks a spot and lets the model judge the area; <bbox>x1 y1 x2 y2</bbox> marks a box by its top-left and bottom-right corners. Coordinates are normalized to 0–1000. Example: "Place the subject of image 1 <bbox>179 283 796 986</bbox> at image 2 <bbox>118 331 933 871</bbox>."
  • Hand-drawn marks — send an image with sketched outlines or arrows and describe them: "Add a stack of magazines in the marked lower-left area and a cup of coffee in the marked right area. Remove all sketch lines."

content_filter — boolean, default true

With the default (true), the prompt and input images are screened before the task is submitted. A rejected request fails with a content-policy error (80006) and is refunded.

Set content_filter: false to skip that screening. What changes:

  • API keys only. The website playground always runs with the filter on.
  • Same parameters. Every field and rule in this document applies unchanged. Unfiltered requests bill on their own line in the pricing table.
  • Output lands in an isolated bucket and its URLs stay valid for 30 days — mirror the files if you need them longer.

Platform terms apply to everything you generate either way.

Troubleshooting

FailureWhat it meansWhat to do
Synchronous 400 on submitA field breaks a rule above (ratio not in the list, n other than 1, layer mode without exactly one image, transparent background without png, …)The error names the field — fix and resubmit; nothing was charged
Task fails citing content policyThe prompt or an input image was rejected by the content filterFully refunded. Rephrase the prompt or replace the image
Layer decomposition fails with "could not be processed" or "too complex to decompose"The model splits graphic compositions — a title, a few subjects, a clean background. Photos, busy scenes and multi-panel portraits are rejectedFully refunded. Use a poster-style image, or name the elements to separate with bounding-box coordinates in the prompt
Task fails after starting with a transparency errorbackground: "transparent" was sent with an image that has no alpha channelUse a PNG that already carries transparency, or drop background
402 on submitNot enough credits for the reserve — layer decomposition reserves 17 imagesTop up
Task stays processingNormal: about 90 s at 1K and 160 s at 2KKeep polling every 5–10 s; tasks that can never finish are failed and refunded automatically

No data: URIs. reAPI rejects base64 inputs platform-wide — every URL field must be a public HTTP(S) URL. Upload to your own object storage (S3, R2, OSS, …) and pass the URL.

Response envelope

Submit and poll share the same shape — only status and output fill in over time.

{
  "id": "task_018f5a3a1b6e7d9f8c2b4d6e8f0a2c4e",
  "model": "doubao-seedream-5-0-flash",
  "status": "completed",
  "created_at": 1735000000,
  "output": {
    "image_urls": ["https://cdn.reapi.ai/media/tasks/.../0.jpeg"]
  },
  "error": null
}

Poll GET /api/v1/tasks/{id} (see the Tasks reference) until status === "completed". Generated URLs expire — mirror the files to your own storage.

Layer decomposition output

A layer_decomposition: true task returns several images, and output.layers describes them positionally: layers[i] belongs to image_urls[i].

{
  "status": "completed",
  "output": {
    "image_urls": [
      "https://cdn.reapi.ai/media/tasks/.../0.jpeg",
      "https://cdn.reapi.ai/media/tasks/.../1.png"
    ],
    "layers": [
      { "z_index": 0, "size": "2048x2048", "output_format": "jpeg" },
      {
        "z_index": 1,
        "size": "1273x265",
        "output_format": "png",
        "name": "Title text",
        "description": "Large yellow serif title text",
        "bounding_box": {
          "absolute": [383, 120, 1655, 384],
          "normalized": [187, 59, 808, 188]
        }
      }
    ]
  }
}
  • z_index — stacking order. 0 is the base image; layers start at 1 and a higher value sits on top.
  • bounding_box — where the layer belongs. absolute is [left, top, right, bottom] in the base image's pixels; normalized is the same four edges scaled to [0, 1000]. The base image carries no box.
  • name / description — what the model identified in that layer.

To rebuild the original, place each layer at (left, top) with size (right - left) × (bottom - top) and composite in ascending z_index. Use normalized to composite onto a canvas of your own size.

Pricing

Seedream 5.0 Flash bills one flat price per output image:

credits = ceil(per_image_price × images_returned × 1000)     1 credit = $0.001

The live per-image rate is on the model page. Failed tasks are always refunded in full.

1. Size and references do not change the price

1K, 1.5K and 2K cost the same, and so does an exact pixel size. Reference images add nothing. That makes 1.5K the sensible default: better detail than 1K at the same price.

2. Layer decomposition is charged per image returned

The model decides how many layers to produce, so a layer_decomposition: true request reserves the worst case — the base image plus 16 layers, 17 images — and settles to the images actually delivered:

credits = (1 + layers_returned) × per_image_credits

The difference is refunded when the task settles. This is why a layer request can return 402 on an account that could afford the result: the reserve has to fit.

3. Unfiltered requests have their own line

content_filter: false requests bill on a separate line of the pricing table. See the model page for its current rate.

Table of Contents