Seedance 자료 에셋 업데이트
curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/{assetId} \
--header 'Content-Type: application/json' \
--data '
{
"asset_name": "Front view approved",
"metadata": {
"approved_by": "creative-team"
}
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/{assetId}"
payload = {
"asset_name": "Front view approved",
"metadata": { "approved_by": "creative-team" }
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({asset_name: 'Front view approved', metadata: {approved_by: 'creative-team'}})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/{assetId}', 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.tokenlab.sh/v1/videos/assets/{assetId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'asset_name' => 'Front view approved',
'metadata' => [
'approved_by' => 'creative-team'
]
]),
CURLOPT_HTTPHEADER => [
"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.tokenlab.sh/v1/videos/assets/{assetId}"
payload := strings.NewReader("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
.header("Content-Type", "application/json")
.body("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {
"approved_by": "creative-team"
},
"created_at": 1782998400000
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "API key not found",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "Image width must be between 300px and 6000px.",
"type": "invalid_request_error",
"code": "seedance_material_source_invalid",
"param": "asset_url"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}비디오 및 자료
머티리얼 에셋 업데이트
현재 조직이 소유한 Seedance 머티리얼 에셋을 업데이트합니다.
PUT
/
v1
/
videos
/
assets
/
{assetId}
Seedance 자료 에셋 업데이트
curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/{assetId} \
--header 'Content-Type: application/json' \
--data '
{
"asset_name": "Front view approved",
"metadata": {
"approved_by": "creative-team"
}
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/{assetId}"
payload = {
"asset_name": "Front view approved",
"metadata": { "approved_by": "creative-team" }
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({asset_name: 'Front view approved', metadata: {approved_by: 'creative-team'}})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/{assetId}', 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.tokenlab.sh/v1/videos/assets/{assetId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'asset_name' => 'Front view approved',
'metadata' => [
'approved_by' => 'creative-team'
]
]),
CURLOPT_HTTPHEADER => [
"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.tokenlab.sh/v1/videos/assets/{assetId}"
payload := strings.NewReader("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
.header("Content-Type", "application/json")
.body("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {
"approved_by": "creative-team"
},
"created_at": 1782998400000
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "API key not found",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "Image width must be between 300px and 6000px.",
"type": "invalid_request_error",
"code": "seedance_material_source_invalid",
"param": "asset_url"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}머티리얼 이름이나 메타데이터를 업데이트합니다. 소스 URL과 에셋 유형은 생성 후에는 고정되므로, 소스 파일이 변경되면 새 에셋을 생성해야 합니다.
project_name은 인증된 조직 내 리소스를 분리합니다. 기본값은 default이며 관련 그룹과 소재에는 대소문자를 구분하는 동일한 값을 사용하세요. POST/PUT은 JSON 본문에, GET/DELETE는 쿼리 매개변수에 지정합니다.
요청 예시
curl https://api.tokenlab.sh/v1/videos/assets/asset-20260720123456-qn7wr \
-X PUT \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset_name":"Front view approved","metadata":{"approved_by":"creative-team"},"project_name":"default"}'
응답 예시
{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"project_name": "default",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {"approved_by": "creative-team"},
"created_at": 1782998400000
}
경로 매개변수
TokenLab 자료 에셋 ID.
본문
application/json
응답
자료 에셋 업데이트됨
TokenLab 자료 에셋 ID입니다. 에셋이 ACTIVE 상태가 된 후 material_asset_id로 사용하십시오.
사용 가능한 옵션:
seedance.material_asset 사용 가능한 옵션:
aigc_avatar, liveness_face 사용 가능한 옵션:
Image, Video, Audio 사용 가능한 옵션:
PROCESSING, ACTIVE, FAILED, DELETED 에셋이 활성 상태이고 삭제되지 않은 경우 true입니다.
이 자료 에셋을 소유한 TokenLab 자료 그룹 ID입니다.
이 자료 에셋에 대한 프로젝트 범위입니다.
공개 가능한 최종 처리 오류입니다. 영구적인 소스 유효성 검사 실패에는 거부된 크기 제약 조건 등이 포함됩니다.
자료 에셋 레코드가 생성된 Unix 타임스탬프입니다.
자료 에셋 레코드가 마지막으로 업데이트된 Unix 타임스탬프입니다.