Upload a new asset
Uploads a new asset (binary content plus metadata) and registers it in the asset database.
Request body
[cloud-only] URL of the file to import as an asset
Display name for the asset
Comma-separated tags
JSON-encoded user metadata
Blake3 hash of the file content (e.g. blake3:abc123...)
MIME type of the file (overrides auto-detected type)
ID of an existing asset to use as the preview image
[cloud-only] Client-supplied asset ID for idempotent creation. If an asset with this ID already exists, the existing asset is returned.
Response
Asset already exists (returned existing asset)
Unique identifier for the asset
Name of the asset file
Blake3 content hash of the asset (preferred over asset_hash)
Deprecated: use hash instead. Blake3 hash of the asset content.
Size of the asset in bytes
MIME type of the asset
Tags associated with the asset
Custom user metadata
System-managed metadata (read-only)
URL for asset preview/thumbnail
ID of the preview asset if available
Deprecated: use job_id instead. ID of the prompt that created this asset.
ID of the job that created this asset
Whether this asset is immutable
Whether this was a new creation (true) or returned existing (false)