Skip to content
Get started

Request

client.assets.download.request(stringassetID, DownloadRequestParams { targetFormat } body, RequestOptionsoptions?): DownloadRequestResponse { url }
POST/assets/{assetId}/download

Request a link to download the given assetId in the given targetFormat

ParametersExpand Collapse
assetID: string
body: DownloadRequestParams { targetFormat }
targetFormat?: "gif" | "heif" | "jpeg" | 10 more

The format to download the asset in

One of the following:
"gif"
"heif"
"jpeg"
"jpg"
"png"
"svg"
"webp"
"avif"
"tif"
"tiff"
"glb"
"fbx"
"obj"
ReturnsExpand Collapse
DownloadRequestResponse { url }
url: string

The signed URL to download the asset in the given format

Request

import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const response = await client.assets.download.request('assetId');

console.log(response.url);
{
  "url": "url"
}
Returns Examples
{
  "url": "url"
}