Resolve asset ids to URLs
POST
/assets/resolve
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const asset = await client.assets.resolve({ asset_ids: [ 'asset_abc123', ],});console.log(asset);curl -X POST 'https://app.flora.ai/api/v1/assets/resolve' \ -H 'Authorization: Bearer $FLORA_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "asset_ids": [ "asset_abc123" ]}'Resolves up to 100 asset ids to their media URLs in one call — the batch counterpart of GET /assets/{assetId} for callers holding many ids, such as the reference input ids generation history reports. Each entry echoes its requested id; an id that is missing, deleted or outside the caller’s access resolves to url null with not_found true, matching the single-read’s deliberate ambiguity. A malformed asset_id rejects the whole request.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
asset_ids
required
Asset ids (asset_…) to resolve, up to 100 per call
Array<string>
Responses
Section titled “ Responses ”Assets resolved.
Media type application/json
object
Example
{ "results": [ { "asset_id": "asset_abc123" } ]}