자산 생성
curl --request POST \
--url https://api.gravitex.ai/v1/assets \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"group_id": "<string>",
"asset_type": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.gravitex.ai/v1/assets"
payload = {
"url": "<string>",
"group_id": "<string>",
"asset_type": "<string>",
"name": "<string>"
}
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({
url: '<string>',
group_id: '<string>',
asset_type: '<string>',
name: '<string>'
})
};
fetch('https://api.gravitex.ai/v1/assets', 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/assets",
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([
'url' => '<string>',
'group_id' => '<string>',
'asset_type' => '<string>',
'name' => '<string>'
]),
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/assets"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\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/assets")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/assets")
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 \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySeedance 2.0(/generations)
자산 생성
POST /v1/assets
POST
/
v1
/
assets
자산 생성
curl --request POST \
--url https://api.gravitex.ai/v1/assets \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"group_id": "<string>",
"asset_type": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.gravitex.ai/v1/assets"
payload = {
"url": "<string>",
"group_id": "<string>",
"asset_type": "<string>",
"name": "<string>"
}
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({
url: '<string>',
group_id: '<string>',
asset_type: '<string>',
name: '<string>'
})
};
fetch('https://api.gravitex.ai/v1/assets', 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/assets",
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([
'url' => '<string>',
'group_id' => '<string>',
'asset_type' => '<string>',
'name' => '<string>'
]),
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/assets"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\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/assets")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gravitex.ai/v1/assets")
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 \"url\": \"<string>\",\n \"group_id\": \"<string>\",\n \"asset_type\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body소개
그룹 내에 자산을 생성합니다.Content-Type: application/json; 공개 https URL만 지원(BytePlus가 직접 가져올 수 있어야 함). Base64 / Data URI / multipart 업로드는 지원하지 않습니다. 로컬 파일은 먼저 OSS / TOS / S3 등에 업로드하세요.
aigc와 liveness_face 라이브러리 모두 Image / Video / Audio를 지원합니다. 초기 status는 pending이며, asset:// 사용 전 active가 될 때까지 폴링하세요(보통 1~3분).
BytePlus
CreateAsset은 2026년부터 Base64를 더 이상 지원하지 않습니다. Create an Asset 참조.인증
string
필수
Bearer Token, 예:
Bearer sk-xxxxxxxxxx요청 본문
string
필수
공개 https URL; 게이트웨이가 업스트림에 그대로 전달
string
필수
자산 그룹 생성 또는 자산 그룹 생성(실인물)에서 받은 그룹 ID
string
기본값:"Image"
Image / Video / Audio(대소문자 구분 없음)string
표시 이름(≤ 64자; UI/검색 전용, 추론에 사용되지 않음)
형식 및 크기 제한
이미지 (Image)
| 항목 | 제한 |
|---|---|
| 형식 | jpeg / png / webp / bmp / tiff / gif / heic / heif |
| 크기 | < 30 MB |
| 종횡비 | 0.4 ~ 2.5 |
| 해상도 | 300 ~ 6000 px |
비디오 (Video)
| 항목 | 제한 |
|---|---|
| 형식 | mp4 / mov |
| 크기 | ≤ 50 MB |
| 해상도 | 480p, 720p(1080p+ 미지원) |
| 길이 | 2 ~ 15초 |
| FPS | 24 ~ 60 |
| 종횡비 | 0.4 ~ 2.5 |
| 해상도 | 300 ~ 6000 px |
| 총 픽셀(W×H) | 409600 ~ 927408 |
오디오 (Audio)
| 항목 | 제한 |
|---|---|
| 형식 | mp3 / wav |
| 크기 | ≤ 15 MB |
| 길이 | 2 ~ 15초 |
게이트웨이는 URL 접미사만 검사합니다. 크기/길이 등은 BytePlus가 비동기로 검증합니다. 유효하지 않은 자산은 status: failed로 종료됩니다.
예제
이미지, 비디오, 오디오 모두 동일한 JSON 구조—asset_type과 URL만 다릅니다:
# 이미지
curl -X POST "https://api.gravitex.ai/v1/assets" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-cdn.com/portrait.jpg","group_id":"group-xxx","asset_type":"Image","name":"portrait.jpg"}'
# 비디오
curl -X POST "https://api.gravitex.ai/v1/assets" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-cdn.com/dance.mp4","group_id":"group-xxx","asset_type":"Video","name":"dance.mp4"}'
# 오디오
curl -X POST "https://api.gravitex.ai/v1/assets" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-cdn.com/voice.mp3","group_id":"group-xxx","asset_type":"Audio","name":"voice.mp3"}'
응답
{
"virtual_id": "asset-20260508120145-pqwhc",
"asset_url": "asset://asset-20260508120145-pqwhc",
"group_id": "group-20260508120000-abcde",
"asset_type": "Image",
"status": "pending"
}
| 필드 | 설명 |
|---|---|
asset_url | 비디오 content에서 참조(asset_type에 따라 매핑) |
status | pending → active / failed |
⌘I
