Skip to content

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);

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.

Media type application/json
object
asset_ids
required

Asset ids (asset_…) to resolve, up to 100 per call

Array<string>
>= 1 items <= 100 items

Assets resolved.

Media type application/json
object
results
required

One entry per requested asset id, in request order

Array<object>
object
asset_id
required

The id from the request, echoed

string
/^asset_\S+$/
url
required
Any of:
string
not_found
required

True when the id resolved to nothing readable

boolean
Example
{
"results": [
{
"asset_id": "asset_abc123"
}
]
}