video ()
curl --request POST \
--url https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.5-i2v-preview",
"input": {
"image_url": "https://example.com/image.jpg",
"prompt": "让图片中的场景动起来"
}
}
'import requests
url = "https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video"
payload = {
"model": "wan2.5-i2v-preview",
"input": {
"image_url": "https://example.com/image.jpg",
"prompt": "让图片中的场景动起来"
}
}
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: 'wan2.5-i2v-preview',
input: {image_url: 'https://example.com/image.jpg', prompt: '让图片中的场景动起来'}
})
};
fetch('https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video"
payload := strings.NewReader("{\n \"model\": \"wan2.5-i2v-preview\",\n \"input\": {\n \"image_url\": \"https://example.com/image.jpg\",\n \"prompt\": \"让图片中的场景动起来\"\n }\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.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.5-i2v-preview\",\n \"input\": {\n \"image_url\": \"https://example.com/image.jpg\",\n \"prompt\": \"让图片中的场景动起来\"\n }\n}")
.asString();{
"output": {
"task_id": "<string>",
"task_status": "PENDING"
},
"request_id": "<string>",
"usage": {
"duration": 123
}
}Use this endpoint to call the provider-compatible video () operation through MaxAPI.
POST
https://api.maxapi.ai
/
wan
/
api
/
v1
/
services
/
aigc
/
image2video
/
image-to-video
video ()
curl --request POST \
--url https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.5-i2v-preview",
"input": {
"image_url": "https://example.com/image.jpg",
"prompt": "让图片中的场景动起来"
}
}
'import requests
url = "https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video"
payload = {
"model": "wan2.5-i2v-preview",
"input": {
"image_url": "https://example.com/image.jpg",
"prompt": "让图片中的场景动起来"
}
}
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: 'wan2.5-i2v-preview',
input: {image_url: 'https://example.com/image.jpg', prompt: '让图片中的场景动起来'}
})
};
fetch('https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video"
payload := strings.NewReader("{\n \"model\": \"wan2.5-i2v-preview\",\n \"input\": {\n \"image_url\": \"https://example.com/image.jpg\",\n \"prompt\": \"让图片中的场景动起来\"\n }\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.maxapi.ai/wan/api/v1/services/aigc/image2video/image-to-video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.5-i2v-preview\",\n \"input\": {\n \"image_url\": \"https://example.com/image.jpg\",\n \"prompt\": \"让图片中的场景动起来\"\n }\n}")
.asString();{
"output": {
"task_id": "<string>",
"task_status": "PENDING"
},
"request_id": "<string>",
"usage": {
"duration": 123
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
可用选项:
wan2.5-i2v-preview, wan2.2-i2v-flash, wan2.2-i2v-plus, wanx2.1-i2v-turbo, wanx2.1-i2v-plus