DEVELOPER API · V1

Seedream 5.5 API

Generate, edit, and decompose high-resolution images programmatically across Seedream 5.5, Seedream 5.5 Layers, and Seedream 5 Pro through one REST endpoint. Share the exact same credit ledger and generation history as the web studio.

  • Seedream 5.5 & 5 Pro
  • Transparent PNG & Layers
  • Up to 10 Reference Images
  • Signed Webhooks
  • Shared Credits & History

01

One Endpoint, Three Seedream Models

Call POST /api/v1/seedream/generations and switch cleanly between seedream-5-5 (text-to-image and multi-reference editing), seedream-5-5-layers (layer decomposition), and seedream-5-pro.

02

Shared Credit Ledger & History

Every Seedream API call deducts from your existing FIFO credit balance and appears automatically in your Personal Center History and Credit Ledger.

03

Signed Webhooks + Polling

Pass a public HTTPS webhook_url and optional webhook_secret for HMAC-SHA256 verified callbacks, or poll GET /api/v1/seedream/generations/{id} anytime.

04

Exact Web Pricing & Auto-Refunds

Identical credit rates to the web studio with no separate API concurrency or RPM cap. Failed tasks, timeouts, and unused layer slots refund credits automatically.

AUTHENTICATION & BASE URL

Authenticate every Seedream API call with a Bearer API key

Create and manage sk- keys in Personal Center → API Keys. All requests use HTTPS and require a paid account (an active subscription or purchased credit pack).

Base URL

https://seedream5-5.net/api/v1

Authorization Header

Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Idempotency Header (Optional)

Idempotency-Key: req_20261127_001

Send Idempotency-Key on POST /api/v1/seedream/generations so safe network retries return the original task without charging credits twice.

API generation requires a paid account with an active subscription or credit pack purchase. Free accounts can inspect balances and create keys, but must upgrade before submitting jobs.

QUICK START

Submit your first Seedream 5.5 API image generation

Choose a Seedream model mode and language below. Pass public HTTPS image URLs directly for image-to-image editing or layer decomposition—no separate upload step required.

1. Create generation
curl -X POST "https://seedream5-5.net/api/v1/seedream/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: req_20261127_001" \
  -d '{
  "model": "seedream-5-5",
  "prompt": "Minimalist matte-black ceramic pour-over coffee dripper centered on a clean studio backdrop, crisp editorial lighting.",
  "aspect_ratio": "1:1",
  "resolution": "1.5K",
  "output_format": "png",
  "background": "transparent",
  "webhook_url": "https://your-app.example.com/webhooks/seedream",
  "webhook_secret": "whsec_replace_with_at_least_16_chars"
}'
2. Poll status & check balance
# 1. Poll generation status (returns image_url, images[], and layers[])
curl -X GET "https://seedream5-5.net/api/v1/seedream/generations/TASK_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 2. Check remaining credit balance & Seedream pricing
curl -X GET "https://seedream5-5.net/api/v1/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"

ENDPOINTS

REST API Endpoints

All endpoints live under /api/v1 and accept/return application/json.

MethodPathDescription
POST/api/v1/seedream/generationsCreate a Seedream generation task (seedream-5-5, seedream-5-5-layers, or seedream-5-pro). Supports Idempotency-Key and webhook_url.
GET/api/v1/seedream/generations/{id}Retrieve task status, persistent image_url, images[], layers[] metadata, settled credit cost, and error details.
GET/api/v1/seedream/generationsList your Seedream generations (web and API shared). Supports ?page=1&limit=20 (max 50), ?model=, and ?status=success|failed|pending|processing.
GET/api/v1/creditsQuery your current remaining credit balance, paid entitlement status, and the exact credit pricing for all three Seedream models.

REQUEST SCHEMA

POST /api/v1/seedream/generations Parameters

Only Seedream family models are accepted by this endpoint. Publicly accessible HTTP(S) image URLs are validated for safety and passed directly without a separate upload step.

Common Parameters (All Seedream Models)

ParameterTypeRequiredDescription
modelstringYesOne of "seedream-5-5", "seedream-5-5-layers", or "seedream-5-pro". Non-Seedream models return 400 invalid_model.
promptstringConditionalRequired for seedream-5-5 (5–5,000 chars) and seedream-5-pro (3–5,000 chars); optional for seedream-5-5-layers (0–2,000 chars).
resolutionstringNoseedream-5-5: "1K", "1.5K" (default), "2K". seedream-5-5-layers: "1K", "1.5K" (default), "2K", "auto". seedream-5-pro: "1K" (default), "2K". Alias: size.
output_formatstringNoOutput image format: "png" (default) or "jpeg".
webhook_urlstring (HTTPS)NoPublic HTTPS endpoint to receive a POST callback when the task reaches success, failed, or canceled.
webhook_secretstringNoOptional 16–256 character secret used to sign webhook payloads via HMAC-SHA256 in the X-Seedream-Signature header. Requires webhook_url.

