Seedance Frame to Video API Documentation

Seedance Frame to Video - Request Code

POST https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTask Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "model": "seedance-1-0-lite-i2v-250428", "text": "Realistic style. Aeroplane from takeoff to fly captured in camera", "first_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png", "last_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png" }
import requests url = "https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTask" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "model": "seedance-1-0-lite-i2v-250428", "text": "Realistic style. Aeroplane from takeoff to fly captured in camera", "first_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png", "last_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png" } response = requests.post(url, json=data, headers=headers) print(response.json())
const url = 'https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTask'; 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', text: 'Realistic style. Aeroplane from takeoff to fly captured in camera', first_frame: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png', last_frame: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png' }; 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/generateFrame2VideoTask" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" --data-raw '{ "model": "seedance-1-0-lite-i2v-250428", "text": "Realistic style. Aeroplane from takeoff to fly captured in camera", "first_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png", "last_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.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 url = "https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTask"; String json = """{ "model": "seedance-1-0-lite-i2v-250428", "text": "Realistic style. Aeroplane from takeoff to fly captured in camera", "first_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png", "last_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png" }"""; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .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/generateFrame2VideoTask'; $data = [ 'model' => 'seedance-1-0-lite-i2v-250428', 'text' => 'Realistic style. Aeroplane from takeoff to fly captured in camera', 'first_frame' => 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png', 'last_frame' => 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png' ]; $json = json_encode($data); $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); 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); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "HTTP Code: " . $httpCode . "\n"; echo "Response: " . $response . "\n"; ?>

Output

Successful API response:

{ "id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" }

Request Body - Seedance Frame to Video

Parameters for /generateFrame2VideoTask:

ParameterRequiredTypeDescription
modelYesstringThe 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.
Example: seedance-1-0-lite-i2v-250428
textYesstringText prompt for video generation. Describes the video content and style. Can include embedded text commands like --rs 720p --dur 5 --cf false or use separate parameters.
first_frameYesstringURL of the first frame image for video generation. Must be an accessible image URL. Supported formats: JPEG, PNG. This image will be used as the starting frame of the generated video.
last_frameYesstringURL of the last frame image for video generation. Must be an accessible image URL. Supported formats: JPEG, PNG. This image will be used as the ending frame of the generated video.
callback_urlNostringCallback notification address for task status updates. When the task status changes, Ark sends a callback request containing the latest status.
resolutionNostringVideo resolution. Valid values: "480p", "720p", "1080p".
For seedance-1-0-lite, default is 720p. For seedance-1-0-pro, default is 1080p. Higher resolutions = better quality but longer processing time.
durationNonumberVideo duration in seconds. Valid range: 3–12 seconds. Longer durations provide more motion but require more resources.
framepersecondNonumberFrame rate (FPS) of the output video. Valid value: 24. Determines smoothness of playback.
watermarkNobooleanWhether to add watermarks to the output video.
false: no watermark
true: adds watermark with "AI generated" text.
seedNonumberRandom seed for reproducibility. Valid range: -1 to 2^32-1.
Use the same seed with identical params for similar results.
-1 = random generation.
camerafixedNobooleanWhether to fix the camera position.
true: fixes camera (adds instruction to prompt).
false: allows camera movement. *(Does not guarantee the actual effect.)*

Example Request - Seedance Frame to Video

JSON
{ "model": "seedance-1-0-lite-i2v-250428", "text": "Realistic style. Aeroplane from takeoff to fly captured in camera", "first_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-75d44f7d-a954-46b0-a603-10c09cb5df84-0.png", "last_frame": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/wan-t2i/wan-t2i-47c06b16-ce7f-4977-8f7c-a04384409934-0.png" }

Response - Seedance Frame to Video

JSON
{ "id": "cgt-XXXXXXXXXXXXXXXXXXXX-XXXXX" }

Request Headers

HeaderDescription
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYour 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 Video Result and URL

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 Request - cURL

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: YOUR_SUBSCRIPTION_KEY" --data-raw '{ "task_id": "cgt-20250910201045-sqz6f" }'

Example Request - Python

import requests 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-20250910201045-sqz6f" } response = requests.post(url, json=data, headers=headers) print(response.json())

Example Request - JavaScript

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-20250910201045-sqz6f' }; 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));

Example Request - Java

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 url = "https://gateway.pixazo.ai/bytedance-polling/getVideoResult"; String json = """{ "task_id": "cgt-20250910201045-sqz6f" }"""; HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .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()); } }

Example Request - PHP

<?php $url = 'https://gateway.pixazo.ai/bytedance-polling/getVideoResult'; $data = [ 'task_id' => 'cgt-20250910201045-sqz6f' ]; $json = json_encode($data); $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); 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); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "HTTP Code: " . $httpCode . "\n"; echo "Response: " . $response . "\n"; ?>

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 ResolutionFree