Complete signed uploads in bulk
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const asset = await client.assets.completeUploads({ asset_ids: [ 'asset_abc123', ],});console.log(asset);curl -X POST 'https://app.flora.ai/api/v1/assets/complete' \ -H 'Authorization: Bearer $FLORA_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "asset_ids": [ "asset_abc123" ]}'Completes up to 25 signed uploads in one request — the batch counterpart of POST /assets/{assetId}/complete, counted once against the workspace’s rate limit instead of once per file. Every asset is verified and validated as the single completion does. Each entry echoes its index and asset_id and reports status ready, or failed with failure_message, exactly as the single completion would; ok is false with an error only when completion could not run for that asset — an id that is missing, deleted or outside this credential’s write access reports not_found, the single completion’s deliberate ambiguity. A failed entry never stops the rest, and a repeated id completes once and reports under each index. Static media reserved with project_id are surfaced on that project’s canvas without stacking on one another; GLB Model3D assets are associated with the project but are not auto-placed. A malformed asset_id rejects the whole request. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate, and a batch whose every entry was rejected releases its key (see the Idempotency guide).
Error responses use the standard error body.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”object
Signed-upload asset ids (asset_…) to complete, 1 to 25 per call
Responses
Section titled “ Responses ”Uploads completed; each entry reports its own outcome.
object
One entry per requested asset id, in request order: ok true with the single completion’s fields, or ok false with error
object
Asset identifier
Position of this entry in the request’s list
Completion ran; status reports ready or failed, as on the single completion
object
Position of this entry in the request’s list
The id from the request, echoed
This entry failed; error says why
Why this entry failed
object
Stable public API error code, as the single-asset operation would return it
Human-readable reason this entry failed
Example
{ "assets": [ { "asset_id": "asset_abc123", "workspace_id": "ws_abc123", "visibility": "workspace", "status": "pending_upload", "ok": true } ]}