curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3-0-refs",
"prompt": "图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近",
"ref_imgs": [
"https://your-cdn.com/character.jpg",
"https://your-cdn.com/chair.png"
],
"resolution": "720p",
"duration": 5
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "wan-3-0-refs",
"prompt": "图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近",
"ref_imgs": ["https://your-cdn.com/character.jpg", "https://your-cdn.com/chair.png"],
"resolution": "720p",
"duration": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-3-0-refs',
prompt: '图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近',
ref_imgs: ['https://your-cdn.com/character.jpg', 'https://your-cdn.com/chair.png'],
resolution: '720p',
duration: 5
})
};
fetch('https://api.goenhance.ai/api/v1/videos/generations', 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.goenhance.ai/api/v1/videos/generations",
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' => 'wan-3-0-refs',
'prompt' => '图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近',
'ref_imgs' => [
'https://your-cdn.com/character.jpg',
'https://your-cdn.com/chair.png'
],
'resolution' => '720p',
'duration' => 5
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/videos/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}"
response = http.request(request)
puts response.read_bodyWan 3.0 (Reference)
Wan 3.0 driven by reference materials — images, videos, audio, a document or a web page. Refer to them inside the prompt as 图1 / 视频1 / 音频1 (image 1, video 1, audio 1); the array order is what those numbers refer to.
⚠️ This endpoint rejects first/last frames. The two input modes are mutually exclusive upstream — use wan-3-0 for text-to-video or first/last frame generation.
At least one of ref_imgs / ref_videos / ref_audios / ref_file / ref_link is required. ref_file and ref_link are mutually exclusive.
Pricing — per second of generated video, in tokens (USD at $0.02/token). Both wan-3-0 endpoints cost the same:
| resolution | tokens/s | USD/s |
|---|---|---|
| 480p | 2.91 | $0.0582 |
| 720p | 5.82 | $0.1164 |
| 1080p | 11.64 | $0.2328 |
The published per-second rate times the duration is exactly what gets charged. Example: a 5s 720p video costs 29.1 tokens (= $0.582).
Notes on defaults: resolution defaults to 720p rather than the upstream default of 1080p. Smart duration (-1) is not exposed because the price is only known after generation.
Returns an img_uuid; poll GET /api/v1/jobs/detail (or use custom_callback_url) to get the generated video.
⚠️ ref_videos total length plus duration must not exceed 30 seconds. This is a joint limit enforced upstream, so both values can be individually valid and the request still fails — e.g. a 15s reference video with duration: 18 is rejected as 33s. GoEnhance cannot check this before submitting (it does not measure your reference videos), so the task fails after it starts and the tokens are refunded.
curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3-0-refs",
"prompt": "图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近",
"ref_imgs": [
"https://your-cdn.com/character.jpg",
"https://your-cdn.com/chair.png"
],
"resolution": "720p",
"duration": 5
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "wan-3-0-refs",
"prompt": "图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近",
"ref_imgs": ["https://your-cdn.com/character.jpg", "https://your-cdn.com/chair.png"],
"resolution": "720p",
"duration": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-3-0-refs',
prompt: '图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近',
ref_imgs: ['https://your-cdn.com/character.jpg', 'https://your-cdn.com/chair.png'],
resolution: '720p',
duration: 5
})
};
fetch('https://api.goenhance.ai/api/v1/videos/generations', 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.goenhance.ai/api/v1/videos/generations",
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' => 'wan-3-0-refs',
'prompt' => '图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近',
'ref_imgs' => [
'https://your-cdn.com/character.jpg',
'https://your-cdn.com/chair.png'
],
'resolution' => '720p',
'duration' => 5
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/videos/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan-3-0-refs\",\n \"prompt\": \"图1 里的角色坐在图2 的椅子上弹吉他,镜头缓缓推近\",\n \"ref_imgs\": [\n \"https://your-cdn.com/character.jpg\",\n \"https://your-cdn.com/chair.png\"\n ],\n \"resolution\": \"720p\",\n \"duration\": 5\n}"
response = http.request(request)
puts response.read_bodyHeaders
Body
Model name. Must be wan-3-0-refs.
wan-3-0-refs Text prompt. You can reference each image as [Image 1], [Image 2], etc.
Output aspect ratio. aspect_ratio is accepted as a compatible alias.
adaptive, 16:9, 4:3, 1:1, 3:4, 9:16 Video duration in seconds. Any integer from 2 to 30. Plus the total length of ref_videos, this must not exceed 30 seconds.
2 <= x <= 30Output resolution, lowercase like every other video model. quality is accepted as a compatible alias.
480p, 720p, 1080p Reference image URLs, up to 10. Referred to as 图1, 图2, … in array order.
10Reference video URLs, up to 5 and 15 seconds in total. Referred to as 视频1, 视频2, … in array order. Their total length plus duration must not exceed 30 seconds.
5Reference audio URLs, up to 5 and 15 seconds in total. Referred to as 音频1, 音频2, … in array order.
5Optional. A single document URL (docx/pptx/pdf/txt/…). Mutually exclusive with ref_link.
Optional. A single public web page URL. Mutually exclusive with ref_file.
Whether the output contains an audio track. Enabling it costs no extra.
Optional. Fixing the seed makes results more reproducible.
0 <= x <= 2147483647Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.
"https://your-server.com/goenhance/callback"
