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

ByteDance Seedream 5.5 on reAPI — async image generation and editing with stable multi-turn edits, transparent output and layer decomposition. Full parameter reference and billing.

ByteDance's Seedream 5.5 image model on reAPI. Text-to-image, image-to-image and multi-reference generation (up to 10 reference images), transparent output from a prompt or references, and layer decomposition with optional text recognition, at 1K, 1.5K or 2K or an exact pixel size. Async-first: submit returns the 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-5",
    "prompt": "A frosted glass perfume bottle with pale gold liquid, soft studio light",
    "size": "16:9",
    "resolution": "2K"
  }'
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-5",
        "prompt": "A frosted glass perfume bottle with pale gold liquid, soft studio light",
        "size": "16:9",
        "resolution": "2K",
    },
    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-5",
    prompt: "A frosted glass perfume bottle with pale gold liquid, soft studio light",
    size: "16:9",
    resolution: "2K",
  }),
});
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-5",
        "prompt":     "A frosted glass perfume bottle with pale gold liquid, soft studio light",
        "size":       "16:9",
        "resolution": "2K",
    })
    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 the task id; the task endpoint returns the same envelope until completion. Polling does not consume credits. Poll every few seconds at first and every 5–10 seconds after that; layer decomposition can take several minutes. Keep polling the same task instead of submitting again.

Request body

Mode is implicit: no image_urls is text-to-image; one or more is image-to-image or multi-reference generation. layer_decomposition: true switches to layer splitting.

FieldTypeDefaultNotes
modelstring—doubao-seedream-5-5. Required.
promptstring—Describe the image or the edit. Required, except with layer_decomposition: true.
sizestring2KA tier, auto, a ratio, or exact pixels — see size.
resolutionstring2K with a ratio1K / 1.5K / 2K (case-insensitive), used with a ratio size or on its own when size is omitted. A tier or exact-pixel size takes precedence over it. In layer mode it is an alias of size and also accepts auto.
ninteger1Only 1 — one image per request.
image_urlsstring[]—Up to 10 reference images (JPEG / PNG / WebP / BMP / TIFF / GIF / HEIC / HEIF, each ≤ 30 MiB and ≤ 36,000,000 px). Public HTTP(S) URLs. Each reference image is billed.
backgroundstringautoauto / opaque / transparent. transparent works for text-to-image and image-to-image and cannot be combined with output_format: "jpeg". Omit it in layer mode, including auto.
output_formatstringpngpng / jpeg. In layer mode it sets the base image only; layers are always transparent PNG.
layer_decompositionbooleanfalseSplit one image into a base image plus transparent layers — see Layer decomposition.
layer_decomposition_optionsobject—Only with layer_decomposition: true. max_images (integer 2–100, default 30, includes the base image) and text_recognition (boolean).
optimize_prompt_optionsobject{ "mode": "standard" }Prompt optimization. mode accepts standard only, and optimization cannot be turned off.
watermarkbooleanfalseAdd an "AI generated" mark.

Validation before you submit

These combinations are rejected with a synchronous 400 and nothing is charged:

  • prompt missing for image generation.
  • n other than 1, or more than 10 image_urls.
  • layer_decomposition: true without exactly one image, or with background.
  • layer_decomposition_options without layer_decomposition: true, or max_images outside 2–100.
  • background: "transparent" with output_format: "jpeg".
  • A size ratio outside the list below, exact pixels outside the window, or a layer-mode size other than auto / 1K / 1.5K / 2K.
  • optimize_prompt_options.mode other than standard.

size — string, default 2K

FormExampleRules
Tier"2K"1K / 1.5K / 2K. The model picks the aspect ratio from the prompt. auto equals 2K for generation.
Ratio + tier"size": "16:9", "resolution": "1.5K"Generation only. 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 2:1, 1:2 (also written 16x9). Without resolution the tier is 2K.
Exact pixels"2048x1152"Generation only. Total pixels 921,600–4,624,220; width/height ratio 1/16–16. Takes precedence over resolution.

There is no 3K or 4K tier.

layer_decomposition — boolean, default false

