Skip to main content
POST
Complete an upload

Authorizations

Authorization
string
header
required

A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.

Headers

Idempotency-Key
string

Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]+$

Path Parameters

id
string
required

The upload's ID, as create returned it

Response

The ready upload.

id
string
required

The upload's ID, which completes it

projectId
string
required
status
enum<string>
required

upload_required: PUT the bytes, then complete; ready: the asset can be used

Available options:
upload_required,
ready
assetId
string | null
required

Once ready, the Library asset to send as a generation input; an identical file already in the project is reused

upload
object | null
required

Where to PUT the file's exact bytes, with these headers, before expiresAt

folder
object

Whether the asset was added to the folder named at create