الانتقال إلى المحتوى الرئيسي
POST
/
video
/
quote
/api/v1/video/quote
curl --request POST \
  --url https://api.venice.ai/api/v1/video/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedance-2-0-text-to-video",
  "duration": "10s",
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "upscale_factor": 2,
  "audio": true,
  "video_url": "data:video/mp4;base64,AAAAFGZ0eXA...",
  "reference_video_total_duration": 5
}
'
import requests

url = "https://api.venice.ai/api/v1/video/quote"

payload = {
"model": "seedance-2-0-text-to-video",
"duration": "10s",
"aspect_ratio": "16:9",
"resolution": "720p",
"upscale_factor": 2,
"audio": True,
"video_url": "data:video/mp4;base64,AAAAFGZ0eXA...",
"reference_video_total_duration": 5
}
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: 'seedance-2-0-text-to-video',
duration: '10s',
aspect_ratio: '16:9',
resolution: '720p',
upscale_factor: 2,
audio: true,
video_url: 'data:video/mp4;base64,AAAAFGZ0eXA...',
reference_video_total_duration: 5
})
};

fetch('https://api.venice.ai/api/v1/video/quote', 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.venice.ai/api/v1/video/quote",
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' => 'seedance-2-0-text-to-video',
'duration' => '10s',
'aspect_ratio' => '16:9',
'resolution' => '720p',
'upscale_factor' => 2,
'audio' => true,
'video_url' => 'data:video/mp4;base64,AAAAFGZ0eXA...',
'reference_video_total_duration' => 5
]),
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.venice.ai/api/v1/video/quote"

payload := strings.NewReader("{\n \"model\": \"seedance-2-0-text-to-video\",\n \"duration\": \"10s\",\n \"aspect_ratio\": \"16:9\",\n \"resolution\": \"720p\",\n \"upscale_factor\": 2,\n \"audio\": true,\n \"video_url\": \"data:video/mp4;base64,AAAAFGZ0eXA...\",\n \"reference_video_total_duration\": 5\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.venice.ai/api/v1/video/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedance-2-0-text-to-video\",\n \"duration\": \"10s\",\n \"aspect_ratio\": \"16:9\",\n \"resolution\": \"720p\",\n \"upscale_factor\": 2,\n \"audio\": true,\n \"video_url\": \"data:video/mp4;base64,AAAAFGZ0eXA...\",\n \"reference_video_total_duration\": 5\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.venice.ai/api/v1/video/quote")

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\": \"seedance-2-0-text-to-video\",\n \"duration\": \"10s\",\n \"aspect_ratio\": \"16:9\",\n \"resolution\": \"720p\",\n \"upscale_factor\": 2,\n \"audio\": true,\n \"video_url\": \"data:video/mp4;base64,AAAAFGZ0eXA...\",\n \"reference_video_total_duration\": 5\n}"

response = http.request(request)
puts response.read_body
{
  "quote": 123
}
{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}
{
"error": "<string>"
}

التفويضات

Authorization
string
header
مطلوب

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

الجسم

application/json

Request body for video price quote. Available fields and valid values vary by model.

model
string
مطلوب

The model to get a price quote for.

مثال:

"seedance-2-0-text-to-video"

duration
enum<string>
مطلوب

The duration of the video. Available options vary by model.

الخيارات المتاحة:
1s,
2s,
3s,
4s,
5s,
6s,
7s,
8s,
9s,
10s,
11s,
12s,
13s,
14s,
15s,
16s,
18s,
20s,
25s,
30s,
1 gen,
Auto
مثال:

"10s"

aspect_ratio
enum<string>

The aspect ratio. Required for some models with megapixel-rate pricing.

الخيارات المتاحة:
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
9:21,
16:9,
21:9
مثال:

"16:9"

resolution
enum<string>

The resolution. Required for models with duration-resolution-rate pricing.

الخيارات المتاحة:
256p,
360p,
480p,
540p,
580p,
720p,
1080p,
1440p,
2160p,
4k,
2x,
4x,
true_1080p
مثال:

"720p"

upscale_factor
enum<integer>

For upscale models only.

الخيارات المتاحة:
1,
2,
4
مثال:

2

audio
boolean
افتراضي:true

For models which support audio generation and configuration. Defaults to true.

مثال:

true

video_url
string

For upscale models, the video to upscale. Required to auto-detect duration for pricing.

مثال:

"data:video/mp4;base64,AAAAFGZ0eXA..."

reference_video_total_duration
number

For R2V models (e.g. Seedance 2.0 R2V), the aggregate duration in seconds of all reference videos to include in the quote (max 45s; per-clip 2–15s, total ≤15s for Seedance). When provided, the quote reflects the BytePlus 'input with video' rate tier and the (input+output)×pixels token formula. When omitted, the quote returns the no-reference baseline.

النطاق المطلوب: x >= 0
مثال:

5

الاستجابة

Video generation price quote

quote
number
مطلوب