import requests
url = "https://api.scenext.cn/api/gen_video"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://api.scenext.cn/api/gen_video";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
const data = {
question: "What is Fourier series",
answer: "",
questionImages: [],
answerImages: [],
quality: "m",
notify_url: "https://your-domain.com/webhook"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST https://api.scenext.cn/api/gen_video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}'
{
"status": "success",
"data": {
"task_id": "12345"
}
}
{
"status": "error",
"data": {
"messages": "The video generation interface response is abnormal: 400 - Bad Request"
}
}
API Reference
Generate Video
Create a video generation task
POST
/
api
/
gen_video
import requests
url = "https://api.scenext.cn/api/gen_video"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://api.scenext.cn/api/gen_video";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
const data = {
question: "What is Fourier series",
answer: "",
questionImages: [],
answerImages: [],
quality: "m",
notify_url: "https://your-domain.com/webhook"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST https://api.scenext.cn/api/gen_video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}'
{
"status": "success",
"data": {
"task_id": "12345"
}
}
{
"status": "error",
"data": {
"messages": "The video generation interface response is abnormal: 400 - Bad Request"
}
}
Generate Video
This API is used to create video generation tasks.Request
Request Headers
string
required
API key authentication, format:
Bearer YOUR_API_KEYstring
required
Request content type, must be:
application/jsonRequest Parameters
question and questionImages must include at least one.string
required
Question content (text format)
array
Question content (image format), input image URLs or base64
string
Reference answer (text format): ensures accurate explanatory content generation
array
Reference answer (image format), input image URLs or base64
string
default:"m"
Video quality level:
h: High qualitym: Medium quality (default)l: Low quality
string
Callback URL when the task is completed (optional), complete URL including http
Response
string
Request status:
success or errorobject
Examples
import requests
url = "https://api.scenext.cn/api/gen_video"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://api.scenext.cn/api/gen_video";
const headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
const data = {
question: "What is Fourier series",
answer: "",
questionImages: [],
answerImages: [],
quality: "m",
notify_url: "https://your-domain.com/webhook"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST https://api.scenext.cn/api/gen_video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is Fourier series",
"answer": "",
"questionImages": [],
"answerImages": [],
"quality": "m",
"notify_url": "https://your-domain.com/webhook"
}'
{
"status": "success",
"data": {
"task_id": "12345"
}
}
{
"status": "error",
"data": {
"messages": "The video generation interface response is abnormal: 400 - Bad Request"
}
}
Notes
- Video generation is an asynchronous process that may take from a few minutes to several tens of minutes
- Please use the returned
task_idto query task status - If
notify_urlis provided, a callback notification will be sent when the task is completed