Create Volcengine-format video generation task
Interface description: Volcengine Ark video generation compatible endpoint for customers who have already integrated the Volcengine video generation API and want to migrate to AiToEarn without significantly changing their request structure. See the official Volcengine documentation: Create video generation task.
curl --request POST \
--url https://aitoearn.cn/api/ai/v3/contents/generations/tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
'import requests
url = "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
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: 'doubao-seedance-2-0-260128',
content: [
{
type: 'text',
text: 'Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.'
}
]
})
};
fetch('https://aitoearn.cn/api/ai/v3/contents/generations/tasks', 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://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0-260128\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.\"\n }\n ]\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))
}{
"id": "6a461da66fe8a12d33daabdd"
}Authorizations
Pass the API Key obtained from AiToEarn. Go to the "API Key Tutorial". Example: Bearer xxx.
Body
Content passed to the model to generate video, keeping the Volcengine Ark video generation format.
Note: To use a real-person asset or a virtual portrait asset, pass asset://<asset ID> to generate a video. If generating a video with a real-person asset fails, use Create virtual portrait group.
Seedance 2.0 models support the following input combinations:
- Text
- Text + image
- Text + video
- Text + image + audio
- Text + image + video
- Text + video + audio
- Text + image + video + audio
curl --request POST \
--url https://aitoearn.cn/api/ai/v3/contents/generations/tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
'import requests
url = "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
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: 'doubao-seedance-2-0-260128',
content: [
{
type: 'text',
text: 'Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.'
}
]
})
};
fetch('https://aitoearn.cn/api/ai/v3/contents/generations/tasks', 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://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0-260128\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.\"\n }\n ]\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))
}{
"id": "6a461da66fe8a12d33daabdd"
}
