模版成片
curl --request POST \
--url https://api.maxapi.ai/ent/v2/template-story \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "viduq2-pro",
"template_id": "story_template_001",
"story_content": "故事内容描述"
}
'import requests
url = "https://api.maxapi.ai/ent/v2/template-story"
payload = {
"model": "viduq2-pro",
"template_id": "story_template_001",
"story_content": "故事内容描述"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'viduq2-pro',
template_id: 'story_template_001',
story_content: '故事内容描述'
})
};
fetch('https://api.maxapi.ai/ent/v2/template-story', 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/ent/v2/template-story"
payload := strings.NewReader("{\n \"model\": \"viduq2-pro\",\n \"template_id\": \"story_template_001\",\n \"story_content\": \"故事内容描述\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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/ent/v2/template-story")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"viduq2-pro\",\n \"template_id\": \"story_template_001\",\n \"story_content\": \"故事内容描述\"\n}")
.asString();{
"task_id": "<string>",
"state": "pending",
"model": "<string>",
"prompt": "<string>",
"images": [
"<string>"
],
"duration": 123,
"seed": 123,
"resolution": "<string>",
"bgm": true,
"movement_amplitude": "<string>",
"payload": "<string>",
"off_peak": true,
"credits": 123,
"watermark": true,
"created_at": "2023-11-07T05:31:56Z"
}使用模版生成完整视频
POST
https://api.maxapi.ai
/
ent
/
v2
/
template-story
模版成片
curl --request POST \
--url https://api.maxapi.ai/ent/v2/template-story \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "viduq2-pro",
"template_id": "story_template_001",
"story_content": "故事内容描述"
}
'import requests
url = "https://api.maxapi.ai/ent/v2/template-story"
payload = {
"model": "viduq2-pro",
"template_id": "story_template_001",
"story_content": "故事内容描述"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'viduq2-pro',
template_id: 'story_template_001',
story_content: '故事内容描述'
})
};
fetch('https://api.maxapi.ai/ent/v2/template-story', 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/ent/v2/template-story"
payload := strings.NewReader("{\n \"model\": \"viduq2-pro\",\n \"template_id\": \"story_template_001\",\n \"story_content\": \"故事内容描述\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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/ent/v2/template-story")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"viduq2-pro\",\n \"template_id\": \"story_template_001\",\n \"story_content\": \"故事内容描述\"\n}")
.asString();{
"task_id": "<string>",
"state": "pending",
"model": "<string>",
"prompt": "<string>",
"images": [
"<string>"
],
"duration": 123,
"seed": 123,
"resolution": "<string>",
"bgm": true,
"movement_amplitude": "<string>",
"payload": "<string>",
"off_peak": true,
"credits": 123,
"watermark": true,
"created_at": "2023-11-07T05:31:56Z"
}授权
使用 Token 认证,格式: Token YOUR_API_KEY
请求体
application/json
响应
200 - application/json
任务创建成功
任务ID
任务状态
可用选项:
pending, queued, processing, success, failed 使用的模型
提示词
输入图片URL列表
视频时长(秒)
随机种子
分辨率
是否添加背景音乐
运动幅度
用户自定义数据
是否错峰
消耗积分
是否有水印
创建时间