Seedream 5.5 & Seedream 5 Pro (Text-to-Image / Image-to-Image)

ParameterTypeRequiredDescription
aspect_ratiostringNo"1:1", "4:3", "3:4", "16:9", "9:16", "2:3", "3:2", or "21:9". seedream-5-5 image-to-image also supports "auto" (default "auto"); seedream-5-pro defaults to "1:1".
image_urlsstring[]NoUp to 10 public image URLs (JPG, PNG, or WebP) to activate image-to-image editing. Omit for text-to-image. Aliases: images, image_input.
backgroundstringNoseedream-5-5 only: "auto" (default), "transparent" (requires output_format: "png"), or "opaque".

Seedream 5.5 Layers (seedream-5-5-layers)

ParameterTypeRequiredDescription
image_urlstring (URL)YesSingle public HTTP(S) image URL to decompose into editable layers (PNG or JPEG recommended). Aliases: image, image_urls[0].
max_imagesintegerNoMaximum number of decomposed layer images from 2 to 100 (default: 2). Unused layer credits are refunded automatically upon completion.
text_recognitionbooleanNoWhen true, detects and separates text elements into dedicated transparent layers. Default: false.

RESPONSE OBJECT

Generation Object & Layer Output

Tasks transition from pending → processing → success (or failed / canceled). Completed responses return persistent public image URLs in image_url and images[], plus structured layers[] metadata for seedream-5-5-layers.

201 Created — Queued Task
{
  "id": "8f3b2c1a-4d5e-4f6a-9b7c-1234567890ab",
  "object": "seedream.generation",
  "model": "seedream-5-5",
  "mode": "text-to-image",
  "status": "pending",
  "prompt": "Minimalist matte-black ceramic pour-over coffee dripper centered on a clean studio backdrop...",
  "aspect_ratio": "1:1",
  "resolution": "1.5K",
  "output_format": "png",
  "background": "transparent",
  "max_images": null,
  "text_recognition": null,
  "cost_credits": 6,
  "credits_refunded": false,
  "image_url": null,
  "images": [],
  "layers": null,
  "error": null,
  "webhook_url": "https://your-app.example.com/webhooks/seedream",
  "created_at": "2026-11-27T00:00:00.000Z",
  "updated_at": "2026-11-27T00:00:01.000Z"
}
200 OK — Completed Layer Decomposition
{
  "id": "4c9a1e2b-7f3d-4a5b-8c1e-abcdef123456",
  "object": "seedream.generation",
  "model": "seedream-5-5-layers",
  "mode": "layer-decomposition",
  "status": "success",
  "prompt": "Separate headline typography, foreground subject, and studio backdrop.",
  "aspect_ratio": "auto",
  "resolution": "1.5K",
  "output_format": "png",
  "background": null,
  "max_images": 6,
  "text_recognition": true,
  "cost_credits": 19,
  "credits_refunded": false,
  "image_url": "https://cdn.example.com/seedream/layers/task/0.png",
  "images": [
    "https://cdn.example.com/seedream/layers/task/0.png",
    "https://cdn.example.com/seedream/layers/task/1.png",
    "https://cdn.example.com/seedream/layers/task/2.png"
  ],
  "layers": [
    {
      "index": 0,
      "url": "https://cdn.example.com/seedream/layers/task/0.png",
      "z_index": 0,
      "name": "background",
      "description": "Studio backdrop",
      "size": "1536x1536",
      "bounding_box": {
        "absolute": [0, 0, 1536, 1536],
        "normalized": [0, 0, 1, 1]
      }
    }
  ],
  "error": null,
  "webhook_url": "https://your-app.example.com/webhooks/seedream",
  "created_at": "2026-11-27T00:00:00.000Z",
  "updated_at": "2026-11-27T00:00:24.000Z"
}

WEBHOOKS

Receive Asynchronous Completion Callbacks

Provide webhook_url when creating a generation to avoid constant polling. We send an HTTPS POST request as soon as the task reaches a terminal state (success, failed, or canceled).

Webhook Request Headers

X-Seedream-Event
Event name: generation.completed, generation.failed, or generation.canceled.
X-Seedream-Delivery
Unique UUID for this webhook delivery attempt sequence.
X-Seedream-Timestamp
Unix epoch timestamp in seconds when the webhook payload was generated.
X-Seedream-Signature
Present when webhook_secret is supplied. Format: sha256=hex(HMAC_SHA256(secret, "{timestamp}.{rawBody}")).
  • Only public HTTPS URLs are accepted; localhost, private networks, and HTTP redirects are rejected for security.
  • Return any 2xx HTTP status within 10 seconds to acknowledge delivery.
  • On network errors, 408, 429, or 5xx responses, delivery retries up to 3 attempts automatically.
