curl --request POST \
--url https://api.comfy.org/proxy/vidu/img2video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aspect_ratio": "<string>",
"audio": true,
"bgm": true,
"callback_url": "<string>",
"duration": 123,
"enhance": true,
"images": [
"<string>"
],
"is_rec": true,
"meta_data": "<string>",
"model": "<string>",
"off_peak": true,
"payload": "<string>",
"priority": 123,
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"voice_id": "<string>",
"watermark": true,
"wm_position": 123,
"wm_url": "<string>"
}
'import requests
url = "https://api.comfy.org/proxy/vidu/img2video"
payload = {
"aspect_ratio": "<string>",
"audio": True,
"bgm": True,
"callback_url": "<string>",
"duration": 123,
"enhance": True,
"images": ["<string>"],
"is_rec": True,
"meta_data": "<string>",
"model": "<string>",
"off_peak": True,
"payload": "<string>",
"priority": 123,
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"voice_id": "<string>",
"watermark": True,
"wm_position": 123,
"wm_url": "<string>"
}
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({
aspect_ratio: '<string>',
audio: true,
bgm: true,
callback_url: '<string>',
duration: 123,
enhance: true,
images: ['<string>'],
is_rec: true,
meta_data: '<string>',
model: '<string>',
off_peak: true,
payload: '<string>',
priority: 123,
prompt: '<string>',
resolution: '<string>',
seed: 123,
voice_id: '<string>',
watermark: true,
wm_position: 123,
wm_url: '<string>'
})
};
fetch('https://api.comfy.org/proxy/vidu/img2video', 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.comfy.org/proxy/vidu/img2video",
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([
'aspect_ratio' => '<string>',
'audio' => true,
'bgm' => true,
'callback_url' => '<string>',
'duration' => 123,
'enhance' => true,
'images' => [
'<string>'
],
'is_rec' => true,
'meta_data' => '<string>',
'model' => '<string>',
'off_peak' => true,
'payload' => '<string>',
'priority' => 123,
'prompt' => '<string>',
'resolution' => '<string>',
'seed' => 123,
'voice_id' => '<string>',
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>'
]),
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://api.comfy.org/proxy/vidu/img2video"
payload := strings.NewReader("{\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\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://api.comfy.org/proxy/vidu/img2video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfy.org/proxy/vidu/img2video")
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 \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"credits": 123,
"state": "created",
"task_id": "<string>",
"aspect_ratio": "<string>",
"bgm": true,
"created_at": "2023-11-07T05:31:56Z",
"duration": 123,
"images": [
"<string>"
],
"model": "<string>",
"movement_amplitude": "auto",
"off_peak": true,
"payload": "<string>",
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"style": "general",
"watermark": true
}{
"details": [
"<string>"
],
"message": "<string>"
}{
"details": [
"<string>"
],
"message": "<string>"
}Post proxyviduimg2video
curl --request POST \
--url https://api.comfy.org/proxy/vidu/img2video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aspect_ratio": "<string>",
"audio": true,
"bgm": true,
"callback_url": "<string>",
"duration": 123,
"enhance": true,
"images": [
"<string>"
],
"is_rec": true,
"meta_data": "<string>",
"model": "<string>",
"off_peak": true,
"payload": "<string>",
"priority": 123,
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"voice_id": "<string>",
"watermark": true,
"wm_position": 123,
"wm_url": "<string>"
}
'import requests
url = "https://api.comfy.org/proxy/vidu/img2video"
payload = {
"aspect_ratio": "<string>",
"audio": True,
"bgm": True,
"callback_url": "<string>",
"duration": 123,
"enhance": True,
"images": ["<string>"],
"is_rec": True,
"meta_data": "<string>",
"model": "<string>",
"off_peak": True,
"payload": "<string>",
"priority": 123,
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"voice_id": "<string>",
"watermark": True,
"wm_position": 123,
"wm_url": "<string>"
}
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({
aspect_ratio: '<string>',
audio: true,
bgm: true,
callback_url: '<string>',
duration: 123,
enhance: true,
images: ['<string>'],
is_rec: true,
meta_data: '<string>',
model: '<string>',
off_peak: true,
payload: '<string>',
priority: 123,
prompt: '<string>',
resolution: '<string>',
seed: 123,
voice_id: '<string>',
watermark: true,
wm_position: 123,
wm_url: '<string>'
})
};
fetch('https://api.comfy.org/proxy/vidu/img2video', 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.comfy.org/proxy/vidu/img2video",
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([
'aspect_ratio' => '<string>',
'audio' => true,
'bgm' => true,
'callback_url' => '<string>',
'duration' => 123,
'enhance' => true,
'images' => [
'<string>'
],
'is_rec' => true,
'meta_data' => '<string>',
'model' => '<string>',
'off_peak' => true,
'payload' => '<string>',
'priority' => 123,
'prompt' => '<string>',
'resolution' => '<string>',
'seed' => 123,
'voice_id' => '<string>',
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>'
]),
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://api.comfy.org/proxy/vidu/img2video"
payload := strings.NewReader("{\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\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://api.comfy.org/proxy/vidu/img2video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfy.org/proxy/vidu/img2video")
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 \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"bgm\": true,\n \"callback_url\": \"<string>\",\n \"duration\": 123,\n \"enhance\": true,\n \"images\": [\n \"<string>\"\n ],\n \"is_rec\": true,\n \"meta_data\": \"<string>\",\n \"model\": \"<string>\",\n \"off_peak\": true,\n \"payload\": \"<string>\",\n \"priority\": 123,\n \"prompt\": \"<string>\",\n \"resolution\": \"<string>\",\n \"seed\": 123,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"credits": 123,
"state": "created",
"task_id": "<string>",
"aspect_ratio": "<string>",
"bgm": true,
"created_at": "2023-11-07T05:31:56Z",
"duration": 123,
"images": [
"<string>"
],
"model": "<string>",
"movement_amplitude": "auto",
"off_peak": true,
"payload": "<string>",
"prompt": "<string>",
"resolution": "<string>",
"seed": 123,
"style": "general",
"watermark": true
}{
"details": [
"<string>"
],
"message": "<string>"
}{
"details": [
"<string>"
],
"message": "<string>"
}Autorizaciones
Bearer token authentication. Normally a Firebase or Cloud JWT. A 'comfyui-' prefixed API key is also accepted in this header: the prefix classifies the value as an API key and it is validated exactly as if it had been sent in X-API-Key. Accepted on the operations served by the comfyFirebase auth middleware (BE-9720, parity with ingest).
Cuerpo
Enable direct audio-video generation capability (default true for q3 model)
Audio type when audio is true: all (sound effects + vocals), speech_only, sound_effect_only. Ineffective for q3 model
all, speech_only, sound_effect_only Add background music to generated video (ineffective for q3 model)
Callback URL for task status updates
Video duration in seconds. viduq3-pro: 1-16, viduq2-pro-fast: 1-10, viduq2-pro/turbo: 1-8
Images for img2video (accepts 1 image as start frame)
Use recommended prompt (consumes additional 10 credits)
Metadata identification, JSON format string for custom metadata
Model name: viduq3-pro, viduq2-pro-fast, viduq2-pro, viduq2-turbo, viduq1, viduq1-classic, vidu2.0
Movement amplitude of objects in frame (ineffective for q2, q3 models)
auto, small, medium, large Off peak mode (lower cost, tasks generated within 48 hours)
Transparent transmission parameters (max 1048576 characters)
Text prompt for video generation (max 2000 characters)
Resolution: 360p, 540p, 720p, 1080p, 2K (availability depends on model and duration)
Random seed (defaults to random if not specified)
general, anime Voice ID for audio (ineffective for q3 model)
Add watermark to video (default false)
Watermark position: 1 (top left), 2 (top right), 3 (bottom right, default), 4 (bottom left)
Watermark image URL (uses default watermark if not provided)
Respuesta
OK
created, processing, queueing, success, failed Whether background music was added
auto, small, medium, large Off peak mode status
Transparent transmission parameters
general, anime Whether watermark was added
¿Esta página le ayudó?