Pixverse C1 Reference Image to Video
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>"
}Video
Pixverse C1 Reference Image to Video
POST
/
v3
/
async
/
pixverse-pixverse-c1-reference-to-video
Pixverse C1 Reference Image to Video
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>"
}The Pixverse C1 reference image-to-video tool can generate cinematic videos from 1-7 reference images. It uses the @ref_name syntax to reference images in the prompt, and supports multi-character/object consistency, multiple resolutions (360p-1080p), variable durations (1-15 seconds), and audio generation.
This is an asynchronous API and will only return the task_id of the async task. You should use this task_id to request the Get Task Result API to retrieve the generated result.
Request Headers
string
required
Enum value:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
object[]
required
List of reference images (1-7 images)Array length: 1 - 7
Hide properties
Hide properties
string
required
Reference image type: subject indicates video generation using the person/object in the reference image as the subject; background indicates video generation using the scene/environment in the reference image as the backgroundAllowed values:
subject, backgroundstring
required
A short identifier name for the reference image, used to reference the image in the prompt via the @ref_name syntax. @ref_name must be followed by a space
string
required
URL of the reference image
string
required
Scene description text. Use the @ref_name syntax to reference uploaded reference images (for example, “@hero running through @city”). @ref_name must be followed by a space, and the reference name must match the ref_name in images
integer
default:5
Duration of the generated video (seconds), range 1-15Value range: [1, 15]
string
default:"720p"
Resolution of the output videoAllowed values:
360p, 540p, 720p, 1080pstring
default:"16:9"
Aspect ratio of the output videoAllowed values:
16:9, 4:3, 1:1, 3:4, 9:16, 2:3, 3:2, 21:9boolean
default:false
Whether to also generate native video audio
Response
string
required
Use the task_id to request the Get Task Result API to retrieve the generated output.
⌘I