Skip to main content
POST
Upload an asset (single-call multipart)

承認

Authorization
string
header
必須

Authorization: Bearer <api-key> — account-scoped API keys on Cloud and serverless. Self-hosted accepts unauthenticated requests by default and can be configured with a static bearer token.

ヘッダー

Idempotency-Key
string

Client-generated UUID (recommended). Single-use: the first request to present a key is processed; any later request with the same key is rejected 422 idempotency_key_reuse (reject-on-duplicate, no response replay). Keys expire after 24h.

ボディ

multipart/form-data
file
file
必須

The raw bytes.

content_type
string
必須
:

"image/png"

file_path
string
必須

Placement path / filename (global-namespace-root form, e.g. photo.png or models/checkpoints/x.safetensors).

:

"photo.png"

expected_hash
string

Optional client-computed blake3 (blake3:<hex>). Verified against the server-computed hash; mismatch is rejected with 409 hash_mismatch and no asset is minted.

:

"blake3:9f8a1c0d..."

tags
string[]

Category tags (e.g. input).

レスポンス

Bytes deduped to an existing blob; asset minted over it.

A user-owned record identified by a server-assigned UUID, backing an immutable blob whose content carries a server-computed blake3 hash. hash may be computed lazily: an asset record (and its retrievable bytes) can exist before its hash is filled in.

id
string
必須
:

"asset_01JZV8Q3M7K2W9X0Y1Z2A3B4C5"

hash
string | null
必須

blake3:<hex>; null while lazily computed.

:

"blake3:9f8a1c0d..."

size_bytes
integer<int64>
必須
:

4816293

content_type
string
必須
:

"image/png"

created_at
string<date-time>
必須
url
string<uri>
必須

Short-lived content URL (signed, or proxy-served).

url_expires_at
string<date-time>
必須
file_path
string | null
:

"photo.png"

created_new
boolean

On create responses: distinguishes a brand-new blob (true) from a dedup hit against bytes the platform already had (false).