Media

Batches

Requests, objects, and responses.

Guide →

Base URL and authentication

Create batch

POST /media/v1/libraries/{library_id}/batches

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Request body

FieldTypeRequiredDescription
action"tag" / "untag"yesBatch action
tagsstring[]yesAsset tags. Uploads accept a comma-separated string (items trimmed, empty items dropped), an array, or repeated tags fields; PATCH accepts an array only and replaces the whole list
FieldTypeRequiredDescription
action"set_context"yesBatch action
contextobjectyesCustom text key/value pairs; PATCH replaces the whole map, {} clears it
FieldTypeRequiredDescription
action"move"yesBatch action
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
FieldTypeRequiredDescription
action"delete"yesBatch action
FieldTypeRequiredDescription
selectorBatchSelectoryesSelect by IDs or expression

Returns: Job.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
idstringGenerated batch identifier: job_ followed by 32 lowercase hexadecimal characters.
library_idstringIdentifier of the library in which the batch operates.
actionstringBatch operation: tag adds labels, untag removes labels, set_context replaces custom metadata, move changes asset_folder, and delete removes selected assets.
statusstringJob status: queued awaits execution; running is processing items; completed means all items succeeded; completed_with_errors means some succeeded and some failed; failed means all selected items failed. An empty job completes successfully.
totalnumberNumber of distinct assets selected when the job was created.
donenumberNumber of items successfully processed; failed items are counted separately.
failednumberNumber of items that could not be processed successfully.
failuresarray<object>Always present, including an empty array before any item failure or when all items succeed. At most 20 item failures are returned.
failures[].asset_idstringIdentifier supplied for the failed item; it may identify a missing asset.
failures[].codestringDomain error code explaining the individual item failure.
created_atstringTime the batch job was created, in UTC.
finished_atstring | nullTime the job reached a terminal status, or null while queued or running.
curl -X POST "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/batches" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"action":"tag","tags":["sample"],"selector":{"ids":["85b7ef616a8b4719a41777a036ebc1d2","00000000000000000000000000000000"]}}'

HTTP 200

{
  "id": "job_b562f087623c4756b43813e3dce670ba",
  "library_id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "action": "tag",
  "status": "queued",
  "total": 2,
  "done": 0,
  "failed": 0,
  "created_at": "2026-10-11T15:50:24.942Z",
  "failures": [],
  "finished_at": null
}

Get batch

GET /media/v1/libraries/{library_id}/batches/{job_id}

ParameterLocationTypeDescription
library_idpathstringLibrary ID
job_idpathstringJob ID

Returns: Job.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
idstringGenerated batch identifier: job_ followed by 32 lowercase hexadecimal characters.
library_idstringIdentifier of the library in which the batch operates.
actionstringBatch operation: tag adds labels, untag removes labels, set_context replaces custom metadata, move changes asset_folder, and delete removes selected assets.
statusstringJob status: queued awaits execution; running is processing items; completed means all items succeeded; completed_with_errors means some succeeded and some failed; failed means all selected items failed. An empty job completes successfully.
totalnumberNumber of distinct assets selected when the job was created.
donenumberNumber of items successfully processed; failed items are counted separately.
failednumberNumber of items that could not be processed successfully.
failuresarray<object>Always present, including an empty array before any item failure or when all items succeed. At most 20 item failures are returned.
failures[].asset_idstringIdentifier supplied for the failed item; it may identify a missing asset.
failures[].codestringDomain error code explaining the individual item failure.
created_atstringTime the batch job was created, in UTC.
finished_atstring | nullTime the job reached a terminal status, or null while queued or running.
curl -X GET "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/batches/job_b562f087623c4756b43813e3dce670ba" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "id": "job_b562f087623c4756b43813e3dce670ba",
  "library_id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "action": "tag",
  "status": "completed_with_errors",
  "total": 2,
  "done": 1,
  "failed": 1,
  "created_at": "2026-10-11T15:50:24.942Z",
  "failures": [
    {
      "asset_id": "00000000000000000000000000000000",
      "code": "ASSET_NOT_FOUND"
    }
  ],
  "finished_at": "2026-10-11T15:50:27.555Z"
}

Batch assets alias

POST /media/v1/libraries/{library_id}/assets:batch

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Request body

FieldTypeRequiredDescription
action"tag" / "untag"yesBatch action
tagsstring[]yesAsset tags. Uploads accept a comma-separated string (items trimmed, empty items dropped), an array, or repeated tags fields; PATCH accepts an array only and replaces the whole list
FieldTypeRequiredDescription
action"set_context"yesBatch action
contextobjectyesCustom text key/value pairs; PATCH replaces the whole map, {} clears it
FieldTypeRequiredDescription
action"move"yesBatch action
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
FieldTypeRequiredDescription
action"delete"yesBatch action
FieldTypeRequiredDescription
selectorBatchSelectoryesSelect by IDs or expression

