curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3-0",
"prompt": "A cat running across a moonlit rooftop, neon city lights in the distance, cinematic",
"resolution": "720p",
"ratio": "16:9",
"duration": 5
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "wan-3-0",
"prompt": "A cat running across a moonlit rooftop, neon city lights in the distance, cinematic",
"resolution": "720p",
"ratio": "16:9",
"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',
prompt: 'A cat running across a moonlit rooftop, neon city lights in the distance, cinematic',
resolution: '720p',
ratio: '16:9',
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',
'prompt' => 'A cat running across a moonlit rooftop, neon city lights in the distance, cinematic',
'resolution' => '720p',
'ratio' => '16:9',
'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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\n \"duration\": 5\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Wan 3.0
Wan 3.0 text-to-video and image-to-video. Provide image_url for a first frame and optionally image_end_url for a last frame; omit both for pure text-to-video.
⚠️ This endpoint rejects reference materials. Wan 3.0’s two input modes are mutually exclusive upstream — mixing first_frame/last_frame with reference images, videos, audio, files or links fails the whole task. Use wan-3-0-refs for reference-driven generation.
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, so an omitted resolution never silently bills at the most expensive tier. Smart duration (-1) is not exposed because the output length — and therefore 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.
curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3-0",
"prompt": "A cat running across a moonlit rooftop, neon city lights in the distance, cinematic",
"resolution": "720p",
"ratio": "16:9",
"duration": 5
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "wan-3-0",
"prompt": "A cat running across a moonlit rooftop, neon city lights in the distance, cinematic",
"resolution": "720p",
"ratio": "16:9",
"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',
prompt: 'A cat running across a moonlit rooftop, neon city lights in the distance, cinematic',
resolution: '720p',
ratio: '16:9',
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',
'prompt' => 'A cat running across a moonlit rooftop, neon city lights in the distance, cinematic',
'resolution' => '720p',
'ratio' => '16:9',
'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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\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\",\n \"prompt\": \"A cat running across a moonlit rooftop, neon city lights in the distance, cinematic\",\n \"resolution\": \"720p\",\n \"ratio\": \"16:9\",\n \"duration\": 5\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Headers
Body
Model name. Must be wan-3-0.
wan-3-0 Text prompt describing the video.
Optional. First-frame image URL. Omit for text-to-video.
Output aspect ratio. adaptive lets the model pick from the input media. Note: unlike Wan 2.7 there is no 21:9. 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.
2 <= x <= 30Output resolution, lowercase like every other video model. quality is accepted as a compatible alias.
480p, 720p, 1080p Optional. Last-frame image URL. Must be used together with image_url.
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"
