Create an asset upload
Changed onCreates an asset via one of three paths. (1) Direct bytes: send multipart/form-data with a file part (≤4 MB) plus workspace_id — FLORA stores the bytes and returns a ready asset in one call. (2) Server-side fetch: send JSON with source set to any public HTTPS URL (≤50 MB) — FLORA fetches the bytes with SSRF protection (private/loopback/metadata IPs and redirects to them are blocked) and stores them. (3) Signed upload: send JSON with source="signed-url" to reserve a presigned upload URL for files larger than 4 MB; upload the bytes, then call the complete endpoint. Allowed types: images (jpeg, png, webp, gif, avif, heic, heif), video (mp4, webm, quicktime), audio (mpeg, wav, ogg, mp4/m4a), pdf, and GLB (model/gltf-binary). GLB requires project_id; signed GLB uploads also require exact local file length as size_bytes and use the returned raw-byte PUT descriptor. GLBs are validated before readiness. Images are capped at 150 MP. project_id associates the asset with a project; supported static media are surfaced on its canvas, while GLB Model3D assets are not auto-placed. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.
Request
- Base URLhttps://app.flora.ai/api/v1
- URLhttps://app.flora.ai/api/v1/assets
- AuthHTTP bearer
Request body
Example request
{
"source": "signed-url",
"workspace_id": "ws_abc123",
"project_id": "prj_abc123",
"folder": "campaign-assets",
"content_type": "image/png",
"file_name": "hero.png",
"size_bytes": 1048576
}Response
Asset upload created.
Example response
{
"asset_id": "asset_abc123",
"workspace_id": "ws_abc123",
"upload_url": "https://storage.googleapis.com/flora-user-assets"
}Changes
- warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status - warning
added the new
not_configuredenum value to the/response property for the response status
- warning
- breaking
the
response's property type changed fromobjectto no type for status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - info
added the new optional request property
- info
added
subschema #1subschema #2to theresponse propertyanyOflist for the response status
- breaking