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
Model ID or Endpoint ID.
Content passed to the model to generate video, keeping the Volcengine Ark video generation format.
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
Whether to return the last frame image.
Resolution.
Aspect ratio.
Duration in seconds.
Random seed.
Whether to include a watermark.
Whether to generate audio synchronized with the visuals. Supported by the Seedance 2.0 series.
Task timeout threshold in seconds. Value range: [3600, 259200].
3600 <= x <= 259200Task execution priority from 0 to 9. A larger value means higher priority. Supported by the Seedance 2.0 series.
0 <= x <= 9Unique end-user identifier passed through to Ark for compliance checks.
Consumption source.
ai_video, ai_draft_generation, plugin Response
Native Volcengine-format response, not wrapped in the AiToEarn common response envelope.
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"
}
