Seedream Edit Multi Image API Documentation

Seedream Edit Multi Image - Request Code

POST https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "prompt": "Girl holding the cat", "image": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] }
import requests url = "https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "prompt": "Girl holding the cat", "image": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] } response = requests.post(url, json=data, headers=headers) print(response.json())
fetch('https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY' }, body: JSON.stringify({ prompt: "Girl holding the cat", image: [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage" \ -H "Content-Type: application/json" \ -H "Cache-Control: no-cache" \ -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \ --data-raw '{ "prompt": "Girl holding the cat", "image": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] }'
import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; public class ApiClient { public static void main(String[] args) throws Exception { String json = """ { "prompt": "Girl holding the cat", "image": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] } """; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage")) .header("Content-Type", "application/json") .header("Cache-Control", "no-cache") .header("Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }
<?php $ch = curl_init(); $url = 'https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage'; $data = json_encode([ 'prompt' => 'Girl holding the cat', 'image' => [ 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg', 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png' ] ]); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Cache-Control: no-cache', 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?>

Output

Successful API response:

{ "created": 1757585224, "data": [{ "url": "https://pub-.../y9119xs25t-1.jpg" }], "usage": { "generated_images": 1 } }

Request Body - Seedream Edit Multi Image

Parameters for /getEditMultiImage:

ParameterRequiredTypeDescription
promptYesstringText description for image generation. Describes the desired images to be generated based on reference images.
Auto-enhanced: When num_images > 1, the prompt is automatically enhanced to encourage multiple variations.
imageNostring[]Array of 1–10 reference image URLs or Base64-encoded images. Used as reference for generating related images.
URLs: Must be accessible.
Base64: Format data:image/<format>;base64,<content>.
response_formatNostringFormat of generated images.
Options: "url" (downloadable JPEG links), "b64_json" (Base64-encoded JSON).
sizeNostringResolution of generated images. Supports various sizes including 1024x1024, 1280x720, etc.
watermarkNobooleanWhether to add an AI watermark to generated images.
Options: false (no watermark), true (adds watermark).
sequential_image_generationNostringGeneration mode for batch processing.
Options: "auto" (sequential related images), "disabled" (independent generation).
Auto-override: Automatically set to "auto" when num_images > 1.
streamNobooleanWhether to stream the response. *(Currently not applicable for this implementation.)*
num_imagesNointegerKey Parameter: Number of images to generate. When > 1, automatically enables sequential generation mode and enhances the prompt.
Note: Actual number may vary based on model decision and prompt complexity.

Example Request - Seedream Edit Multi Image

JSON
{ "prompt": "Girl holding the cat", "image": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg", "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png" ] }

Response - Seedream Edit Multi Image

JSON
{ "created": 1757585224, "data": [ { "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757585229985-y9119xs25t-1.jpg" } ], "usage": { "generated_images": 1, "output_tokens": 4096, "total_tokens": 4096 } }

Request Headers

HeaderDescription
Content-TypeMust be set to application/json
Cache-ControlMust be set to no-cache
Ocp-Apim-Subscription-KeyYour API subscription key for authentication

Response Handling

The Bytedance Text to Image returns specific HTTP status codes and response bodies to indicate the success or failure of a request. Developers should implement error handling in their applications to manage these responses effectively.

Common Status Codes and Responses

Status CodeDescriptionResponse Body
200Success - The request was successfully processed.{ "success": true, ... }
Bad Request - The request contains invalid parameters or missing fields.{ "error": "Invalid request parameters" }
401Unauthorized - The provided subscription key is missing or invalid.{ "error": "Invalid or missing authentication" }
403Forbidden - The subscription does not have access to this API or action.{ "error": "Access denied for this operation" }
404Not Found - The requested resource or endpoint could not be found.{ "error": "Endpoint not found" }
Too Many Requests - The request rate limit has been exceeded.{ "error": "Rate limit exceeded, please retry later" }
500Internal Server Error - An unexpected error occurred on the server.{ "error": "An unexpected error occurred, please try again later" }

Example Error Response

{ "error": "Invalid parameters" }

Retrieving Image Result and URL

After submitting your request, use this endpoint to check status and retrieve results.

Endpoint

POST https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults

Request Body

{ "job_set_id": "your-job-set-id-here" }

Example Request

POST https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "job_set_id": "job-abc123xyz" }
import requests url = "https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "job_set_id": "job-abc123xyz" } response = requests.post(url, json=data, headers=headers) print(response.json())
fetch('https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY' }, body: JSON.stringify({ job_set_id: "job-abc123xyz" }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults" \ -H "Content-Type: application/json" \ -H "Cache-Control: no-cache" \ -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \ --data-raw '{ "job_set_id": "job-abc123xyz" }'
import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; public class PollingClient { public static void main(String[] args) throws Exception { String json = """ { "job_set_id": "job-abc123xyz" } """; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults")) .header("Content-Type", "application/json") .header("Cache-Control", "no-cache") .header("Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }
<?php $ch = curl_init(); $url = 'https://gateway.pixazo.ai/ai-model-api-polling/getGenerationResults'; $data = json_encode([ 'job_set_id' => 'job-abc123xyz' ]); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Cache-Control: no-cache', 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?>

Example Success Response

{ "job_set_id": "job-abc123xyz", "status": "completed", "results": [ { "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757585229985-y9119xs25t-1.jpg" } ], "created_at": 1757585224, "completed_at": 1757585250 }

Bytedance API Pricing

Resolution Price (USD)
All ResolutionFree