curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "角色从墙上活过来,缓缓转头并走向镜头",
"image": "https://example.com/first-frame.png",
"seconds": 5,
"size": "720P",
"aspect_ratio": "9x16"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"prompt": "画面中的人物从微笑慢慢变为大笑,镜头平滑推进",
"mode": "first-last-frame",
"image": "https://example.com/first.png",
"images": [
"https://example.com/last.png"
],
"metadata": {
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png"
},
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "参考人物、道具和场景风格生成一段自然行走的视频",
"images": [
"https://example.com/character.png",
"https://example.com/prop.png",
"https://example.com/scene.png"
],
"mode": "all-reference",
"seconds": 10,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "视频中的人物抱着图片中的物体,在场景图片的房间内弹奏",
"media": [
{
"type": "reference_video",
"url": "https://example.com/role.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/object.png"
},
{
"type": "reference_image",
"url": "https://example.com/scene.png"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 10,
"audio": true
}
}'
import requests
response = requests.post(
"https://www.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9",
},
timeout=60,
)
print(response.json())
const response = await fetch("https://www.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan3.0-video",
prompt: "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
seconds: 5,
size: "1080P",
aspect_ratio: "16x9",
}),
});
console.log(await response.json());
{
"id": "task_xxxx",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"created_at": 1782690295
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request_error"
}
}
{
"error": {
"message": "invalid token",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}
{
"error": {
"message": "insufficient quota",
"type": "invalid_request_error",
"code": "insufficient_quota"
}
}
{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}
Wan 3.0
Wan 3.0 视频生成
使用 POST /v1/videos 调用通义万相 Wan 3.0,支持文生、图生、首尾帧、多图参考和多模态参考。
POST
https://www.geeknow.top
/
v1
/
videos
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "角色从墙上活过来,缓缓转头并走向镜头",
"image": "https://example.com/first-frame.png",
"seconds": 5,
"size": "720P",
"aspect_ratio": "9x16"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"prompt": "画面中的人物从微笑慢慢变为大笑,镜头平滑推进",
"mode": "first-last-frame",
"image": "https://example.com/first.png",
"images": [
"https://example.com/last.png"
],
"metadata": {
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png"
},
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "参考人物、道具和场景风格生成一段自然行走的视频",
"images": [
"https://example.com/character.png",
"https://example.com/prop.png",
"https://example.com/scene.png"
],
"mode": "all-reference",
"seconds": 10,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "视频中的人物抱着图片中的物体,在场景图片的房间内弹奏",
"media": [
{
"type": "reference_video",
"url": "https://example.com/role.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/object.png"
},
{
"type": "reference_image",
"url": "https://example.com/scene.png"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 10,
"audio": true
}
}'
import requests
response = requests.post(
"https://www.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9",
},
timeout=60,
)
print(response.json())
const response = await fetch("https://www.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan3.0-video",
prompt: "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
seconds: 5,
size: "1080P",
aspect_ratio: "16x9",
}),
});
console.log(await response.json());
{
"id": "task_xxxx",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"created_at": 1782690295
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request_error"
}
}
{
"error": {
"message": "invalid token",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}
{
"error": {
"message": "insufficient quota",
"type": "invalid_request_error",
"code": "insufficient_quota"
}
}
{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}
Wan 3.0 视频生成
Wan 3.0 通过POST /v1/videos 提交异步视频任务。请求体使用 application/json,客户端统一访问 https://www.geeknow.top。
方法与路径
POST /v1/videos
认证
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
请求示例
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "角色从墙上活过来,缓缓转头并走向镜头",
"image": "https://example.com/first-frame.png",
"seconds": 5,
"size": "720P",
"aspect_ratio": "9x16"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"prompt": "画面中的人物从微笑慢慢变为大笑,镜头平滑推进",
"mode": "first-last-frame",
"image": "https://example.com/first.png",
"images": [
"https://example.com/last.png"
],
"metadata": {
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png"
},
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "参考人物、道具和场景风格生成一段自然行走的视频",
"images": [
"https://example.com/character.png",
"https://example.com/prop.png",
"https://example.com/scene.png"
],
"mode": "all-reference",
"seconds": 10,
"size": "1080P",
"aspect_ratio": "16x9"
}'
curl -X POST https://www.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "视频中的人物抱着图片中的物体,在场景图片的房间内弹奏",
"media": [
{
"type": "reference_video",
"url": "https://example.com/role.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/object.png"
},
{
"type": "reference_image",
"url": "https://example.com/scene.png"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 10,
"audio": true
}
}'
import requests
response = requests.post(
"https://www.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "wan3.0-video",
"prompt": "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
"seconds": 5,
"size": "1080P",
"aspect_ratio": "16x9",
},
timeout=60,
)
print(response.json())
const response = await fetch("https://www.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan3.0-video",
prompt: "一只小猫在月光下的屋顶上奔跑,电影感镜头,细腻光影",
seconds: 5,
size: "1080P",
aspect_ratio: "16x9",
}),
});
console.log(await response.json());
响应示例
{
"id": "task_xxxx",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"created_at": 1782690295
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request_error"
}
}
{
"error": {
"message": "invalid token",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}
{
"error": {
"message": "insufficient quota",
"type": "invalid_request_error",
"code": "insufficient_quota"
}
}
{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}
Body
扩展参数。常用字段包括
first_frame_url、last_frame_url、reference_image_urls、reference_video_urls、reference_audio_urls 和 parameters.audio。高级原生请求结构。
input.media 存在时会原样透传,媒体类型使用 first_frame、last_frame、reference_image、reference_video 或 reference_audio。参数优先级
时长优先级:- 顶层
seconds - 顶层
duration metadata.parameters.duration- 默认值
5
- 顶层
size metadata.parameters.resolution- 默认值
1080P
- 顶层
aspect_ratio metadata.parameters.ratio
请求构造规则
| 场景 | 关键字段 | 上游媒体类型 |
|---|---|---|
| 文生视频 | model + prompt | 无 media |
| 图生视频 | image | first_frame |
| 首尾帧 | mode: first-last-frame + 首尾帧 metadata | first_frame + last_frame |
| 多图参考 | images(至少 2 张)或 mode: all-reference | 多个 reference_image |
| 参考视频 | metadata.reference_video_urls 或原生 input.media | reference_video |
| 参考音频 | metadata.reference_audio_urls 或原生 input.media | reference_audio |
| 有声视频 | metadata.parameters.audio: true 或原生 parameters.audio | 由模型能力决定 |
首尾帧和参考素材是互斥场景。不要在同一个请求中混合
first_frame / last_frame 与 reference_image / reference_video / reference_audio。需要首尾帧时,显式传 mode 和首尾帧 URL。