跳转到主要内容
PUT
/
api
/
assets
/
{id}
Update asset metadata
curl --request PUT \
  --url https://cloud.comfy.org/api/assets/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "tags": [
    "<string>"
  ],
  "mime_type": "<string>",
  "preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_metadata": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "asset_hash": "<string>",
  "tags": [
    "<string>"
  ],
  "mime_type": "<string>",
  "user_metadata": {}
}

授权

X-API-Key
string
header
必填

API key authentication. Generate an API key from your account settings at https://comfy.org/account. Pass the key in the X-API-Key header.

路径参数

id
string<uuid>
必填

Asset ID

请求体

application/json
name
string

New display name for the asset

tags
string[]

Updated tags for the asset

mime_type
string

Updated MIME type of the asset

preview_id
string<uuid>

Updated preview asset ID

user_metadata
object

Updated custom metadata

响应

Asset updated successfully

id
string<uuid>
必填

Asset ID

updated_at
string<date-time>
必填

Timestamp of the update

name
string

Updated name of the asset

asset_hash
string

Blake3 hash of the asset content

tags
string[]

Updated tags for the asset

mime_type
string

Updated MIME type of the asset

user_metadata
object

Updated custom metadata