SiliconFlow

创建视频生成请求

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.

POST
/video/submit
AuthorizationBearer <token>required

Use the following format for authentication: Bearer

In: header

modelstringrequired

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.

Value in"Wan-AI/Wan2.2-I2V-A14B" | "Wan-AI/Wan2.2-T2V-A14B"
Example"Wan-AI/Wan2.2-I2V-A14B"
promptstringrequired

The text prompt to generate the video description from.

negative_promptstring

negative prompt

image_sizestringrequired

Length-width ratio of the generated image.

Value in"1280x720" | "720x1280" | "960x960"
imageUpload Image

When selecting the model Wan-AI/Wan2.2-I2V-14B-720P, the image parameter is a required field.

Value in"data:image/png;base64, XXX" | "img_url"
Example"https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641"
seedinteger

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.

TypeScript Definitions

Use the response body type in TypeScript.

requestIdstring

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 <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "Wan-AI/Wan2.2-I2V-A14B",
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "image_size": "1280x720",
  "image": "https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641",
  "seed": 123
}'
import requests

url = "https://api.siliconflow.cn/v1/video/submit"

payload = {
    "model": "Wan-AI/Wan2.2-I2V-A14B",
    "prompt": "<string>",
    "negative_prompt": "<string>",
    "image_size": "1280x720",
    "image": "https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641",
    "seed": 123
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"Wan-AI/Wan2.2-I2V-A14B","prompt":"<string>","negative_prompt":"<string>","image_size":"1280x720","image":"https://inews.gtimg.com/om_bt/Os3eJ8u3SgB3Kd-zrRRhgfR5hUvdwcVPKUTNO6O7sZfUwAA/641","seed":123}'
};

fetch('https://api.siliconflow.cn/v1/video/submit', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
{
  "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"