- Pixverse v6 统一视频生成模型
- 支持文生视频、图生视频、首尾帧过渡、多参考图融合和视频续写
- 支持 360p/540p/720p/1080p 分辨率,1-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": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}'
```python
import requests
url = "https://api.openveer.com/v1/videos/generations"
payload = {
"model": "pixverse-v6",
"prompt": "A cinematic shot of a corgi running through a sunflower field at golden hour",
"size": "16:9",
"resolution": "540p",
"duration": 5
}
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: "pixverse-v6",
prompt: "A cinematic shot of a corgi running through a sunflower field at golden hour",
size: "16:9",
resolution: "540p",
duration: 5
};
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));
```
响应示例
json
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JWXXXXXXXXXXXX"
}
]
}
json
{
"error": {
"type": "invalid_request_error",
"message": "invalid duration 20, allowed range: 1-15 seconds"
}
}
json
{
"error": {
"code": 401,
"message": "身份验证失败,请检查您的 API 密钥",
"type": "authentication_error"
}
}
json
{
"error": {
"code": 403,
"message": "insufficient quota: balance=0, required=0.25",
"type": "quota_not_enough"
}
}
json
{
"error": {
"code": 429,
"message": "请求过于频繁,请稍后再试",
"type": "rate_limit_error"
}
}
认证
Authorization string请求参数
model stringprompt stringresolution stringduration integersize stringseed integernegative_prompt stringaudio booleanwatermark booleanmotion_mode stringgenerate_multi_clip_switch booleanimage_urls stringfirst_frame_image urllast_frame_image urlimg_references stringextend_from_task_id string生成模式
适配器会根据请求字段自动分发到对应生成模式。按优先级匹配,先满足者命中。
| 生成模式 | 触发条件 | 说明 |
|---|---|---|
| 文生视频 | 不传任何图片或续写字段 | 根据 prompt 生成视频 |
| 图生视频 | 传 image_urls 单张 |
使用第一张图片作为输入图 |
| 首尾帧过渡 | 同时传 first_frame_image 和 last_frame_image |
生成两帧之间的平滑过渡 |
| 多参考图融合 | 传 img_references 数组 |
融合 1-7 张参考图生成视频 |
| 视频续写 | 传 extend_from_task_id |
从已完成的 Pixverse 任务继续生成 |
参数规则
| 限制项 | 说明 |
|---|---|
| 视频时长 | 1 ≤ duration ≤ 15 秒;首尾帧过渡模式仅支持 5 或 8 秒 |
| 分辨率 | 仅支持 360p、540p、720p、1080p |
| 宽高比 | size 仅在文生视频和多参考图融合模式生效 |
| Prompt 长度 | prompt 最长 5000 字符,negative_prompt 最长 2048 字符 |
| 图生视频 | image_urls 仅取第一张图片 |
| 首尾帧过渡 | first_frame_image 和 last_frame_image 必须成对出现 |
| 运动模式 | pixverse-v6 仅支持 normal |
| 多参考图融合 | img_references 支持 1-7 张图片 |
| 视频续写 | extend_from_task_id 必须指向当前用户已完成的 pixverse-v6 任务 |
响应
code integerdata arraytask_id string查询任务结果
视频生成为异步任务。提交后会返回 task_id,使用 获取任务状态 接口查询生成进度和结果。
curl --request GET \
--url https://api.openveer.com/v1/tasks/task_01JWXXXXXXXXXXXX \
--header 'Authorization: Bearer <token>'
建议每 5 秒轮询一次,直到任务状态变为 completed 或 failed。
成功结果示例
{
"code": 200,
"data": {
"id": "task_01KSPX48B8V1M6C2ZN0D0T4BKB",
"status": "completed",
"progress": 100,
"cost": 0.2,
"credits_cost": 2,
"created": 1779958948,
"completed": 1779958999,
"estimated_time": 100,
"actual_time": 51,
"result": {
"videos": [
{
"url": ["https://upload.apimart.ai/f/video/xxxx.mp4"],
"expires_at": 1780045399
}
]
}
}
}
视频 URL 路径为 data.result.videos[0].url[0]。url 字段本身是数组,视频链接通常 24 小时后过期,请及时下载或转存。
失败结果示例
{
"code": 200,
"data": {
"id": "task_01KSPX48B8V1M6C2ZN0D0T4BKB",
"status": "failed",
"progress": 100,
"cost": 0,
"credits_cost": 0,
"created": 1779958948,
"completed": 1779958960,
"error": {
"code": "task_failed",
"message": "pixverse error 400063: moderation failed",
"type": "task_failed"
}
}
}
失败时 cost 通常为 0,错误原因请读取 data.error.message。
使用场景
场景 1:文生视频
{
"model": "pixverse-v6",
"prompt": "A neon-lit alley in Tokyo at night, light rain, anamorphic lens flare",
"size": "21:9",
"resolution": "720p",
"duration": 8,
"seed": 42,
"audio": true
}
场景 2:图生视频
{
"model": "pixverse-v6",
"prompt": "Camera slowly zooms in, gentle wind moves the leaves",
"image_urls": ["https://example.com/first-frame.jpg"],
"resolution": "540p",
"duration": 5
}
场景 3:首尾帧过渡
{
"model": "pixverse-v6",
"prompt": "transform smoothly from a puppy to a cat",
"first_frame_image": "https://example.com/puppy.jpg",
"last_frame_image": "https://example.com/cat.jpg",
"resolution": "540p",
"duration": 5,
"motion_mode": "normal"
}
场景 4:多参考图融合
{
"model": "pixverse-v6",
"prompt": "A girl wearing the outfit from image 2, holding the cat from image 3",
"img_references": [
"https://example.com/character.jpg",
"https://example.com/outfit.jpg",
"https://example.com/cat.jpg"
],
"size": "9:16",
"resolution": "720p",
"duration": 5
}
场景 5:视频续写
{
"model": "pixverse-v6",
"prompt": "the character now walks into a forest",
"extend_from_task_id": "task_01JWXXXXXXXXXXXX",
"resolution": "540p",
"duration": 5
}