Pixverse C1 参考图生视频
curl --request POST \
--url https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
{
"type": "<string>",
"ref_name": "<string>",
"image_url": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"generate_audio_switch": true
}
'import requests
url = "https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video"
payload = {
"images": [
{
"type": "<string>",
"ref_name": "<string>",
"image_url": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"generate_audio_switch": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
images: [{type: '<string>', ref_name: '<string>', image_url: '<string>'}],
prompt: '<string>',
duration: 123,
resolution: '<string>',
aspect_ratio: '<string>',
generate_audio_switch: true
})
};
fetch('https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video', 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://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video",
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([
'images' => [
[
'type' => '<string>',
'ref_name' => '<string>',
'image_url' => '<string>'
]
],
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'aspect_ratio' => '<string>',
'generate_audio_switch' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video"
payload := strings.NewReader("{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
Pixverse C1 参考图生视频
POST
/
v3
/
async
/
pixverse-pixverse-c1-reference-to-video
Pixverse C1 参考图生视频
curl --request POST \
--url https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
{
"type": "<string>",
"ref_name": "<string>",
"image_url": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"generate_audio_switch": true
}
'import requests
url = "https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video"
payload = {
"images": [
{
"type": "<string>",
"ref_name": "<string>",
"image_url": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>",
"generate_audio_switch": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
images: [{type: '<string>', ref_name: '<string>', image_url: '<string>'}],
prompt: '<string>',
duration: 123,
resolution: '<string>',
aspect_ratio: '<string>',
generate_audio_switch: true
})
};
fetch('https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video', 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://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video",
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([
'images' => [
[
'type' => '<string>',
'ref_name' => '<string>',
'image_url' => '<string>'
]
],
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'aspect_ratio' => '<string>',
'generate_audio_switch' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video"
payload := strings.NewReader("{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/pixverse-pixverse-c1-reference-to-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"images\": [\n {\n \"type\": \"<string>\",\n \"ref_name\": \"<string>\",\n \"image_url\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"generate_audio_switch\": true\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Pixverse C1 参考图生视频工具可根据 1-7 张参考图像生成电影级视频,通过 @ref_name 语法在提示词中引用参考图,支持多角色/物体一致性、多分辨率(360p-1080p)、可变时长(1-15秒)及音频生成。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索生成结果。
请求头
枚举值:
application/jsonBearer 身份验证格式: Bearer {{API 密钥}}。
请求体
场景描述文本,使用 @ref_name 语法引用上传的参考图像(例如「@hero 在 @city 中奔跑」),@ref_name 后须跟空格,引用名称须与 images 中的 ref_name 匹配
生成视频的时长(秒),范围 1-15取值范围:[1, 15]
输出视频的分辨率可选值:
360p, 540p, 720p, 1080p输出视频的宽高比可选值:
16:9, 4:3, 1:1, 3:4, 9:16, 2:3, 3:2, 21:9是否同时生成视频原生音频
响应信息
使用 task_id 请求 查询任务结果 API 来检索生成的输出。
⌘I