Video Generation
Generate videos from text, images, and supported reference assets.
Video generation is asynchronous. Create a task, poll its status, and download content only after the task is completed.
- Create:
POST /v1/videos/generations - Status:
GET /v1/videos/{video_id} - Content:
GET /v1/videos/{video_id}/content(video/mp4) - Edit:
POST /v1/videos/edits; the legacy Remix endpoint is deprecated
Create a video task
Endpoint: POST /v1/videos/generations
curl -X POST 'https://silkdock.ai/v1/videos/generations' \
-H 'Authorization: Bearer $SILKDOCK_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "seedance-2.0",
"prompt": "Ocean waves strike a lighthouse as the camera slowly pushes in",
"seconds": 8,
"extra_body": {
"resolution": "1080p",
"aspect_ratio": "16:9"
}
}'Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A public model ID from the capability tables. |
prompt | string | Yes | Video description or transformation instruction. |
seconds | integer | No | Must match the selected model's integer range or fixed-value list. |
input_reference | string | string[] | No | One reference image URL or a list of image URLs. Support is model-specific. |
image | string | No | First-frame image URL alias supported by Wan 3.0. |
size | string | No | Legacy pixel dimensions. Prefer extra_body.resolution and extra_body.aspect_ratio. |
user | string | No | End-user identifier supplied by the caller. |
extra_body.resolution | string | No | 480p, 720p, 1080p, or 4k, as supported by the model. |
extra_body.aspect_ratio | string | No | Aspect ratio in width:height form. |
extra_body.first_frame_url | string | No | First-frame URL for models with start/end-frame support. |
extra_body.last_frame_url | string | No | Last-frame URL; use it together with first_frame_url. |
extra_body.reference_image_urls | string[] | No | Multimodal reference images. |
extra_body.reference_video_urls | string[] | No | Multimodal reference videos. |
extra_body.reference_audio_urls | string[] | No | Multimodal reference audio clips. |
extra_body.motion_ref_url | string | No | Motion-transfer reference video. |
extra_body.motion_ref_urls | string[] | No | Multiple motion-reference videos when supported. |
extra_body.motion_mode | string | No | Kling motion mode: std or pro. Seedance ignores this field. |
extra_body.character_orientation | string | No | Kling motion character orientation: image or video. |
extra_body.keep_original_sound | boolean | No | Preserve the original motion-reference sound for Kling. |
extra_body.audio_url | string | No | Input audio URL. Audio input is distinct from generated output audio. |
extra_body.audio | boolean | No | Enable or disable generated output audio for Wan 3.0. |
extra_body.generate_audio | boolean | No | Generate output audio when supported. |
extra_body.negative_prompt | string | No | Negative prompt for supported Kling models. |
extra_body.seed | integer | No | Random seed for supported Kling models. |
extra_body.prompt_extend | boolean | No | Wan prompt enhancement; defaults to true. |
extra_body.prompt_optimizer | boolean | No | Hailuo prompt optimization; defaults to true. |
extra_body.fast_pretreatment | boolean | No | Hailuo fast preprocessing; defaults to false. |
extra_body.aigc_watermark | boolean | No | Hailuo AIGC watermark; defaults to false. |
extra_body.enhance_prompt | boolean | No | Veo prompt enhancement; defaults to true. |
extra_body.watermark | boolean | No | Seedance watermark; defaults to false. |
extra_body.video_url | string | No | Seedance reference video for reference-to-video mode. |
extra_body.first_image / last_image | string | No | Compatibility aliases for Seedance start/end-frame input. |
extra_body.motion_strength | number | No | Motion strength; use only when the model page documents an allowed value. |
extra_body.camera_control | object | No | Kling motion camera controls. |
extra_body.element_list | array | No | Kling subject-reference or element list. |
extra_body.background_tolerance | number | No | Kling motion background tolerance. |
extra_body.frames | integer | No | Seedance output frame count; do not also send duration when using it. |
extra_body.return_last_frame | boolean | No | Return the generated last frame for Seedance. |
extra_body.camera_fixed | boolean | No | Fix the camera for Seedance. |
extra_body.callback_url | string | No | Seedance task callback URL. |
extra_body.safety_identifier | string | No | Seedance safety identifier. |
extra_body.service_tier | string | No | Seedance service tier. |
extra_body.execution_expires_after | integer | No | Seedance task execution expiry. |
Use input_reference consistently for reference images: a string means one image and an array means multiple reference images. Start/end-frame generation is different and must use extra_body.first_frame_url and extra_body.last_frame_url explicitly.
For motion transfer, send the character image through input_reference and the motion video through extra_body.motion_ref_url. Use reference_video_urls for general video guidance and reference_audio_urls for audio guidance.
think_level, thinking_level, and reasoning_effort are not part of the public image or video contract. Wan 3.0 also does not expose enable_thinking.
Do not send extension fields that are absent from the selected model's model-specific input list.
Reference input selection
| Goal | Input |
|---|---|
| Single-image video | input_reference as a URL or file |
| Multiple reference images | input_reference as a URL array |
| General video reference | extra_body.reference_video_urls |
| Motion transfer | input_reference plus extra_body.motion_ref_url |
| Audio reference | extra_body.reference_audio_urls |
| First or start/end frames | extra_body.first_frame_url and optionally extra_body.last_frame_url |
The gateway maps input_reference to the selected model's native image-to-video or reference-image request. It does not automatically turn a normal reference into a first frame.
Discover model capabilities
Query GET /model_group/info?model_group=<MODEL_ID> before presenting model-specific controls.
| Response field | Type | Description |
|---|---|---|
supported_resolutions | string[] | Supported resolution tiers. |
supported_aspect_ratios | string[] | Supported display ratios; prefer this list when rendering size controls. |
max_video_duration_seconds | number | Maximum output duration. |
supports_video_audio_input | boolean | Whether reference audio is supported. |
supports_video_audio_output | boolean | Whether generated output audio can be controlled. |
supports_video_multimodal_reference | boolean | Whether multimodal reference assets or native structures such as element_list are supported. |
supports_video_start_end_frame | boolean | Whether explicit start/end-frame generation is supported. |
supports_video_motion | boolean | Whether motion transfer is supported. |
curl 'https://silkdock.ai/model_group/info?model_group=seedance-2.0' \
-H 'Authorization: Bearer $SILKDOCK_API_KEY'Task responses
Creating a task returns an opaque ID. Do not parse or construct video IDs; status and content requests do not need the model ID again.
{
"id": "video_xxxxxx",
"object": "video",
"status": "processing",
"usage": {
"duration_seconds": 10.0,
"video_resolution": "1080p",
"has_audio": false
}
}A completed status response may include the download URL:
{
"id": "video_xxxxxx",
"status": "completed",
"url": "https://cdn.example.com/video.mp4"
}status is processing, completed, or failed. Failed tasks include an error object.
Generation capabilities
| Model | Text | Image | Multi-image/video | Start/end frames | Motion transfer | Audio input | Generated audio |
|---|---|---|---|---|---|---|---|
seedance-2.0 | Yes | Yes | Yes | Yes | No | Yes | Yes |
seedance-2.0-fast | Yes | Yes | Yes | No | No | Yes | Yes |
kling-3.0 | Yes | Yes | Yes | Yes | Yes | No | Yes |
kling-2.6 | Yes | Yes | Motion reference | No | Yes | No | Yes |
kling-2.5-turbo | Yes | Yes | No | No | No | No | No |
wan-2.5 | Yes | Yes | No | No | No | Yes | No |
wan-2.6 | Yes | Yes | No | No | No | Yes | No |
wan-2.6-flash | No | Yes | Yes | No | No | Yes | Yes |
wan-2.7 | Yes | Yes | Yes | Yes | No | Yes | No |
wan-3.0 | Yes | Yes | Yes | Yes | No | Yes | Yes |
hailuo-2.3 | Yes | Yes | No | No | No | No | No |
hailuo-2.3-fast | No | Yes | No | No | No | No | No |
veo-3.1 | Yes | No | No | No | No | No | Yes |
veo-3.1-fast | Yes | No | No | No | No | No | Yes |
sora-2 | Yes | Yes | No | No | No | No | Yes |
sora-2-pro | Yes | Yes | No | No | No | No | Yes |
gen4_turbo | No | Yes | No | No | No | No | No |
Output specifications
| Model | Resolutions | Aspect ratios | seconds |
|---|---|---|---|
seedance-2.0 | 480p, 720p, 1080p, 4k | adaptive, 1:1, 4:3, 3:4, 16:9, 9:16, 21:9 | Any integer 4-15, or -1 for automatic |
seedance-2.0-fast | 480p, 720p | adaptive, 1:1, 4:3, 3:4, 16:9, 9:16, 21:9 | Any integer 4-15, or -1 for automatic |
kling-3.0 | 720p, 1080p, 4k | 1:1, 16:9, 9:16 | Any integer 1-15 |
kling-2.6 | 720p, 1080p | 16:9, 9:16 | Any integer 5-10 |
kling-2.5-turbo | 720p, 1080p | 1:1, 16:9, 9:16 | Any integer 4-10 |
wan-2.5 | 480p, 720p, 1080p | 1:1, 4:3, 3:4, 16:9, 9:16 | Any integer 2-10 |
wan-2.6, wan-2.6-flash, wan-2.7 | 720p, 1080p | 1:1, 4:3, 3:4, 16:9, 9:16 | 5, 10, or 15 |
wan-3.0 | 480p, 720p, 1080p | adaptive, 16:9, 4:3, 1:1, 3:4, 9:16 | Any integer 2-30, or -1 for automatic |
hailuo-2.3 | 720p, 1080p | Model default for text; follows reference image for image mode | 6 or 10 |
hailuo-2.3-fast | 720p, 1080p | Follows reference image | 6 or 10 |
veo-3.1, veo-3.1-fast | 720p, 1080p, 4k | 16:9, 9:16 | 4, 6, or 8 |
sora-2 | 720p | 16:9, 9:16 | 4, 8, 12, 16, or 20 |
sora-2-pro | 720p, 1024p, 1080p | 16:9, 9:16 | 4, 8, 12, 16, or 20 |
gen4_turbo | 720p | 16:9, 9:16, 4:3, 3:4, 1:1, 21:9 | Any integer 2-10 |
A range such as 4-15 accepts every integer within the range. A comma-separated list accepts only those exact values.
Model-specific inputs
| Model | Stable conditional fields |
|---|---|
seedance-2.0 | input_reference, multimodal image/video/audio references, start/end frames, motion reference, audio input/output, frames, camera, seed, callback, safety, service tier, expiry, watermark |
seedance-2.0-fast | input_reference, multimodal image/video/audio references, motion reference, audio input/output, frames, camera, seed, callback, safety, service tier, expiry, watermark |
kling-3.0 | input_reference, image/video references, start/end frames, motion fields, element_list, generated audio, negative prompt, seed |
kling-2.6 | input_reference, motion fields, generated audio, negative prompt, seed |
kling-2.5-turbo | input_reference, extra_body.negative_prompt, extra_body.seed |
wan-2.5, wan-2.6 | input_reference, extra_body.audio_url, extra_body.prompt_extend |
wan-2.6-flash | input_reference, image/video references, audio input/output, extra_body.prompt_extend |
wan-2.7 | input_reference, image/video references, start/end frames, audio input, extra_body.prompt_extend |
wan-3.0 | First-frame aliases, media, image/video/audio references, start/end frames, audio output, seed, prompt enhancement, watermark |
hailuo-2.3 | input_reference, prompt optimizer, fast pretreatment, AIGC watermark |
hailuo-2.3-fast | input_reference (required), prompt optimizer, fast pretreatment, AIGC watermark |
gen4_turbo | input_reference (required) |
veo-3.1, veo-3.1-fast | extra_body.generate_audio, extra_body.enhance_prompt |
sora-2, sora-2-pro | input_reference; generated videos can be passed to POST /v1/videos/edits |
Pricing
All prices are in USD. Unless a row says “per video,” calculate unit price/second * seconds.
Seedance and Kling
| Model / resolution | Standard or silent | Reference or audio | Notes |
|---|---|---|---|
seedance-2.0 480p/720p | $0.145667/s | $0.159404/s reference | Generated audio is included |
seedance-2.0 1080p/4k | $0.363374/s | $0.380117/s reference | Generated audio is included |
seedance-2.0-fast 480p/720p | $0.117451/s | $0.115982/s reference | Generated audio is included |
kling-3.0 720p | $0.087719/s | $0.131579/s with audio | Motion: $0.131579/s |
kling-3.0 1080p | $0.116959/s | $0.175439/s with audio | Motion: $0.175439/s |
kling-3.0 4k | $0.438596/s | $0.438596/s with audio | Audio is included |
kling-2.6 720p | $0.043860/s | Price unavailable with audio | Motion: $0.073099/s |
kling-2.6 1080p | $0.073099/s | $0.146199/s with audio | Motion: $0.116959/s |
kling-2.5-turbo 720p/1080p | $0.043860/s | Not supported | Fixed full-clip prices by resolution require confirmation |
Seedance standard mode covers text-to-video and single-image video. Multiple images or reference videos use reference-mode pricing.
Wan
| Model | 480p | 720p silent / audio | 1080p silent / audio | Reference images |
|---|---|---|---|---|
wan-2.5 | $0.050000/s | $0.100000/s / not supported | $0.150000/s / not supported | $0.030/image |
wan-2.6 | - | $0.100000/s / not supported | $0.150000/s / not supported | $0.030/image |
wan-2.6-flash | - | $0.025000/s / $0.050000/s | $0.037500/s / $0.075000/s | $0.030/image |
wan-2.7 | - | $0.100000/s / not supported | $0.150000/s / not supported | $0.030/image; advanced $0.075/image |
wan-3.0 | $0.050000/s | $0.100000/s / $0.100000/s | $0.200000/s / $0.200000/s | Included in video rate |
Audio input does not mean generated audio. Audio pricing applies only when the model generates audio in the output video. Wan 3.0 uses the same resolution rate whether generated audio is enabled or disabled.
Hailuo
| Model / resolution | 6-second video | 10-second video |
|---|---|---|
hailuo-2.3 720p | $0.292398 | $0.584795 |
hailuo-2.3 1080p | $0.511696 | $1.023392 |
hailuo-2.3-fast 720p | $0.197368 | $0.328947 |
hailuo-2.3-fast 1080p | $0.337719 | Price unavailable |
Veo, Sora, and Gen-4
| Model / resolution | USD/second | Audio |
|---|---|---|
veo-3.1 720p/1080p | $0.400000 | Included |
veo-3.1 4k | $0.600000 | Included |
veo-3.1-fast 720p | $0.100000 | Included |
veo-3.1-fast 1080p | $0.120000 | Included |
veo-3.1-fast 4k | $0.300000 | Included |
sora-2 720p | $0.100000 | Synchronized audio included |
sora-2-pro 720p | $0.300000 | Synchronized audio included |
gen4_turbo 720p | $0.050000 | Not supported; reference image required |
Do not expose combinations marked “Price unavailable” in quotes or checkout controls until billing configuration is complete.
Image-to-video example
{
"model": "wan-2.7",
"prompt": "The subject turns and runs forward as the camera pulls back smoothly",
"input_reference": "https://example.com/first-frame.png",
"seconds": 10,
"extra_body": {
"resolution": "1080p",
"aspect_ratio": "16:9"
}
}Start/end-frame example
{
"model": "seedance-2.0",
"prompt": "Push slowly toward the subject and end on a night skyline",
"seconds": 6,
"extra_body": {
"resolution": "1080p",
"aspect_ratio": "16:9",
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png"
}
}Normal input_reference values remain reference images and do not automatically become first_frame_url. Check supports_video_start_end_frame before exposing this mode.
Code examples
curl -X POST 'https://silkdock.ai/v1/videos/generations' \
-H 'Authorization: Bearer sk-xxx' \
-H 'Content-Type: application/json' \
-d '{"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}'
curl 'https://silkdock.ai/v1/videos/video_xxx' \
-H 'Authorization: Bearer sk-xxx'
curl -L 'https://silkdock.ai/v1/videos/video_xxx/content' \
-H 'Authorization: Bearer sk-xxx' --output out.mp4const headers = { Authorization: "Bearer sk-xxx", "Content-Type": "application/json" };
const response = await fetch("https://silkdock.ai/v1/videos/generations", {
method: "POST",
headers,
body: JSON.stringify({
model: "seedance-2.0",
prompt: "Ocean waves strike a lighthouse",
seconds: 10,
extra_body: { resolution: "1080p", aspect_ratio: "16:9" },
}),
});
console.log(await response.json());import OpenAI from "openai";
const client = new OpenAI({ apiKey: "sk-xxx", baseURL: "https://silkdock.ai/v1" });
const video = await client.videos.create({
model: "seedance-2.0",
prompt: "Ocean waves strike a lighthouse",
seconds: 10,
extra_body: { resolution: "1080p", aspect_ratio: "16:9" },
});
let status = video;
while (status.status === "processing") {
await new Promise((resolve) => setTimeout(resolve, 5000));
status = await client.videos.retrieve(video.id);
}from openai import OpenAI
import time
client = OpenAI(api_key="sk-xxx", base_url="https://silkdock.ai/v1")
video = client.videos.create(
model="seedance-2.0",
prompt="Ocean waves strike a lighthouse",
seconds=10,
extra_body={"resolution": "1080p", "aspect_ratio": "16:9"},
)
while True:
status = client.videos.retrieve(video.id)
if status.status == "completed": break
if status.status == "failed": raise RuntimeError(status.error)
time.sleep(5)
content = client.videos.retrieve_content(video.id)
with open("out.mp4", "wb") as output:
output.write(content.read())#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer sk-xxx");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://silkdock.ai/v1/videos/generations");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"model\":\"seedance-2.0\",\"prompt\":\"Ocean waves strike a lighthouse\",\"seconds\":10,\"extra_body\":{\"resolution\":\"1080p\",\"aspect_ratio\":\"16:9\"}}");
curl_easy_perform(curl);
curl_easy_cleanup(curl);
}NSURL *url = [NSURL URLWithString:@"https://silkdock.ai/v1/videos/generations"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"POST";
[request setValue:@"Bearer sk-xxx" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *payload = @{ @"model": @"seedance-2.0", @"prompt": @"Ocean waves strike a lighthouse", @"seconds": @10, @"extra_body": @{ @"resolution": @"1080p", @"aspect_ratio": @"16:9" } };
request.HTTPBody = [NSJSONSerialization dataWithJSONObject:payload options:0 error:nil];
[[[NSURLSession sharedSession] dataTaskWithRequest:request] resume];HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://silkdock.ai/v1/videos/generations"))
.header("Authorization", "Bearer sk-xxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{\"model\":\"seedance-2.0\",\"prompt\":\"Ocean waves strike a lighthouse\",\"seconds\":10,\"extra_body\":{\"resolution\":\"1080p\",\"aspect_ratio\":\"16:9\"}}"))
.build();
System.out.println(HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()).body());payload := strings.NewReader(`{"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}`)
req, _ := http.NewRequest("POST", "https://silkdock.ai/v1/videos/generations", payload)
req.Header.Set("Authorization", "Bearer sk-xxx")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))<?php
$ch = curl_init('https://silkdock.ai/v1/videos/generations');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk-xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['model' => 'seedance-2.0', 'prompt' => 'Ocean waves strike a lighthouse', 'seconds' => 10, 'extra_body' => ['resolution' => '1080p', 'aspect_ratio' => '16:9']])]);
echo curl_exec($ch);
curl_close($ch);var request = URLRequest(url: URL(string: "https://silkdock.ai/v1/videos/generations")!)
request.httpMethod = "POST"
request.setValue("Bearer sk-xxx", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = ["model": "seedance-2.0", "prompt": "Ocean waves strike a lighthouse", "seconds": 10, "extra_body": ["resolution": "1080p", "aspect_ratio": "16:9"]]
request.httpBody = try! JSONSerialization.data(withJSONObject: payload)
URLSession.shared.dataTask(with: request) { data, _, _ in print(String(data: data!, encoding: .utf8)!) }.resume()using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer sk-xxx");
var json = JsonSerializer.Serialize(new { model = "seedance-2.0", prompt = "Ocean waves strike a lighthouse", seconds = 10, extra_body = new { resolution = "1080p", aspect_ratio = "16:9" } });
var response = await client.PostAsync("https://silkdock.ai/v1/videos/generations", new StringContent(json, Encoding.UTF8, "application/json"));
Console.WriteLine(await response.Content.ReadAsStringAsync());uri = URI("https://silkdock.ai/v1/videos/generations")
request = Net::HTTP::Post.new(uri, { "Authorization" => "Bearer sk-xxx", "Content-Type" => "application/json" })
request.body = { model: "seedance-2.0", prompt: "Ocean waves strike a lighthouse", seconds: 10, extra_body: { resolution: "1080p", aspect_ratio: "16:9" } }.to_json
puts Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }.bodyval json = """{"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}"""
val request = Request.Builder().url("https://silkdock.ai/v1/videos/generations")
.header("Authorization", "Bearer sk-xxx")
.post(json.toRequestBody("application/json".toMediaType())).build()
OkHttpClient().newCall(request).execute().use { println(it.body?.string()) }let response = reqwest::Client::new()
.post("https://silkdock.ai/v1/videos/generations")
.bearer_auth("sk-xxx")
.json(&serde_json::json!({"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}))
.send().await?;
println!("{}", response.text().await?);POST /v1/videos/generations HTTP/1.1
Host: silkdock.ai
Authorization: Bearer sk-xxx
Content-Type: application/json
{"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}final response = await http.post(
Uri.parse('https://silkdock.ai/v1/videos/generations'),
headers: {'Authorization': 'Bearer sk-xxx', 'Content-Type': 'application/json'},
body: jsonEncode({'model': 'seedance-2.0', 'prompt': 'Ocean waves strike a lighthouse', 'seconds': 10, 'extra_body': {'resolution': '1080p', 'aspect_ratio': '16:9'}}),
);
print(response.body);response <- request("https://silkdock.ai/v1/videos/generations") |>
req_headers(Authorization = "Bearer sk-xxx") |>
req_body_json(list(model = "seedance-2.0", prompt = "Ocean waves strike a lighthouse", seconds = 10, extra_body = list(resolution = "1080p", aspect_ratio = "16:9"))) |>
req_perform()
resp_body_json(response)let body = {|{"model":"seedance-2.0","prompt":"Ocean waves strike a lighthouse","seconds":10,"extra_body":{"resolution":"1080p","aspect_ratio":"16:9"}}|} in
let headers = Cohttp.Header.of_list [
("Authorization", "Bearer sk-xxx"); ("Content-Type", "application/json")
] in
Lwt_main.run (Cohttp_lwt_unix.Client.post ~headers ~body:(Cohttp_lwt.Body.of_string body)
(Uri.of_string "https://silkdock.ai/v1/videos/generations"))Check and download a task
- Status:
GET /v1/videos/{video_id} - Content:
GET /v1/videos/{video_id}/content
The task status is processing, completed, or failed. Download the result only after the status is completed. Poll every 3-5 seconds in production and set an application-level timeout.
Errors and billing
| Scenario | Behavior |
|---|---|
| Unsupported input mode | 400 BadRequestError |
| Unsupported resolution/aspect-ratio combination | Falls back to the model default and records a warning |
| Generation failure | status: "failed" with details in error |
| Download before completion | Video-not-ready error |
Billing depends on the model, duration, resolution, and generated audio. The usage object contains the metering inputs used by the gateway.
Last updated on