01
단일 엔드포인트, 3가지 Seedream 모델
POST /api/v1/seedream/generations 를 호출하고 model 필드로 seedream-5-5(텍스트 생성 및 다중 참조 편집), seedream-5-5-layers(레이어 분해), seedream-5-pro 를 간편하게 전환할 수 있습니다.
개발자 API · V1
단일 REST 엔드포인트로 Seedream 5.5, Seedream 5.5 Layers, Seedream 5 Pro를 호출하여 고해상도 이미지 생성, 편집 및 레이어 분해를 자동화하세요. 웹 스튜디오와 동일한 크레딧 원장과 생성 기록을 공유합니다.
01
POST /api/v1/seedream/generations 를 호출하고 model 필드로 seedream-5-5(텍스트 생성 및 다중 참조 편집), seedream-5-5-layers(레이어 분해), seedream-5-pro 를 간편하게 전환할 수 있습니다.
02
모든 Seedream API 요청은 기존 FIFO 크레딧 잔액에서 차감되며 마이페이지의 생성 기록 및 크레딧 내역에 자동으로 표시됩니다.
03
공개 HTTPS webhook_url 과 선택적 webhook_secret 으로 HMAC-SHA256 검증 콜백을 수신하거나 GET /api/v1/seedream/generations/{id} 를 언제든 폴링할 수 있습니다.
04
웹 스튜디오와 100% 동일한 크레딧 요금이 적용되며 별도의 API 동시성 또는 RPM 제한이 없습니다. 실패, 시간 초과, 미사용 레이어 슬롯 크레딧은 자동 환불됩니다.
인증 및 기본 URL
「마이페이지 → API Keys」에서 sk- 키를 생성하고 관리하세요. 모든 요청은 HTTPS를 사용하며 유료 계정(활성 구독 또는 크레딧 팩 구매 이력)이 필요합니다.
기본 URL (Base URL)
https://seedream5-5.net/api/v1인증 헤더 (Authorization)
멱등성 헤더 (선택)
POST /api/v1/seedream/generations 에 Idempotency-Key 를 포함하면 네트워크 재시도 시 중복 과금 없이 기존 작업을 반환합니다.
API 생성 작업에는 활성 구독 또는 크레딧 팩 구매 내역이 있는 유료 계정이 필요합니다. 무료 계정도 키 생성과 잔액 조회는 가능하지만 작업 제출 전에 업그레이드가 필요합니다.
빠른 시작
아래에서 모델 모드와 언어를 선택하세요. 이미지 편집 및 레이어 분해 시 별도 업로드 없이 공개 HTTPS 이미지 URL을 직접 전달할 수 있습니다.
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"
}'# 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"엔드포인트
모든 엔드포인트는 /api/v1 하위에 위치하며 application/json 형식으로 통신합니다.
| 메서드 | 경로 | 설명 |
|---|---|---|
| POST | /api/v1/seedream/generations | Seedream 생성 작업(seedream-5-5, seedream-5-5-layers, seedream-5-pro)을 생성합니다. Idempotency-Key 및 webhook_url 지원. |
| GET | /api/v1/seedream/generations/{id} | 작업 상태, 영구 저장된 image_url, images[], layers[] 메타데이터, 정산된 크레딧 비용 및 오류 상세 정보를 조회합니다. |
| GET | /api/v1/seedream/generations | 계정의 Seedream 생성 목록을 조회합니다(웹/API 공유). ?page=1&limit=20(최대 50), ?model=, ?status=success|failed|pending|processing 지원. |
| GET | /api/v1/credits | 현재 남은 크레딧 잔액, 유료 권한 상태 및 3가지 Seedream 모델의 정확한 요금표를 조회합니다. |
요청 스키마
이 엔드포인트는 Seedream 계열 모델만 허용합니다. 공개 HTTP(S) 이미지 URL은 보안 검증 후 별도 업로드 없이 바로 사용됩니다.
| 파라미터 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
| model | string | 필수 | "seedream-5-5", "seedream-5-5-layers", 또는 "seedream-5-pro" 중 하나. Seedream 외 모델은 400 invalid_model 을 반환합니다. |
| prompt | string | 조건부 | seedream-5-5(5~5,000자) 및 seedream-5-pro(3~5,000자)는 필수, seedream-5-5-layers(0~2,000자)는 선택 사항입니다. |
| resolution | string | 선택 | seedream-5-5: "1K", "1.5K"(기본), "2K". seedream-5-5-layers: "1K", "1.5K"(기본), "2K", "auto". seedream-5-pro: "1K"(기본), "2K". 별칭: size. |
| output_format | string | 선택 | 출력 이미지 형식: "png"(기본) 또는 "jpeg". |
| webhook_url | string (HTTPS) | 선택 | 작업이 success, failed 또는 canceled 상태가 될 때 POST 콜백을 수신할 공개 HTTPS URL. |
| webhook_secret | string | 선택 | X-Seedream-Signature 헤더의 HMAC-SHA256 서명용 16~256자 시크릿. webhook_url 설정이 필요합니다. |
| 파라미터 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
| aspect_ratio | string | 선택 | "1:1", "4:3", "3:4", "16:9", "9:16", "2:3", "3:2", "21:9". seedream-5-5 이미지 편집은 "auto"도 지원합니다(기본 "auto"). seedream-5-pro 기본값은 "1:1"입니다. |
| image_urls | string[] | 선택 | 이미지 편집을 위한 최대 10개의 공개 이미지 URL(JPG, PNG, WebP). 생략 시 텍스트 생성으로 실행됩니다. 별칭: images, image_input. |
| background | string | 선택 | seedream-5-5 전용: "auto"(기본), "transparent"(output_format: "png" 필수), 또는 "opaque". |
| 파라미터 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
| image_url | string (URL) | 필수 | 레이어로 분해할 단일 공개 HTTP(S) 이미지 URL(PNG 또는 JPEG 권장). 별칭: image, image_urls[0]. |
| max_images | integer | 선택 | 분해할 최대 레이어 수(2~100, 기본값: 2). 완료 후 미사용 레이어 크레딧은 자동 환불됩니다. |
| text_recognition | boolean | 선택 | true 로 설정하면 텍스트 요소를 감지하여 별도의 투명 레이어로 분리합니다. 기본값: false. |
응답 객체
작업은 pending → processing → success(또는 failed / canceled) 순으로 전환됩니다. 완료 시 image_url 과 images[] 에 영구 공개 이미지 URL이 반환되며, seedream-5-5-layers 는 layers[] 메타데이터를 함께 제공합니다.
{
"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"
}{
"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"
}웹훅
작업 생성 시 webhook_url 을 지정하면 반복 폴링 없이 완료 알림을 받을 수 있습니다. 작업이 최종 상태(success, failed, canceled)에 도달하는 즉시 HTTPS POST 요청을 전송합니다.
{
"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"
}
}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);
}요금 및 과금
모든 Seedream API 호출은 웹 스튜디오와 동일한 크레딧 공식을 사용하며 공유 계정 잔액에서 차감됩니다.
| 모델 | 해상도 | 기본 크레딧 | 참조 이미지 및 레이어 공식 |
|---|---|---|---|
| seedream-5-5 | 1K / 1.5K | 6크레딧 | 텍스트 생성: 6크레딧. 이미지 편집: 6 + floor(이미지 수 × 1.5) 크레딧(1~10장). |
| seedream-5-5 | 2K | 12크레딧 | 텍스트 생성: 12크레딧. 이미지 편집: 12 + floor(이미지 수 × 1.5) 크레딧(1~10장). |
| seedream-5-5-layers | 1K / 1.5K (2K / auto) | 레이어당 6(또는 12) | 요청 시 max_images × 레이어 단가 + 1 선차감. 완료 후 실제 레이어 수 × 단가 + 1 로 정산하고 미사용 슬롯 자동 환불. |
| seedream-5-pro | 1K / 2K | 7 / 14크레딧 | 첫 번째 참조 이미지는 무료이며 2~10번째 참조 이미지는 장당 +1크레딧이 추가됩니다. |
오류 처리
오류 응답은 일관된 JSON 형식 {"error": {"code": "...", "message": "..."}} 을 반환합니다.
| HTTP | 오류 코드 | 의미 및 해결 방법 |
|---|---|---|
| 400 | invalid_model / invalid_parameters / invalid_webhook_url | model이 Seedream 모델인지, 프롬프트 길이·해상도·투명 배경용 PNG 형식 및 공개 URL 여부를 확인하세요. |
| 401 | unauthorized | Bearer API Key가 누락되었거나 형식이 잘못되었거나 폐기되었습니다. |
| 402 | insufficient_credits | 요청한 모델·해상도·입력 이미지 수에 필요한 크레딧보다 잔액이 부족합니다. 요금 페이지에서 충전하세요. |
| 403 | paid_account_required | API 이용에는 활성 구독 또는 크레딧 팩 구매가 필요합니다. |
| 404 | not_found | 요청한 Seedream 작업 ID가 없거나, 비-Seedream 작업이거나, 다른 계정의 작업입니다. |
| 409 | idempotency_conflict | 동일한 Idempotency-Key 가 다른 모델 또는 생성 모드로 재사용되었습니다. |
| 502 | upstream_error | 생성 요청 제출에 실패했습니다. 예약된 크레딧은 자동으로 환불되었습니다. |
자주 묻는 질문
이 API는 Seedream 모델 패밀리만 엄격하게 제공합니다: seedream-5-5(텍스트-이미지 및 이미지-이미지), seedream-5-5-layers(레이어 분해), seedream-5-pro(텍스트-이미지 및 이미지-이미지).
예. API 요청은 Seedream 5.5 웹 스튜디오와 완전히 동일한 FIFO 크레딧 원장에서 차감되며, API로 생성된 모든 작업은 마이페이지 기록에 자동으로 표시됩니다.
유효한 유료 권한(활성 구독 또는 크레딧 팩 구매)이 있는 모든 계정이 사용할 수 있습니다. 「마이페이지 → API Keys」에서 sk- API Key를 생성하세요.
생성 시 max_images 레이어와 입력 1크레딧이 선차감됩니다. 분해 완료 후 실제 반환된 레이어 수 + 1크레딧만 정산되며 나머지 크레딧은 자동 환불됩니다.
작업 생성 시 webhook_url 과 함께 16~256자 webhook_secret 을 전달하세요. 콜백 수신 시 "{X-Seedream-Timestamp}.{rawBody}" 에 대한 HMAC-SHA256을 계산해 X-Seedream-Signature 와 상수 시간으로 비교합니다.
POST /api/v1/seedream/generations 요청에 고유한 Idempotency-Key HTTP 헤더를 포함하세요. 같은 키로 재시도하면 중복 작업 생성이나 재과금 없이 HTTP 200으로 원본 작업을 반환합니다.
몇 초 만에 API Key를 발급하고 Seedream 5.5 이미지 생성, 편집, 투명 에셋 및 레이어 분해 기능을 앱에 바로 통합해 보세요.