# Seedream 5.5 API Complete API reference for Seedream 5.5 models by ByteDance. ## Model Variants This API supports two model variants: | Model | ID | Description | |-------|-----|-------------| | **Seedream 5.5** | `seedream-v5.5` | High-quality text-to-image generation | | **Seedream 5.5 Edit** | `seedream-v5.5-edit` | Image editing with reference images | ## Quick Comparison | Feature | Seedream 5.5 | Seedream 5.5 Edit | |---------|------------------|-----------------------| | Input | Text prompt | Image(s) + Text prompt | | Aspect Ratios | 8 options | 8 options | | Resolutions | 1K, 1.5K, 2K | 1K, 1.5K, 2K | | Image Input | No | Required (1-10 images) | ### Supported Aspect Ratios `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `21:9` ## Seedream 5.5 (Text-to-Image) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"seedream-v5.5"` | | `prompt` | string | Image generation prompt, up to 5000 characters | | `resolution` | string | Output resolution: `"1k"`, `"1.5k"`, or `"2k"`; no default | | `width` | integer | Width ratio value (e.g., 16 for 16:9); required with `height`; no default | | `height` | integer | Height ratio value (e.g., 9 for 16:9); required with `width`; no default | **Note:** The width:height ratio must be one of: `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `21:9` #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `background` | string | `"auto"` | Background mode: `"auto"` (automatic), `"transparent"`, or `"opaque"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'seedream-v5.5', prompt: 'Editorial fashion portrait, soft window light, muted palette', resolution: '1.5k', width: 16, height: 9, background: 'auto' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Seedream 5.5 Edit (Image Editing) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"seedream-v5.5-edit"` | | `prompt` | string | Description of desired edits, up to 5000 characters | | `image_url_list` | string[] | Array of image URLs to edit (1-10 images); 80 credits per non-empty entry, including duplicate URLs | | `resolution` | string | Output resolution: `"1k"`, `"1.5k"`, or `"2k"`; no default | | `width` | integer | Width ratio value (e.g., 16 for 16:9); required with `height`; no default | | `height` | integer | Height ratio value (e.g., 9 for 16:9); required with `width`; no default | **Note:** The width:height ratio must be one of: `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `21:9` #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `background` | string | `"auto"` | Background mode: `"auto"` (automatic), `"transparent"`, or `"opaque"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'seedream-v5.5-edit', prompt: 'Change the hairstyle', image_url_list: [ 'https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg' ], resolution: '1.5k', width: 16, height: 9, background: 'auto' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ### Single Image Edit Example ```javascript { model_name: 'seedream-v5.5-edit', image_url_list: ['https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg'], prompt: 'Change the hairstyle', resolution: '1.5k', width: 16, height: 9, background: 'auto' } ``` ### Multi-Image Edit Example ```javascript { model_name: 'seedream-v5.5-edit', image_url_list: [ 'https://example.com/image1.jpg', 'https://example.com/image2.jpg' ], prompt: 'Blend these images into a cohesive composition', resolution: '1.5k', width: 16, height: 9, background: 'auto' } ``` ## Response Format ### Initial Response ```json { "code": 0, "message": "success", "data": { "task_id": "0ca5f379-327b-4d49-ba19-e38782ceb2f0", "response_url": "https://api.flaq.ai/api/v1/image/0ca5f379-327b-4d49-ba19-e38782ceb2f0", "task_status": "submitted" } } ``` ### Polling Response Poll `GET /api/v1/image/{task_id}` to check status: ```json { "code": 0, "data": { "task_id": "{task_id}", "task_status": "succeed", "task_status_msg": null, "response_url": "https://api.flaq.ai/api/v1/image/{task_id}", "task_result": { "credit": 200, "images": [ { "url": "https://example.com/generated-image.png" } ] } }, "message": "success" } ``` ### Error Response ```json { "code": 1201, "message": "[width, height] Invalid parameter (e.g. wrong key or value)", "data": null } ``` ### Status Values - `submitted`: Task accepted - `processing`: Image generation in progress - `succeed`: Image generation completed - `failed`: Image generation failed ## Processing Time Poll until the task status is `succeed` or `failed`; a submitted or processing task may not contain image results yet. ## Best Practices 1. **Detailed Prompts**: More descriptive prompts yield better results 2. **Aspect Ratio**: Match the ratio to your target use case before generating 3. **Image Edit Quality**: For editing, use high-resolution, well-lit source images