Skip to main content
An asset is a file of your Argil library: an image, a video or an audio file. You create assets by importing a URL or uploading a file, and every generation output is an asset too. Wherever the API takes a file, it takes an asset id.

Create an asset

POST /v2/assets creates one, whatever the way you send the file: For a larger file, the asset comes back pending_upload with upload: a signed URL, valid 10 minutes, and the headers the PUT must carry.
Argil picks the bytes up and processes the asset: there is no other call to make. A file is at most MB for an image, GB for a video and MB for an audio, however it is sent. A file sent in the request or a URL over the limit is refused at once; an upload over it ends failed, and its bytes are deleted. Creating an asset for a URL, or for a file sent in the request, that your workspace already has returns that asset.

Lifecycle

A generation that references a processing asset waits for it. One that references a pending_upload asset is refused with 409 asset_not_uploaded: finish the upload first.

URLs

Argil only imports public https:// URLs: hosts that resolve to a private network, local addresses and redirects to them are refused. The type comes from the URL’s extension, or from the server’s Content-Type when there is none. A URL passed directly to a generation is imported the same way, once per workspace.

Outputs and downloads

Generation outputs are assets of your library, with source: "generation"; the generation lists them in its outputs. Assets are kept until you delete them, and their url does not expire (expires_at is null): download the file from it. DELETE /v2/assets/{id} removes the asset from your library. Generations that used or produced it keep it in their history.

Listing

GET /v2/assets lists your workspace’s assets, newest first; filter with type=image|video|audio. Argil’s public elements carry their images in their plates; they are not assets of your library.