Seedance 1.0 Pro API Documentation
Seedance Image to Video Task - Request Code
POST https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTask Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "model": "seedance-1-0-lite-i2v-250428", "content": [ { "type": "text", "text": "In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false" }, { "type": "image_url", "image_url": "https://example.com/input-image.jpg" } ] } import requests import json url = "https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTask" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "model": "seedance-1-0-lite-i2v-250428", "content": [ { "type": "text", "text": "In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false" }, { "type": "image_url", "image_url": "https://example.com/input-image.jpg" } ] } response = requests.post(url, headers=headers, json=data) print(response.json()) const url = 'https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTask'; const headers = { 'Content-Type': 'application/json', 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY' }; const data = { model: 'seedance-1-0-lite-i2v-250428', content: [ { type: 'text', text: 'In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false' }, { type: 'image_url', image_url: 'https://example.com/input-image.jpg' } ] }; fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(data) }) .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/generateImage2VideoTask" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXX" --data-raw '{ "model": "seedance-1-0-lite-i2v-250428", "content": [ { "type": "text", "text": "In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false" }, { "type": "image_url", "image_url": "https://example.com/input-image.jpg" } ] }' 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 Example { public static void main(String[] args) throws Exception { String json = """ { "model": "seedance-1-0-lite-i2v-250428", "content": [ { "type": "text", "text": "In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false" }, { "type": "image_url", "image_url": "https://example.com/input-image.jpg" } ] } """; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTask")) .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 $url = 'https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTask'; $data = [ 'model' => 'seedance-1-0-lite-i2v-250428', 'content' => [ [ 'type' => 'text', 'text' => 'In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false' ], [ 'type' => 'image_url', 'image_url' => 'https://example.com/input-image.jpg' ] ] ]; $options = [ 'http' => [ 'header' => "Content-Type: application/json\r\n" . "Cache-Control: no-cache\r\n" . "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY\r\n", 'method' => 'POST', 'content' => json_encode($data) ] ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); echo $result; ?> Output
Successful API response:
{ "id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } Request Body - Seedance Image to Video Task
Parameters for /generateImage2VideoTask:
| Parameter | Required | Type | Description |
|---|---|---|---|
| model | No | string | The ID of the model to call. You can activate a model service and query the model ID. An endpoint ID can also be used to call a model. |
| content | Yes | object[] | Enhanced: Can contain both text prompts and images for enhanced control. An array of content objects with type ("text" or "image_url") and corresponding properties. |
| content.type | Yes | string | Use "text" for text prompts or "image_url" for image inputs. Both types can be mixed in the same request. |
| content.text | No* | string | Text prompt for video generation (required when type is "text"). Can include text commands like --resolution 720p --duration 5 --camerafixed false. |
Example Request - Seedance Image to Video Task
JSON
{ "model": "seedance-1-0-lite-i2v-250428", "content": [ { "type": "text", "text": "In the sky, soft cotton-like clouds drift with subtle layered motions... --resolution 720p --duration 5 --camerafixed false" }, { "type": "image_url", "image_url": "https://example.com/input-image.jpg" } ] } Response - Seedance Image to Video Task
JSON
{ "id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } Request Headers
| Header | Description |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your 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 Code | Description | Response Body |
|---|---|---|
| 200 | Success - The request was successfully processed. | { "success": true, ... } |
| 400 | Bad Request - The request contains invalid parameters or missing fields. | { "error": "Invalid request parameters" } |
| 401 | Unauthorized - The provided subscription key is missing or invalid. | { "error": "Invalid or missing authentication" } |
| 403 | Forbidden - The subscription does not have access to this API or action. | { "error": "Access denied for this operation" } |
| 404 | Not Found - The requested resource or endpoint could not be found. | { "error": "Endpoint not found" } |
| 429 | Too Many Requests - The request rate limit has been exceeded. | { "error": "Rate limit exceeded, please retry later" } |
| 500 | Internal 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 Results
After submitting your request, use this endpoint to check status and retrieve results.
Endpoint
POST https://gateway.pixazo.ai/bytedance-polling/getVideoResult
Request Body
{ "task_id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } Example Requests
POST https://gateway.pixazo.ai/bytedance-polling/getVideoResult Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "task_id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } import requests import json url = "https://gateway.pixazo.ai/bytedance-polling/getVideoResult" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "task_id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } response = requests.post(url, headers=headers, json=data) print(response.json()) const url = 'https://gateway.pixazo.ai/bytedance-polling/getVideoResult'; const headers = { 'Content-Type': 'application/json', 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY' }; const data = { task_id: 'cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX' }; fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(data) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); curl -v -X POST "https://gateway.pixazo.ai/bytedance-polling/getVideoResult" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXXXXXX" --data-raw '{ "task_id": "cgt-20250910201045-sqz6f" }' 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 Example { public static void main(String[] args) throws Exception { String json = """ { "task_id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" } """; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://gateway.pixazo.ai/bytedance-polling/getVideoResult")) .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 $url = 'https://gateway.pixazo.ai/bytedance-polling/getVideoResult'; $data = [ 'task_id' => 'cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX' ]; $options = [ 'http' => [ 'header' => "Content-Type: application/json\r\n" . "Cache-Control: no-cache\r\n" . "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY\r\n", 'method' => 'POST', 'content' => json_encode($data) ] ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); echo $result; ?> Example Success Response
{ "id": "cgt-20250910201045-sqz6f", "model": "seedance-1-0-lite-t2v-250428", "status": "succeeded", "content": { "video_url": "https://...../byteplus-videos/XXXXXXXXXXXX-6q9sfv3ma6e.mp4" }, "usage": { "completion_tokens": 103818, "total_tokens": 103818 }, "created_at": 1757506245, "updated_at": 1757506300 } Bytedance API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | Free |