When true, Seedream 5.5 splits your image into one base image plus transparent PNG layers, with the position and stacking order of each.

  • Send exactly one image in image_urls.
  • size accepts auto, 1K, 1.5K or 2K only (size first, then resolution, else auto). A tier sets the size of the base image and every layer; auto follows the input image, scaled up to at least 1K and down to at most 2K.
  • prompt is optional — without it the model finds the subjects, text and background itself.
  • layer_decomposition_options.max_images caps the images returned, including the base image (2–100, default 30). The model may return fewer.
  • layer_decomposition_options.text_recognition: true adds recognized text to text layers — see Layer decomposition output.
  • Do not send background.

Billing is per image returned — see Pricing.

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.

Troubleshooting

FailureWhat it meansWhat to do
Synchronous 400 on submitA field breaks a rule aboveThe error names the field — fix and resubmit; nothing was charged
Task fails citing content policyThe prompt, an input image or the output was rejected by moderationFully refunded. Change the prompt or the image
Task fails on an input imageThe image could not be fetched or is not a supported formatFully refunded. Check that the URL is public, and convert AVIF / JP2 to PNG or JPEG
402 on submitNot enough credits for the reserve — layer decomposition reserves max_images imagesTop up, or lower max_images
Task stays processingNormal for layer decomposition, which can take several minutesKeep polling every 5–10 s; tasks that can never finish are failed and refunded automatically

Response envelope

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

{
  "id": "task_018f5a3a1b6e7d9f8c2b4d6e8f0a2c4e",
  "model": "doubao-seedream-5-5",
  "status": "completed",
  "created_at": 1735000000,
  "output": {
    "image_urls": ["https://cdn.reapi.ai/media/tasks/.../0.png"]
  },
  "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]. Treat every metadata field as optional.

{
  "status": "completed",
  "output": {
    "image_urls": [
      "https://cdn.reapi.ai/media/tasks/.../0.png",
      "https://cdn.reapi.ai/media/tasks/.../1.png"
    ],
    "layers": [
      { "z_index": 0, "size": "840x1248", "output_format": "png" },
      {
        "z_index": 1,
        "size": "1512x702",
        "output_format": "png",
        "name": "Sale title",
        "description": "Printed sale title",
        "bounding_box": {
          "absolute": [84, 156, 756, 468],
          "normalized": [100, 125, 900, 375]
        },
        "text_recognition": {
          "text": "SUMMER SALE",
          "lines": [
            {
              "bounding_box": {
                "absolute": [126, 156, 714, 468],
                "normalized": [150, 125, 850, 375]
              },
              "runs": [
                {
                  "text": "SUMMER SALE",
                  "style": {
                    "similar_font_family": "Arial",
                    "foreground_color": "#222222",
                    "bold": true
                  }
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

The values above illustrate the structure; they are not a recorded task.

  • 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.
  • text_recognition — present only when text_recognition was requested and regular text was found (not for artistic or handwritten text). text joins lines with \n; each line has a bounding_box and runs of differently styled text, with style flags that are model estimates.

Layer files are rendered at the chosen tier, so their pixel size can differ from the box. To rebuild the original, scale each layer to (right - left) × (bottom - top), place it at (left, top) and composite in ascending z_index. Use normalized to composite onto a canvas of your own size.

Pricing

Seedream 5.5 bills each output image by size band, plus each reference image — there is no free first reference:

credits = ceil((output_image_price + reference_images × reference_price) × 1000)     1 credit = $0.001

The live rates are on the model page. Failed tasks are always refunded in full.

1. Size band

1K and 1.5K are the lower band; 2K and auto are the higher band. Exact pixels up to 2,610,000 total are the lower band, above that the higher band. A ratio size, or an omitted size, takes the band of resolution (2K when that is omitted too).

2. Layer decomposition is charged per image returned

A layer_decomposition: true request reserves max_images images (30 when omitted) and settles to the images actually delivered:

credits = first_image_credits + (images_returned - 1) × one_image_credits

first_image_credits includes the one input image. Every image is billed at the band of the request's size (auto reserves the higher band). The difference is refunded when the task settles, which is why a layer request can return 402 on an account that could afford the result.

Table of Contents