switch_heading
Seedream 5 Pro
/v1/images画像生成 API
Seedream 5 Pro でテキストから画像を生成し、最大10枚の参照画像を編集できます。
モデル別名
seedream-5-pro
入力モード
テキストまたは参照画像
基本料金
9 / 18 credits
クイックスタート
タスクを作成し、SUCCESS または FAILED になるまで状態を取得します。
bash
| 1 | curl -X POST 'https://seedanceapi.org/v1/images/generations' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "model": "seedream-5-pro", |
| 6 | "prompt": "A cinematic product photo on a reflective surface", |
| 7 | "aspect_ratio": "1:1", |
| 8 | "resolution": "1k", |
| 9 | "image_urls": [] |
| 10 | }' |
リクエストの流れ
- 01
認証
既存の Seedance API キーを Bearer ヘッダーで使用します。
- 02
タスクを作成
作成リクエストを送信し、API が返す task ID を保存します。
- 03
結果を取得
task ID で状態を照会します。成功した画像は自社 CDN URL で返ります。
認証
すべての画像 API は Seedance API キーが必要です。プロバイダー情報は公開されません。
http
| 1 | Authorization: Bearer YOUR_API_KEY |
| 2 | Content-Type: application/json |
料金
料金は公開製品に固定され、プロバイダー経路には依存しません。
| 解像度 | 基本料金 | 追加参照 |
|---|---|---|
| 1K | 9 credits | 2枚目から1枚ごとに +0.8 credits |
| 2K | 18 credits | 2枚目から1枚ごとに +0.8 credits |
エンドポイント
POST
/v1/images/generationsimage_urls が空ならテキスト生成、1〜10 URL なら参照編集です。
Body ParametersJSON
model:string
seedream-5-pro 固定です。
prompt:string
最大3000文字の指示です。
aspect_ratio:optional string
1:1、4:3、3:4、16:9、9:16、2:3、3:2。 Defaults to 1:1.
resolution:optional string
1k または 2k。 Defaults to 1k.
image_urls:optional string[]
公開 HTTPS URL を最大10件。
テキスト画像生成
json
| 1 | { |
| 2 | "model": "seedream-5-pro", |
| 3 | "prompt": "A cinematic product photo on a reflective surface", |
| 4 | "aspect_ratio": "1:1", |
| 5 | "resolution": "1k", |
| 6 | "image_urls": [] |
| 7 | } |
参照画像編集
json
| 1 | { |
| 2 | "model": "seedream-5-pro", |
| 3 | "prompt": "Place this product in a minimal studio scene", |
| 4 | "aspect_ratio": "4:3", |
| 5 | "resolution": "2k", |
| 6 | "image_urls": [ |
| 7 | "https://cdn.example.com/reference.png" |
| 8 | ] |
| 9 | } |
HTTP 202
json
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "IN_PROGRESS", |
| 4 | "model": "seedream-5-pro", |
| 5 | "estimated_credits": 9 |
| 6 | } |
GET
/v1/images/generations/:task_id作成時に返された task ID で最新の状態を取得します。
bash
| 1 | curl 'https://seedanceapi.org/v1/images/generations/n30c6f2...seed' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
SUCCESS
json
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "SUCCESS", |
| 4 | "model": "seedream-5-pro", |
| 5 | "images": [ |
| 6 | { "url": "https://cdn44.gogloai.com/results/image.png" } |
| 7 | ], |
| 8 | "consumed_credits": 9, |
| 9 | "created_at": "2026-07-13 10:00:00" |
| 10 | } |
FAILED
json
| 1 | { |
| 2 | "task_id": "n30c6f2...seed", |
| 3 | "status": "FAILED", |
| 4 | "model": "seedream-5-pro", |
| 5 | "consumed_credits": 0, |
| 6 | "error": { |
| 7 | "code": "GENERATION_FAILED", |
| 8 | "message": "Image generation failed." |
| 9 | } |
| 10 | } |
エラー
| HTTP | Code | 意味 |
|---|---|---|
| 400 | INVALID_* | リクエストパラメータが不正です。 |
| 401 | INVALID_API_KEY | API キーがないか無効です。 |
| 402 | INSUFFICIENT_CREDITS | credits が不足しています。 |
| 404 | TASK_NOT_FOUND | タスクが見つかりません。 |
| 502 / 503 | UPSTREAM_* | 画像サービスが一時的に利用できません。 |