For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assets

Upload images, video, audio and PDFs to FLORA with the API, by URL, direct bytes or a signed upload, then retrieve, retry and attach them to projects.

Assets are media files stored in FLORA: images, video, audio and PDFs you can pass to Technique and generation inputs or place on a project's canvas. You create one in one of three ways, depending on where the file is:

The file is
Use
Size limit

At a public https:// URL

Server-side fetch: source is the URL

50 MB

Local, 4 MB or smaller

Direct bytes: multipart/form-data with a file part

4 MB

Local, larger than 4 MB

Signed upload: reserve, upload the bytes, complete

See below

The TypeScript SDK's client.assets.upload() picks the right path for you. See Upload an asset for a full walkthrough.

Allowed types: images (image/jpeg, png, webp, gif, avif, heic, heif, up to 150 megapixels), video (video/mp4, webm, quicktime), audio (audio/mpeg, wav, ogg, mp4), application/pdf, and GLB 3D models (model/gltf-binary). A GLB needs project_id, and a signed GLB upload also needs size_bytes set to the exact file size.

Create from a URL

If the file is already at a public HTTPS URL, pass that URL as source. FLORA fetches the bytes itself:

curl -X POST https://app.flora.ai/api/v1/assets \
  -H "Authorization: Bearer $FLORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "https://example.com/product.png",
    "workspace_id": "ws_abc123"
  }'

FLORA won't fetch http:// URLs, URLs with credentials, or private and internal addresses. If a host needs a login or blocks hotlinking, download the file and use a signed upload instead.

Upload bytes directly (4 MB or smaller)

Send the file as multipart/form-data. The response is the finished asset:

Signed upload (larger files)

1. Reserve

Response:

2. Upload the bytes

POST a multipart form to upload.url with every entry in upload.form_fields, exactly as returned, then the file last in the upload.file_field part. The upload target isn't the FLORA API, so don't send your Authorization header to it. A GLB reservation returns a PUT descriptor instead: send the raw file bytes to upload.url with upload.headers. Upload an asset has a script that builds the command from the response.

3. Complete

A completed asset has status: "ready", or failed with a failure_message. Completing the same upload twice is safe and returns the ready asset.

Upload many files

Every request counts against the workspace's rate limit, so reserve and complete files in batches of up to 25 instead of one request per file. workspace_id, project_id and folder apply to every upload; an upload's own folder overrides the shared one.

Each entry in the response's assets echoes its index and carries either the single reservation's fields with ok: true, or ok: false with an error. A failed entry never stops the rest. A workspace your key can't write, or a project_id outside the workspace, fails the whole request. Upload each file with its own upload instructions, then complete the batch:

Each entry reports status ready, or failed with failure_message, as a single completion does. An asset that's missing or outside your key's write access reports ok: false with not_found. Uploads reserved with a project_id land on that project's canvas when they complete.

List assets

Filter with project_id or query, and page with cursor.

Retrieve an asset

Retry an upload

If a signed upload expired or failed, request fresh upload instructions for the same asset:

An upload that already completed can't be retried; check it with GET /assets/{assetId} first.

Attach an asset to a project

Pass project_id when you create the asset, or attach it later:

Common endpoints

Method
Path
Description

POST

/assets/{assetId}/complete

GET

/assets?workspace_id={workspace_id}

GET

/assets/{assetId}

POST

/assets/{assetId}/retry

POST

/projects/{projectId}/assets/{assetId}/attach

Full parameters and responses are in the FLORA API reference.

Common validation issues

  • source is required for JSON requests and must be a string: "signed-url" or a public https:// URL. Objects like { "url": "..." }, local paths, data: URLs and placeholders like "upload" or "file" are rejected.

  • workspace_id is required and must start with ws_.

  • content_type must be one of the allowed types above.

  • If a public URL you expected to work is rejected, tell FLORA with feedback (kind: "missing_capability").

Notes

  • Wait for status: "ready" before you use a new asset as an input.

  • Keep the asset's url; that's what you pass to an imageUrl or videoUrl input.

  • Uploading from an AI client with FLORA MCP works differently; see Upload your own images, video and files.

Last updated

Was this helpful?