- 提供 Fast(速度优先)和 Std(质量优先)两档模型
- 支持文生视频(T2V)、图生视频(I2V)、多模态参考(Omni)三种模式,由传参自动路由
- 支持 480p / 720p / 1080p 分辨率,3 ~ 15 秒时长
- 支持首帧/尾帧/关键帧、参考图、参考视频、拼贴图、视频扩展、声纹同步等高阶能力
- 异步处理模式,返回任务 ID 用于后续查询
请求示例
bash
curl --request POST \
--url https://api.openveer.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"prompt_optimizer": true
}'
```python
import requests
url = "https://api.openveer.com/v1/videos/generations"
payload = {
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"prompt_optimizer": True
}
headers = {
"Authorization": "Bearer
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = "https://api.openveer.com/v1/videos/generations";
const payload = {
model: "skyreels-v4-fast",
prompt: "A serene forest at sunset with golden light filtering through the trees.",
duration: 5,
resolution: "1080p",
aspect_ratio: "16:9",
prompt_optimizer: true
};
const headers = {
"Authorization": "Bearer
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```
```go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.openveer.com/v1/videos/generations"
payload := map[string]interface{}{
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"prompt_optimizer": true,
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
```
```java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.openveer.com/v1/videos/generations";
String payload = """
{
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"prompt_optimizer": true
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
```
```php
"skyreels-v4-fast",
"prompt" => "A serene forest at sunset with golden light filtering through the trees.",
"duration" => 5,
"resolution" => "1080p",
"aspect_ratio" => "16:9",
"prompt_optimizer" => true
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer
```
```ruby
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.openveer.com/v1/videos/generations")
payload = {
model: "skyreels-v4-fast",
prompt: "A serene forest at sunset with golden light filtering through the trees.",
duration: 5,
resolution: "1080p",
aspect_ratio: "16:9",
prompt_optimizer: true
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer
request["Content-Type"] = "application/json"
request.body = payload.to_json
response = http.request(request)
puts response.body
```
```swift
import Foundation
let url = URL(string: "https://api.openveer.com/v1/videos/generations")!
let payload: [String: Any] = [
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"prompt_optimizer": true
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: (error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
```
```csharp
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.openveer.com/v1/videos/generations";
var payload = @"{
""model"": ""skyreels-v4-fast"",
""prompt"": ""A serene forest at sunset with golden light filtering through the trees."",
""duration"": 5,
""resolution"": ""1080p"",
""aspect_ratio"": ""16:9"",
""prompt_optimizer"": true
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
```
响应示例
json
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KPEY5H3NQ2W8D7T6VB3F9GR4"
}
]
}
json
{
"error": {
"code": 400,
"message": "请求参数无效",
"type": "invalid_request_error"
}
}
json
{
"error": {
"code": 401,
"message": "身份验证失败,请检查您的API密钥",
"type": "authentication_error"
}
}
json
{
"error": {
"code": 402,
"message": "账户余额不足,请充值后再试",
"type": "payment_required"
}
}
json
{
"error": {
"code": 422,
"message": "参数互斥或取值非法(例如同时传入 I2V 与 Omni 字段)",
"type": "invalid_request_error"
}
}
json
{
"error": {
"code": 429,
"message": "请求过于频繁,请稍后再试",
"type": "rate_limit_error"
}
}
json
{
"error": {
"code": 500,
"message": "服务器内部错误,请稍后重试",
"type": "server_error"
}
}
认证
Authorization string生成模式
SkyReels V4 通过请求字段自动路由到对应模式,无需指定 mode 字段:
| 模式 | 触发条件 | 能力 |
|---|---|---|
| T2V(文生视频) | 只传 prompt 及通用字段 |
纯文本驱动生成 |
| I2V(图生视频) | 传入 first_frame_image / end_frame_image / mid_frame_images 任一 |
首帧、尾帧、关键帧控制 |
| Omni(多模态参考) | 传入 ref_images / ref_videos 任一 |
主体参考、拼贴图、动作参考、视频扩展、声纹同步 |
请求参数
通用字段
model stringprompt stringduration integerresolution stringaspect_ratio stringprompt_optimizer booleanI2V 专用字段
first_frame_image stringend_frame_image stringmid_frame_images object[]Omni 专用字段
ref_images object[]ref_videos object[]支持的生成场景
以下场景 skyreels-v4-fast 和 skyreels-v4-std 均支持:
| 场景 | 模式 | 必填参数 | 典型用例 |
|---|---|---|---|
| 文生视频 | T2V | prompt |
纯文本描述驱动,快速生成概念镜头 |
| 图生视频 - 首帧 | I2V | first_frame_image |
静图转视频,指定起始画面 |
| 图生视频 - 尾帧 | I2V | end_frame_image |
指定视频收束画面 |
| 图生视频 - 关键帧 | I2V | mid_frame_images(1 \~ 6) |
首 + 尾 + 中间关键帧,精准控制分镜节奏 |
| Omni 单/多主体参考 | Omni | ref_images(type=image) |
角色一致性、多主体同框 |
| Omni 拼贴图 | Omni | ref_images(type=grid,1 张) |
分步流程视频(教程、菜谱、操作示范) |
| Omni 动作参考 | Omni | ref_videos(type=reference) |
复刻参考视频的动作、主体或风格 |
| Omni 视频扩展 | Omni | ref_videos(type=extend) |
从已有视频续写后续剧情 |
| Omni 声纹同步 | Omni | ref_images(type=image)+ audio_url |
数字人口播、音频驱动对口型 |
参数约束
以下约束违反时请求将被拒绝并返回 422,且 不产生计费:
| 参数 | 约束 |
|---|---|
prompt |
最长 1280 tokens |
duration |
[3, 15] 秒;带 ref_videos.type=reference 时被参考视频长度覆盖(上限 10 秒) |
resolution |
仅 480p / 720p / 1080p |
aspect_ratio |
16:9 / 4:3 / 1:1 / 9:16 / 3:4;I2V 忽略;Omni 带 ref_videos 时忽略 |
mid_frame_images |
最多 6 个;time_stamp 必须为 -1 或落在 (0, duration) 区间 |
ref_images 整体 |
列表内 type 必须一致;不能与 I2V 字段同时出现 |
ref_images.type=grid |
列表长度必须 = 1;image_urls 必须为 1 张 |
ref_images.type=image |
列表长度 1 \~ 3;每项 image_urls 长度 1 \~ 5 |
ref_images.audio_url |
仅 type=image 支持,音频 ≤ 15 秒 |
ref_videos |
最多 1 个;video_url MP4 / MOV,≤ 15 秒 |
ref_videos.type=reference |
覆盖请求 duration(最长 10 秒),可与 ref_images.type=image 组合,默认带入输入视频音频 |
ref_videos.type=extend |
按请求 duration 计费;不能与 ref_images 组合 |
tag 字段 |
必须以 @ 开头且出现在 prompt 中 |
| I2V / Omni 互斥 | I2V 字段与 Omni 字段不能同时出现 |
响应
code integerdata arraytask_id string请求示例
场景 1:文生视频(最简)
{
"model": "skyreels-v4-fast",
"prompt": "A serene forest at sunset with golden light filtering through the trees."
}
场景 2:文生视频(完整参数)
{
"model": "skyreels-v4-std",
"prompt": "A serene forest at sunset.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"prompt_optimizer": true
}
场景 3:图生视频 - 首帧
{
"model": "skyreels-v4-fast",
"prompt": "Slowly pull the camera back to reveal the entire scene.",
"first_frame_image": "https://example.com/start.png",
"duration": 5
}
场景 4:图生视频 - 首尾帧 + 中间关键帧
{
"model": "skyreels-v4-std",
"prompt": "The King summons a flying dragon. @image1 The dragon lowers. The King mounts and flies away.",
"duration": 8,
"resolution": "1080p",
"first_frame_image": "https://example.com/k2v_0.png",
"end_frame_image": "https://example.com/k2v_2.png",
"mid_frame_images": [
{ "tag": "@image1", "image_url": "https://example.com/k2v_1.png", "time_stamp": 3 }
]
}
场景 5:Omni - 单主体参考
{
"model": "skyreels-v4-fast",
"prompt": "@Actor-1 walks through a neon-lit street at night.",
"ref_images": [
{ "tag": "@Actor-1", "type": "image", "image_urls": ["https://example.com/actor.jpg"] }
]
}
场景 6:Omni - 多主体 + 视频动作参考
{
"model": "skyreels-v4-fast",
"prompt": "The man from @image_1 imitates the move on the left in @video_1. The woman from @image_2 imitates the right side.",
"duration": 5,
"ref_images": [
{ "tag": "@image_1", "type": "image", "image_urls": ["https://example.com/a.png"] },
{ "tag": "@image_2", "type": "image", "image_urls": ["https://example.com/b.png"] }
],
"ref_videos": [
{ "tag": "@video_1", "type": "reference", "video_url": "https://example.com/motion.mp4" }
]
}
场景 7:Omni - 拼贴图(grid)
{
"model": "skyreels-v4-fast",
"prompt": "Create a video showing how to make tomato and egg noodles based on @image1.",
"ref_images": [
{ "tag": "@image1", "type": "grid", "image_urls": ["https://example.com/recipe_grid.png"] }
]
}
场景 8:Omni - 视频扩展(extend)
{
"model": "skyreels-v4-fast",
"prompt": "Video extended @video1, someone walks over and sits on the sofa.",
"duration": 8,
"ref_videos": [
{ "tag": "@video1", "type": "extend", "video_url": "https://example.com/source.mp4" }
]
}
场景 9:Omni - 带声纹(语音同步)
{
"model": "skyreels-v4-std",
"prompt": "@Actor-1 speaks with a calm tone.",
"ref_images": [
{
"tag": "@Actor-1",
"type": "image",
"image_urls": ["https://example.com/actor.jpg"],
"audio_url": "https://example.com/voice.mp3"
}
]
}