影片
更新資產
更新資產名稱或將其移至另一個群組。
此頁面記錄了 Modelflare 資產管理路線。通話需要有效的智慧 API 金鑰或媒體群組 API 金鑰、可用的媒體頻道以及所需的權限。
POST https://modelflare.dev/volc/asset/UpdateAsset
使用 Modelflare API 金鑰:
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"發送帶有建立、更新和刪除請求的 Idempotency-Key。對同一用戶重試相同的金鑰會重播已儲存的回應,而不會重複突變。
更新資產名稱或將其移至另一個群組。
| 場 | 類型 | 必填 | 說明 | 範例 |
|---|---|---|---|---|
Id |
string |
是 | 資產 ID。 | asset-20260528140922-d9646 |
Name |
string |
否 | 新資產名稱。 | updated-character-reference |
GroupId |
string |
否 | 目標群組 ID。 | group-20260320141746-zsf6b |
model |
string |
否 | 計費模型。預設為 volc-asset。 |
volc-asset |
JSON 範例:
{ "model": "volc-asset", "Id": "asset-20260528140922-d9646", "Name": "updated-character-reference", "GroupId": "group-20260320141746-zsf6b"}cURL 範例:
curl --request POST https://modelflare.dev/volc/asset/UpdateAsset \ --header "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "volc-asset", "Id": "asset-20260528140922-d9646", "Name": "updated-character-reference", "GroupId": "group-20260320141746-zsf6b"}'請求成功。
| 場 | 類型 | 必填 | 說明 | 範例 |
|---|---|---|---|---|
Id |
string |
是 | 資產 ID。 | asset-20260528140922-d9646 |
Name |
string |
否 | 更新了資產名稱。 | updated-character-reference |
GroupId |
string |
否 | 資產組 ID。 | group-20260320141746-zsf6b |
UpdateTime |
string |
否 | 更新時間戳記。 | 2026-05-28T06:09:31Z |
回應範例:
{ "Id": "asset-20260528140922-d9646", "Name": "updated-character-reference", "GroupId": "group-20260320141746-zsf6b", "UpdateTime": "2026-05-28T06:09:31Z"}| 狀態 | 意義 |
|---|---|
400 |
請求無效。 |
401 |
API 金鑰遺失或未經授權。 |
錯誤主體範例(返回時):
{ "error": { "code": "invalid_request", "message": "Request validation failed." }}影像、視訊和音訊創建是非同步的。收到資產ID後,僅當狀態為Active時,呼叫GetAsset並使用asset://<ID>引用。