v1

latestOpenAPI 3.0.22026-07-2610288167.4 KB
asset

Create asset reference from existing hash

Creates a new asset reference using an existing hash from cloud storage. This avoids re-uploading file content when the underlying data already exists, which is useful for large files or when referencing well-known assets. The user provides their own metadata and tags for the new reference.

post/api/assets/from-hash

Request body

hashstring required

Hash of the existing asset. Supports Blake3 (blake3:) or SHA256 (sha256:) formats

namestring

Display name for the asset reference (optional)

tagsstring[] required

Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order.

mime_typestring

MIME type of the asset (e.g., "image/png", "video/mp4")

user_metadataobject

Custom metadata for this asset reference

Response

Asset reference already exists (returned existing)

idstring uuid required

Unique identifier for the asset

namestring required

Name of the asset file

asset_hashstring

Blake3 hash of the asset content

sizeinteger required

Size of the asset in bytes

mime_typestring

MIME type of the asset

tagsstring[]

Tags associated with the asset

user_metadataobject

Custom user metadata for the asset

preview_urlstring uri

URL for asset preview/thumbnail

preview_idstring uuid nullable

ID of the preview asset if available

prompt_idstring uuid nullable

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

created_atstring date-time required

Timestamp when the asset was created

updated_atstring date-time required

Timestamp when the asset was last updated

last_access_timestring date-time

Timestamp when the asset was last accessed

is_immutableboolean

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

created_newboolean required

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