비디오 생성 작업 생성
curl --request POST \
--url https://api.gravitex.ai/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"content": [
{}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"ratio": "<string>",
"generate_audio": true,
"watermark": true,
"seed": 123
}
'import requests
url = "https://api.gravitex.ai/v1/video/generations"
payload = {
"model": "<string>",
"content": [{}],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"ratio": "<string>",
"generate_audio": True,
"watermark": True,
"seed": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
content: [{}],
prompt: '<string>',
duration: 123,
resolution: '<string>',
ratio: '<string>',
generate_audio: true,
watermark: true,
seed: 123
})
};
fetch('https://api.gravitex.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gravitex.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'content' => [
[
]
],
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'ratio' => '<string>',
'generate_audio' => true,
'watermark' => true,
'seed' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gravitex.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.gravitex.ai/v1/video/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}"
response = http.request(request)
puts response.read_bodySeedance 2.0(/generations)
비디오 생성 작업 생성
Seedance 2.0 POST /v1/video/generations
POST
/
v1
/
video
/
generations
비디오 생성 작업 생성
curl --request POST \
--url https://api.gravitex.ai/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"content": [
{}
],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"ratio": "<string>",
"generate_audio": true,
"watermark": true,
"seed": 123
}
'import requests
url = "https://api.gravitex.ai/v1/video/generations"
payload = {
"model": "<string>",
"content": [{}],
"prompt": "<string>",
"duration": 123,
"resolution": "<string>",
"ratio": "<string>",
"generate_audio": True,
"watermark": True,
"seed": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
content: [{}],
prompt: '<string>',
duration: 123,
resolution: '<string>',
ratio: '<string>',
generate_audio: true,
watermark: true,
seed: 123
})
};
fetch('https://api.gravitex.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gravitex.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'content' => [
[
]
],
'prompt' => '<string>',
'duration' => 123,
'resolution' => '<string>',
'ratio' => '<string>',
'generate_audio' => true,
'watermark' => true,
'seed' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gravitex.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.gravitex.ai/v1/video/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"content\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"resolution\": \"<string>\",\n \"ratio\": \"<string>\",\n \"generate_audio\": true,\n \"watermark\": true,\n \"seed\": 123\n}"
response = http.request(request)
puts response.read_body소개
Seedance 2.0 비동기 비디오 생성 작업을 제출합니다. 폴링용task_id를 반환합니다. content와 prompt 중 최소 하나를 제공해야 하며, content 사용을 권장합니다.
인증
string
필수
Bearer Token, 예:
Bearer sk-xxxxxxxxxxstring
application/json요청 본문
string
필수
seedance-2-0 또는 seedance-2-0-fastarray
멀티모달 배열(아래 참조);
content와 prompt 중 최소 하나 필수string
텍스트 프롬프트;
content의 간소화 대안integer
기본값:"5"
-1(자동) 또는 4~15초string
기본값:"720p"
480p, 720p; 표준 버전은 1080p도 지원(fast: 1080p 미지원)string
기본값:"16:9"
16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive(첫 프레임 이미지에 권장; 참조 이미지/비디오 모드에서는 사용 불가)boolean
기본값:"true"
오디오 자동 생성;
reference_audio 사용 시 false로 설정boolean
기본값:"false"
워터마크 추가 여부
integer
기본값:"-1"
랜덤 시드;
-1은 랜덤; 고정 양의 정수로 재현 가능content 배열
| type | role | 설명 | 제한 |
|---|---|---|---|
text | — | 텍스트 프롬프트 | 1개 |
image_url | (생략) | 기본값은 첫 프레임 | 1개 |
image_url | first_frame | 첫 프레임 | 1개 |
image_url | last_frame | 마지막 프레임(first_frame 필요) | 1개 |
image_url | reference_image | 참조 이미지 | 최대 9개 |
video_url | reference_video | 참조 비디오 | 최대 3개 |
audio_url | reference_audio | 참조 오디오(이미지/비디오 필요) | 최대 3개 |
first_frame과 reference_image는 상호 배타적; last_frame은 first_frame이 필요합니다.
asset://는 asset_type과 일치해야 합니다: Image → image_url; Video → video_url; Audio → audio_url. 오디오를 image_url에 넣으면 InvalidParameter가 반환됩니다.자산 asset_type | type | 필드 | role |
|---|---|---|---|
Image | image_url | image_url.url | reference_image / first_frame / last_frame |
Video | video_url | video_url.url | reference_video |
Audio | audio_url | audio_url.url | reference_audio |
content에 직접 URL 전달 시 제한
content에 http(s) URL을 직접 전달할 때(asset:// 아님) 리소스는 아래 제한을 충족해야 합니다. asset:// 참조도 동일한 수치 제한을 공유합니다. 자산 라이브러리 이미지는 더 많은 형식을 허용합니다—자산 생성 참조.
| 유형 | 주요 제한 |
|---|---|
| 이미지 | JPEG / PNG / WebP, ≤ 30MB, 300~6000px; reference_image 최대 9개; 첫/마지막 프레임 각 1개 |
| 비디오 | MP4 / MOV, ≤ 50MB, 클립당 2~15초, reference_video 최대 3개, 총 ≤ 15초 |
| 오디오 | WAV / MP3, ≤ 15MB, 클립당 2~15초, 최대 3개; 이미지 또는 비디오 입력 필요 |
예제
텍스트-투-비디오:curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{"type": "text", "text": "Golden hour drone shot over mountains and clouds"}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true
}'
prompt(텍스트-투-비디오):
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"prompt": "Golden hour drone shot over mountains",
"duration": 5,
"resolution": "720p",
"ratio": "16:9"
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{"type": "text", "text": "Camera slowly pushes in, petals falling"},
{"type": "image_url", "image_url": {"url": "https://example.com/garden.jpg"}}
],
"ratio": "adaptive"
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{"type": "text", "text": "Time-lapse from sunrise to sunset"},
{"type": "image_url", "image_url": {"url": "https://example.com/sunrise.jpg"}, "role": "first_frame"},
{"type": "image_url", "image_url": {"url": "https://example.com/sunset.jpg"}, "role": "last_frame"}
],
"duration": 10,
"ratio": "adaptive"
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{"type": "text", "text": "Asset 1 sings with asset 2"},
{"type": "image_url", "image_url": {"url": "asset://asset-xxx-image"}, "role": "reference_image"},
{"type": "audio_url", "audio_url": {"url": "asset://asset-xxx-audio"}, "role": "reference_audio"}
],
"duration": 5,
"generate_audio": false
}'
active 상태의 자산만 사용할 수 있습니다. 참조된 모든 자산은 동일한 자산 그룹에 속해야 합니다.
응답
{
"id": "ut-abc123def456",
"task_id": "ut-abc123def456",
"object": "video",
"model": "seedance-2-0",
"status": "queued",
"progress": 0,
"created_at": 1712563200
}
⌘I
