创建视频任务
curl --request POST \
--url https://models.phanedge.cloud/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"seconds": 6,
"size": "1280x720",
"input_reference": [
"https://example.com/image.jpg"
]
}
'import requests
url = "https://models.phanedge.cloud/v1/videos"
payload = {
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"seconds": 6,
"size": "1280x720",
"input_reference": ["https://example.com/image.jpg"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'veo-3.1-fast-generate-preview',
prompt: 'A cinematic lion at sunset',
seconds: 6,
size: '1280x720',
input_reference: ['https://example.com/image.jpg']
})
};
fetch('https://models.phanedge.cloud/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.phanedge.cloud/v1/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'veo-3.1-fast-generate-preview',
'prompt' => 'A cinematic lion at sunset',
'seconds' => 6,
'size' => '1280x720',
'input_reference' => [
'https://example.com/image.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://models.phanedge.cloud/v1/videos"
payload := strings.NewReader("{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://models.phanedge.cloud/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.phanedge.cloud/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "video_abc123",
"object": "video",
"created_at": 1761234567,
"status": "queued",
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"progress": 0,
"seconds": 6,
"size": "1280x720"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}视频生成
视频生成
使用 Veo 模型生成视频
POST
/
v1
/
videos
创建视频任务
curl --request POST \
--url https://models.phanedge.cloud/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"seconds": 6,
"size": "1280x720",
"input_reference": [
"https://example.com/image.jpg"
]
}
'import requests
url = "https://models.phanedge.cloud/v1/videos"
payload = {
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"seconds": 6,
"size": "1280x720",
"input_reference": ["https://example.com/image.jpg"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'veo-3.1-fast-generate-preview',
prompt: 'A cinematic lion at sunset',
seconds: 6,
size: '1280x720',
input_reference: ['https://example.com/image.jpg']
})
};
fetch('https://models.phanedge.cloud/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.phanedge.cloud/v1/videos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'veo-3.1-fast-generate-preview',
'prompt' => 'A cinematic lion at sunset',
'seconds' => 6,
'size' => '1280x720',
'input_reference' => [
'https://example.com/image.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://models.phanedge.cloud/v1/videos"
payload := strings.NewReader("{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://models.phanedge.cloud/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.phanedge.cloud/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"veo-3.1-fast-generate-preview\",\n \"prompt\": \"A cinematic lion at sunset\",\n \"seconds\": 6,\n \"size\": \"1280x720\",\n \"input_reference\": [\n \"https://example.com/image.jpg\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "video_abc123",
"object": "video",
"created_at": 1761234567,
"status": "queued",
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic lion at sunset",
"progress": 0,
"seconds": 6,
"size": "1280x720"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}可用模型
| 模型 | 说明 |
|---|---|
veo-3.1-generate-preview | 标准质量,画质更优 |
veo-3.1-fast-generate-preview | 快速出片,速度更快 |
创建视频任务
文生视频
curl -X POST "https://models.phanedge.cloud/v1/videos" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cinematic shot of a lion walking through golden savanna at sunset, dramatic lighting",
"seconds": 6,
"size": "1280x720"
}'
图生视频
通过参考图生成视频,支持以下方式: JSON 方式(URL):curl -X POST "https://models.phanedge.cloud/v1/videos" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-generate-preview",
"prompt": "Camera slowly zooms in, cinematic lighting",
"seconds": 6,
"size": "1280x720",
"input_reference": ["https://example.com/image.jpg"]
}'
curl -X POST "https://models.phanedge.cloud/v1/videos" \
-H "Authorization: Bearer $TOKEN" \
-F "model=veo-3.1-generate-preview" \
-F "prompt=Camera slowly zooms in, cinematic lighting" \
-F "seconds=6" \
-F "size=1280x720" \
-F "input_reference=@image.jpg"
首尾帧视频
提供首帧和尾帧图片,生成过渡视频:curl -X POST "https://models.phanedge.cloud/v1/videos" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-generate-preview",
"prompt": "Smooth transition between scenes",
"seconds": 6,
"size": "1280x720",
"input_reference": [
"https://example.com/first_frame.jpg",
"https://example.com/last_frame.jpg"
]
}'
响应示例
{
"id": "video_abc123",
"object": "video",
"model": "veo-3.1-fast-generate-preview",
"status": "queued",
"progress": 0,
"created_at": 1761234567
}
查询任务状态
curl "https://models.phanedge.cloud/v1/videos/{video_id}" \
-H "Authorization: Bearer $TOKEN"
状态说明
| 状态 | 说明 |
|---|---|
queued | 排队中 |
in_progress | 生成中 |
completed | 已完成 |
failed | 失败 |
完成响应示例
{
"id": "video_abc123",
"object": "video",
"model": "veo-3.1-fast-generate-preview",
"status": "completed",
"progress": 100,
"video_url": "https://...",
"seconds": 6,
"size": "1280x720"
}
下载视频
curl -L "https://models.phanedge.cloud/v1/videos/{video_id}/content" \
-H "Authorization: Bearer $TOKEN" \
-o output.mp4
参数说明
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型名称 |
prompt | string | 是 | 文本提示词 |
seconds | int/string | 否 | 视频时长:4、6、8 秒(默认 6) |
size | string | 否 | 分辨率(见下表) |
input_reference | array | 否 | 参考图 URL 数组(1-3 张) |
分辨率选项
| 分辨率 | 画幅 | 说明 |
|---|---|---|
1280x720 | 16:9 横屏 | 720p(默认) |
720x1280 | 9:16 竖屏 | 720p |
1920x1080 | 16:9 横屏 | 1080p(仅支持 8 秒) |
1080x1920 | 9:16 竖屏 | 1080p(仅支持 8 秒) |
最佳实践
- 提示词:描述具体场景、镜头运动、光线氛围,效果更佳
- 1080p 限制:高清分辨率仅支持 8 秒时长
- 参考图:建议与目标画幅比例一致
- 轮询间隔:建议 6-10 秒,避免频繁请求
- 快速版 vs 标准版:快速版适合预览,标准版画质更优
Authorizations
API Key
Body
application/jsonmultipart/form-data
模型名称
Available options:
veo-3.1-generate-preview, veo-3.1-fast-generate-preview Example:
"veo-3.1-fast-generate-preview"
文本提示词
Example:
"A cinematic lion at sunset"
视频时长(秒):4、6、8
Example:
6
分辨率
Available options:
1280x720, 720x1280, 1920x1080, 1080x1920 Example:
"1280x720"
参考图 URL 数组(1-3 张)
Example:
["https://example.com/image.jpg"]
Response
任务创建成功
任务 ID
Example:
"video_abc123"
Available options:
video Example:
"video"
创建时间戳
Example:
1761234567
完成时间戳
任务状态
Available options:
queued, in_progress, completed, failed Example:
"queued"
模型名称
Example:
"veo-3.1-fast-generate-preview"
提示词
进度(0-100)
Example:
0
视频时长
Example:
6
分辨率
Example:
"1280x720"
视频直链(完成后返回)
Show child attributes
Show child attributes

