Home / Guides

Seedream 5.5 API Integration Guide

Integrate the Seedream 5.5 API with Kie: model IDs, a Node.js example, asynchronous results, input-image billing, limits, and ModelArk access checks.

Choose an API channel

Provider access and account entitlements are checked separately.
ChannelWhat is confirmedBefore integrating
BytePlus ModelArkThe public regional catalog checked November 11 lists the 5.0 family; a public 5.5 model ID was not established from that list.Check your region and enabled account models. The launch announcement alone does not confirm API access.
Kie5.5 generation and editing have dedicated documentation.Use a Kie key and Kie model IDs. Do not send a ModelArk key to this endpoint.
This websiteA browser editor backed by Kie, with site credits.Website credit packs are for the browser editor; they do not buy a Kie developer balance.

For channel pricing and the release timeline, use the release and availability guide. This page focuses on request handling and integration.

Kie model IDs and operations

POST https://api.kie.ai/api/v1/jobs/createTask
OperationModel IDInput
Text to imageseedream/5-5-text-to-imageprompt, aspect_ratio, size, output_format, background
Image editingseedream/5-5-image-to-imageThe same controls plus image_urls containing your reference URLs.
Layer decompositionseedream/5-5-layer-decompositionOne image_url, optional instructions, max_images and text_recognition.

Use the matching generation, editing or layer endpoint documentation for current parameter definitions.

Minimal server-side Node.js example

The example creates one transparent PNG, checks both HTTP status and the API code, and polls with a bounded backoff. It is an integration example, not a recorded live request. Keep your key on the server.

// Run on your server with Node.js 20+. Set KIE_API_KEY in the server environment.
const key = process.env.KIE_API_KEY;
if (!key) throw new Error('Missing KIE_API_KEY');
const headers = {
  Authorization: `Bearer ${key}`,
  'Content-Type': 'application/json',
};
async function kie(path, init = {}) {
  const response = await fetch(`https://api.kie.ai/api/v1/${path}`, {
    ...init, headers, signal: AbortSignal.timeout(30_000),
  });
  if (!response.ok) throw new Error(`Kie HTTP ${response.status}`);
  const body = await response.json();
  if (body.code !== 200) throw new Error(`Kie error ${body.code}`);
  return body.data;
}
const created = await kie('jobs/createTask', {
  method: 'POST',
  body: JSON.stringify({
    model: 'seedream/5-5-text-to-image',
    input: {
      prompt: 'An isolated ivory ceramic vase, soft side light, transparent background',
      aspect_ratio: '1:1', size: '1K',
      background: 'transparent', output_format: 'png', nsfw_checker: true,
    },
  }),
});
if (!created?.taskId) throw new Error('Missing task ID');
let done = false;
for (let attempt = 0; attempt < 30; attempt++) {
  await new Promise(resolve => setTimeout(resolve, Math.min(3000 * 1.25 ** attempt, 15000)));
  const task = await kie(`jobs/recordInfo?taskId=${encodeURIComponent(created.taskId)}`);
  if (task.state === 'fail') throw new Error('Generation failed; inspect task logs');
  if (task.state === 'success') {
    const urls = JSON.parse(task.resultJson).resultUrls;
    if (!Array.isArray(urls) || !urls.length) throw new Error('Missing results');
    console.log(urls); // Download to your own storage before the provider URLs expire.
    done = true;
    break;
  }
}
if (!done) throw new Error(`Still pending: retain task ID ${created.taskId} and resume status checks`);

If the local polling window ends, retain the task ID and resume checks. Creating another generation can incur another charge. In production, store the task ID before returning to the client and use a completion callback or a background worker.

Input images are billed too

Kie charges for input images as well as the output. Estimate a request as output-image charges plus the sum of input-image charges. For layer jobs, budget for all returned images, including the base. Check Kie's current price list and the consumed credits in your task log.

Keep that provider balance separate from this website's credits. In our editor, one 2K output with two references costs 10 + 2 × 2 = 14 site credits. A 1K layer task reserving four outputs and one input holds 22 site credits; if three outputs return, the final charge is 17.

See site credit packs and subscriptions for browser usage.

Resolution, inputs and rate limits

Our integration uses 1K, 1.5K or 2K. Editing accepts up to 10 references; layer decomposition accepts one source and reserves 2–10 output images. These are this editor's limits. Confirm any other provider's limits in its own schema.

Kie's getting-started guide currently describes 20 new generation requests per 10 seconds per account. Treat that as a provider default, not a throughput guarantee. Queue requests and back off on code 429; keep status polling separate from generation retries. Read Kie limits and account controls.

Handle asynchronous results and storage

  • Persist a local request ID, provider task ID, selected model, inputs and current status. A task ID means acceptance, not completion.
  • Check the JSON code even when HTTP is 200. Finish only on success or fail; waiting, queuing and generating are pending states.
  • Treat callbacks as notifications: query the stored provider task before granting value or accepting result URLs. Make completion idempotent.
  • Copy successful files to your own storage. Validate file type, size and alpha when transparency is required. Keep account results private.
  • Retry transient status reads with backoff. Do not blindly retry a generation POST after a timeout: first reconcile whether it created a task.

Kie task-status documentation lists provider file retention as 14 days. Save originals to your own storage before expiry.

Frequently asked questions

Is this the official ByteDance API?

This site is independent. The runnable example calls Kie, a third-party API service. BytePlus ModelArk is a separate first-party channel with its own credentials, region catalog and access requirements.

Can I reuse my website credits in this API example?

No. The example uses a Kie developer key and balance. The site's subscription or credit pack covers generation in the browser editor.

Does HTTP 200 mean the image is finished?

No. Check the JSON code, store the returned task ID, and query task state until success or fail. Parse resultJson only after success.

Transparent PNG workflow and prompts · Plan a repeated-edit test