Example Webhook Payload
{
  "event": "generation.completed",
  "timestamp": 1764201618,
  "data": {
    "id": "8f3b2c1a-4d5e-4f6a-9b7c-1234567890ab",
    "object": "seedream.generation",
    "model": "seedream-5-5",
    "mode": "text-to-image",
    "status": "success",
    "aspect_ratio": "1:1",
    "resolution": "1.5K",
    "output_format": "png",
    "background": "transparent",
    "cost_credits": 6,
    "credits_refunded": false,
    "image_url": "https://cdn.example.com/seedream/image/task-0.png",
    "images": ["https://cdn.example.com/seedream/image/task-0.png"],
    "layers": null,
    "error": null,
    "created_at": "2026-11-27T00:00:00.000Z",
    "updated_at": "2026-11-27T00:00:18.000Z"
  }
}
Verify X-Seedream-Signature
import crypto from "node:crypto";

export function verifySeedreamSignature({ rawBody, timestamp, signature, secret }) {
  const expected =
    "sha256=" +
    crypto
      .createHmac("sha256", secret)
      .update(`${timestamp}.${rawBody}`)
      .digest("hex");

  const a = Buffer.from(signature || "", "utf8");
  const b = Buffer.from(expected, "utf8");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

PRICING & BILLING

Transparent Credit Pricing — Identical to Web

Every Seedream API call uses the exact same credit formula as the web studio and draws from your shared account balance.

From 6 credits / image
ModelResolutionBase CreditsReference & Layer Formula
seedream-5-51K / 1.5K6 creditsText-to-Image: 6 credits. Image-to-Image: 6 + floor(images × 1.5) credits (1–10 images).
seedream-5-52K12 creditsText-to-Image: 12 credits. Image-to-Image: 12 + floor(images × 1.5) credits (1–10 images).
seedream-5-5-layers1K / 1.5K (2K / auto)6 (or 12) / layerReserves max_images × layer rate + 1 upfront; settles actual_layers × layer rate + 1 and auto-refunds unused slots.
seedream-5-pro1K / 2K7 / 14 creditsFirst reference image is free; each additional reference image (2–10) costs +1 credit.
  • No extra API markup—every model, resolution, reference surcharge, and layer refund matches the web studio 100%.
  • Automatic full refund: if a task fails or times out after 30 minutes, its reserved credits are returned automatically to the original FIFO credit grants.
  • No separate API concurrency or RPM cap in v1.
View Credit Packs & Plans

ERROR HANDLING

HTTP Status & Error Codes

Error responses return a consistent JSON shape: {"error": {"code": "...", "message": "..."}}.

HTTPError CodeMeaning & Resolution
400invalid_model / invalid_parameters / invalid_webhook_urlVerify that model is a Seedream model, prompt length and resolution are valid, transparent background uses PNG, and all media/webhook URLs target public hosts.
401unauthorizedMissing, malformed, or revoked Bearer API key.
402insufficient_creditsAccount credit balance is lower than required for the requested model, resolution, and input count. Top up via Pricing.
403paid_account_requiredAPI access requires an active subscription or credit pack purchase.
404not_foundThe requested Seedream generation ID does not exist, is not a Seedream task, or belongs to another account.
409idempotency_conflictThe same Idempotency-Key was reused with a different model or generation mode.
502upstream_errorGeneration submission failed. Reserved credits have been refunded automatically.

FAQ

Frequently Asked Questions about the Seedream 5.5 API

Which models are available via the Seedream 5.5 API?

The API strictly exposes the Seedream model family: seedream-5-5 (text-to-image and image-to-image), seedream-5-5-layers (layer decomposition), and seedream-5-pro (text-to-image and image-to-image).

Do API calls share credits and history with the web studio?

Yes. API requests consume credits from the exact same FIFO credit ledger as the Seedream 5.5 web studio, and every API-created task appears in your Personal Center History where you can inspect or download it.

Who can use the Seedream 5.5 API?

Any account with a valid paid entitlement (an active subscription or a credit pack purchase) can call the Seedream API. Create your sk- API key from Personal Center → API Keys.

How does Seedream 5.5 Layers billing work when fewer layers are returned than max_images?

Credits are reserved upfront for max_images layers plus 1 input credit. When decomposition completes, you are billed only for the actual number of returned layers plus 1 credit, and the remaining reserved credits are refunded automatically.

How should I verify Seedream webhook callbacks?

Pass a 16–256 character webhook_secret alongside webhook_url when creating a generation. On delivery, compute HMAC-SHA256 over "{X-Seedream-Timestamp}.{rawBody}" with your secret and compare it in constant time against X-Seedream-Signature.

How do I prevent duplicate charges when retrying network requests?

Include a unique Idempotency-Key HTTP header on POST /api/v1/seedream/generations. Retrying with the same key returns HTTP 200 with the original task instead of creating a duplicate job or charging credits again.

Ready to integrate the Seedream 5.5 API?

Create an API key in seconds and ship Seedream 5.5 image generation, editing, transparent assets, and layer decomposition directly in your app.