# Seedream 5.0 Pro API Complete API reference for Seedream 5.0 Pro models by ByteDance. ## Model Variants This API supports two model variants: | Model | ID | Description | |-------|-----|-------------| | **Seedream 5.0 Pro** | `seedream-v5.0-pro` | High-quality text-to-image generation | | **Seedream 5.0 Pro Edit** | `seedream-v5.0-pro-edit` | Image editing with reference images | ## Quick Comparison | Feature | Seedream 5.0 Pro | Seedream 5.0 Pro Edit | |---------|------------------|-----------------------| | Input | Text prompt | Image(s) + Text prompt | | Aspect Ratios | 8 options | 8 options | | Resolutions | 1K, 2K | 1K, 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.0 Pro (Text-to-Image) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"seedream-v5.0-pro"` | | `prompt` | string | Image generation prompt | | `resolution` | string | Output resolution: `"1k"` or `"2k"` | | `width` | number | Width ratio value (e.g., 16 for 16:9) | | `height` | number | Height ratio value (e.g., 9 for 16:9) | **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` ### 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.0-pro', prompt: 'Editorial fashion portrait, soft window light, muted palette', resolution: '1k', width: 16, height: 9 }) }); const { data } = await response.json(); const taskId = data.task_id; // Poll for results const pollResponse = await fetch( `https://api.flaq.ai/api/v1/image/${taskId}`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const result = await pollResponse.json(); console.log(result.data.task_result.images[0].url); ``` ## Seedream 5.0 Pro Edit (Image Editing) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"seedream-v5.0-pro-edit"` | | `prompt` | string | Description of desired edits | | `image_url_list` | string[] | Array of image URLs to edit (1-10 images) | | `resolution` | string | Output resolution: `"1k"` or `"2k"` | | `width` | number | Width ratio value (e.g., 16 for 16:9) | | `height` | number | Height ratio value (e.g., 9 for 16:9) | **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` **Billing Note:** Starting with the second reference image, each additional image is billed at the configured fixed per-image rate. ### 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.0-pro-edit', prompt: 'Change the hairstyle', image_url_list: [ 'https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg' ], resolution: '1k', width: 16, height: 9 }) }); const { data } = await response.json(); const taskId = data.task_id; // Poll for results const pollResponse = await fetch( `https://api.flaq.ai/api/v1/image/${taskId}`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const result = await pollResponse.json(); console.log(result.data.task_result.images[0].url); ``` ### Single Image Edit Example ```javascript { model_name: 'seedream-v5.0-pro-edit', image_url_list: ['https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg'], prompt: 'Change the hairstyle', resolution: '1k', width: 16, height: 9 } ``` ### Multi-Image Edit Example ```javascript { model_name: 'seedream-v5.0-pro-edit', image_url_list: [ 'https://example.com/image1.jpg', 'https://example.com/image2.jpg' ], prompt: 'Blend these images into a cohesive composition', resolution: '1k', width: 16, height: 9 } ``` ## 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": 0.09, "images": [ { "url": "https://example.com/generated-image.jpeg" } ] } }, "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 Typical processing time: 15-60 seconds depending on complexity. ## 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