Skip to content
Get started

Request Batch

POST/assets/download

Request a link to batch download assets (batch limited to 1000 assets)

Query ParametersExpand Collapse
dryRun: optional "true" or "api"

Estimate the operation instead of running it: the call returns a 269 response carrying the creative units cost. api estimates at the API tier.

One of the following:
"true"
"api"
projectId: optional string

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

Body ParametersJSONExpand Collapse
options: object { fileNameTemplate, flat, preferOriginal }
fileNameTemplate: string

A file naming convention as a string with the following available parameters: (seed used to generate the asset) (index of the asset in the inference) (prompt of the inference) (prompt of the generator) Example: ”---

flat: optional boolean

Flag to prevent grouping assets in directories and store them flat

preferOriginal: optional boolean

Flag to archive the file as it was originally uploaded, for assets whose upload was re-encoded on creation (e.g. a .mov stored as mp4). Each archived file is named with the extension of the format it contains.

Assets that have no preserved original (every image, and anything uploaded in a format we serve as-is) are archived unchanged, so this is a preference and never fails a download.

query: object { assetIds, inferenceIds, modelIds }
assetIds: array of string

Every individual assets specified will be included in the archive

inferenceIds: array of string

All assets issued from the provided inference ids will be included in the archive

modelIds: array of string

All assets issued from the provided model ids will be included in the archive

ReturnsExpand Collapse
jobId: string

The job id associated with the download request

Request Batch

curl https://api.cloud.scenario.com/v1/assets/download \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{
          "options": {
            "fileNameTemplate": "fileNameTemplate"
          },
          "query": {
            "assetIds": [
              "string"
            ],
            "inferenceIds": [
              "string"
            ],
            "modelIds": [
              "string"
            ]
          }
        }'
{
  "jobId": "jobId"
}
Returns Examples
{
  "jobId": "jobId"
}