Returns: Job.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
idstringGenerated batch identifier: job_ followed by 32 lowercase hexadecimal characters.
library_idstringIdentifier of the library in which the batch operates.
actionstringBatch operation: tag adds labels, untag removes labels, set_context replaces custom metadata, move changes asset_folder, and delete removes selected assets.
statusstringJob status: queued awaits execution; running is processing items; completed means all items succeeded; completed_with_errors means some succeeded and some failed; failed means all selected items failed. An empty job completes successfully.
totalnumberNumber of distinct assets selected when the job was created.
donenumberNumber of items successfully processed; failed items are counted separately.
failednumberNumber of items that could not be processed successfully.
failuresarray<object>Always present, including an empty array before any item failure or when all items succeed. At most 20 item failures are returned.
failures[].asset_idstringIdentifier supplied for the failed item; it may identify a missing asset.
failures[].codestringDomain error code explaining the individual item failure.
created_atstringTime the batch job was created, in UTC.
finished_atstring | nullTime the job reached a terminal status, or null while queued or running.
curl -X POST "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/assets:batch" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"action":"tag","tags":["sample"],"selector":{"ids":["85b7ef616a8b4719a41777a036ebc1d2"]}}'

HTTP 200

{
  "id": "job_3c2fe728de054c7396058c7438b289d2",
  "library_id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "action": "tag",
  "status": "queued",
  "total": 1,
  "done": 0,
  "failed": 0,
  "created_at": "2026-10-11T15:50:29.266Z",
  "failures": [],
  "finished_at": null
}

Get job alias

GET /media/v1/libraries/{library_id}/jobs/{job_id}

ParameterLocationTypeDescription
library_idpathstringLibrary ID
job_idpathstringJob ID

Returns: Job.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
idstringGenerated batch identifier: job_ followed by 32 lowercase hexadecimal characters.
library_idstringIdentifier of the library in which the batch operates.
actionstringBatch operation: tag adds labels, untag removes labels, set_context replaces custom metadata, move changes asset_folder, and delete removes selected assets.
statusstringJob status: queued awaits execution; running is processing items; completed means all items succeeded; completed_with_errors means some succeeded and some failed; failed means all selected items failed. An empty job completes successfully.
totalnumberNumber of distinct assets selected when the job was created.
donenumberNumber of items successfully processed; failed items are counted separately.
failednumberNumber of items that could not be processed successfully.
failuresarray<object>Always present, including an empty array before any item failure or when all items succeed. At most 20 item failures are returned.
failures[].asset_idstringIdentifier supplied for the failed item; it may identify a missing asset.
failures[].codestringDomain error code explaining the individual item failure.
created_atstringTime the batch job was created, in UTC.
finished_atstring | nullTime the job reached a terminal status, or null while queued or running.
curl -X GET "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/jobs/job_3c2fe728de054c7396058c7438b289d2" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "id": "job_3c2fe728de054c7396058c7438b289d2",
  "library_id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "action": "tag",
  "status": "completed",
  "total": 1,
  "done": 1,
  "failed": 0,
  "created_at": "2026-10-11T15:50:29.266Z",
  "failures": [],
  "finished_at": "2026-10-11T15:50:29.494Z"
}

Job

FieldTypeRequiredDescription
idJobIdyesResource ID
library_idLibraryIdyesLibrary ID
actiontag / untag / set_context / move / deleteyesBatch action
status"queued" / "running" / "completed" / "completed_with_errors" / "failed"yesResource status
totalnumberyesTotal assets in this job
donenumberyesCompleted count; completion flag for chunk responses
failednumberyesFailure count
failuresobject[]yes—
created_atIsoTimestampyesCreation time
finished_atIsoTimestamp / nullyesCompletion time; null while unfinished

BatchSelector

FieldTypeRequiredDescription
idsAssetId[]yesAsset IDs
FieldTypeRequiredDescription
expressionstringyesStructured query expression; an empty expression returns every asset
exclusionsAssetId[]noAsset IDs excluded from selection

BatchAction

FieldTypeRequiredDescription
action"tag" / "untag"yesBatch action
tagsstring[]yesAsset tags. Uploads accept a comma-separated string (items trimmed, empty items dropped), an array, or repeated tags fields; PATCH accepts an array only and replaces the whole list
FieldTypeRequiredDescription
action"set_context"yesBatch action
contextobjectyesCustom text key/value pairs; PATCH replaces the whole map, {} clears it
FieldTypeRequiredDescription
action"move"yesBatch action
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
FieldTypeRequiredDescription
action"delete"yesBatch action
Export

On this page