Submit a Video
Generate a video through the input prompt. This API returns the user's current request ID. The user needs to poll the status interface to get the specific video link. The generated result is valid for 10 minutes, so please retrieve the video link promptly.
Set the header 'Authorization: Bearer {your API key}' for authentication
In: header
Header Parameters
Request trace ID. You can pass a custom value to mark the request; if omitted, the platform generates one automatically. For troubleshooting, either this value or the x-siliconcloud-trace-id in the response header can be provided.
The W3C Trace Context standard tracing header. When present, the platform uses its trace-id part as the tracing identifier of the request.
Corresponding Model Name. To better enhance service quality, we will make periodic changes to the models provided by this service, including but not limited to model on/offlining and adjustments to model service capabilities. We will notify you of such changes through appropriate means such as announcements or message pushes where feasible. For a complete list of available models, please check the Models.
"Wan-AI/Wan2.2-I2V-A14B" | "Wan-AI/Wan2.2-T2V-A14B""Wan-AI/Wan2.2-I2V-A14B"The text prompt to generate the video description from.
negative prompt
Length-width ratio of the generated image.
"1280x720" | "720x1280" | "960x960"When selecting the model Wan-AI/Wan2.2-I2V-14B-720P, the image parameter is a required field.
"data:image/png;base64, XXX" | "img_url""https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641"The seed for the random number generator.
Response Body
The response from the model. The response header contains the x-siliconcloud-trace-id field, which serves as a unique identifier for tracing requests, facilitating log queries and issue troubleshooting; a user-supplied X-Trace-Id request header (if any) is returned as-is in that field. For troubleshooting, either trace ID is sufficient.
TypeScript Definitions
Use the response body type in TypeScript.
The requestId generated by this request needs to be used when calling the status interface.
curl --request POST \
--url https://api.siliconflow.cn/v1/video/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "Wan-AI/Wan2.2-I2V-A14B",
"prompt": "A cat running on grass",
"image_size": "1280x720",
"image": "https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641"
}'
import requests
url = "https://api.siliconflow.cn/v1/video/submit"
payload = {
"model": "Wan-AI/Wan2.2-I2V-A14B",
"prompt": "A cat running on grass",
"image_size": "1280x720",
"image": "https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641"
}
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
{
"requestId": "string"
}{
"code": 20012,
"message": "string",
"data": "string"
}"Invalid token""Forbidden""404 page not found"{
"message": "Request was rejected due to rate limiting. If you want more, please contact contact@siliconflow.cn. Details:TPM limit reached.",
"data": "string"
}{
"code": 50505,
"message": "Model service overloaded. Please try again later.",
"data": "string"
}"string"