メインコンテンツへスキップ
POST
Initiate background download for large files

承認

X-API-Key
string
header
必須

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

ボディ

application/json
source_url
string<uri>
必須

URL of the file to download (must be from huggingface.co or civitai.com)

:

"https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors"

tags
string[]

Optional tags for the asset (e.g., ["model", "checkpoint"])

user_metadata
object

Optional user-defined metadata to attach to the asset

preview_id
string<uuid>

Optional preview asset ID to associate with the downloaded asset

:

"550e8400-e29b-41d4-a716-446655440000"

レスポンス

File already exists in storage - asset created/returned immediately

id
string<uuid>
必須

Unique identifier for the asset

name
string
必須

Name of the asset file

size
integer<int64>
必須

Size of the asset in bytes

created_at
string<date-time>
必須

Timestamp when the asset was created

updated_at
string<date-time>
必須

Timestamp when the asset was last updated

created_new
boolean
必須

Whether this was a new asset creation (true) or returned existing (false)

asset_hash
string

Blake3 hash of the asset content

Pattern: ^blake3:[a-f0-9]{64}$
mime_type
string

MIME type of the asset

tags
string[]

Tags associated with the asset

user_metadata
object

Custom user metadata for the asset

preview_url
string<uri>

URL for asset preview/thumbnail

preview_id
string<uuid> | null

ID of the preview asset if available

prompt_id
string<uuid> | null

ID of the job/prompt that created this asset, if available

last_access_time
string<date-time>

Timestamp when the asset was last accessed

is_immutable
boolean

Whether this asset is immutable (cannot be modified or deleted)