Cloudinary

Upload and actions

Endpoints and supported behavior.

The official SDK treats upload("file_…") as a local file path. To import from File Library, use the native endpoint POST /media/v1/libraries/{library_id}/assets/import; see Import file.

Guide →

Upload accepts file bytes, HTTPS URLs, or data URIs. Use video for audio or auto for detection. SDK upload_large sends chunks to the same upload endpoint.

tags may be a comma-separated string, an array, or repeated tags fields (-F tags=a -F tags=b); all three are equivalent. Comma-separated items are trimmed and empty items dropped. Zero-byte files return FILE_EMPTY; images whose dimensions cannot be read return Invalid image file; any other file is accepted as raw.

await new Promise((resolve, reject) => {
  cloudinary.uploader.upload_large("./video.mp4", {
    resource_type: "video",
    chunk_size: 20 * 1024 * 1024,
  }, (error, result) => error ? reject(error) : resolve(result));
});

Chunks share X-Unique-Upload-Id. Content-Range is bytes start-end/total; use -1 for unknown totals until the final chunk. Non-final chunks must be equal-sized and at least 5 MiB. Sessions expire after 24 hours. Intermediate responses contain done=false and upload_id; the final response includes the resource and done=true.

Guide →

Base URL and authentication

Upload

POST /cloudinary/v1_1/{library_id}/{resource_type}/upload

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400
X-Unique-Upload-IdheaderstringStable identifier shared by every chunk of this upload.
Content-RangeheaderstringChunk byte range: bytes start-end/total; total may be -1 until the final chunk.

Request body

FieldTypeRequiredDescription
filestring / stringyesFile bytes, HTTPS URL, data URI, or same-account file_…
public_idstringnoAsset name in delivery URLs; may contain path segments
public_id_prefixstringnoPath prefix for public_id; a trailing / is optional and exactly one / separates prefix and ID
display_namestringnoDisplay name
asset_folderstringnoOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
use_filenamebooleannoUse the file name for public_id
unique_filenamebooleannoAppend a unique suffix
use_filename_as_display_namebooleannoUse the file name as display_name
filename_overridestringnoOverride the original file name
overwritebooleannoWhether to overwrite a matching public ID
tagsstring / string[]noAsset 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
contextstring / objectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it
auto_taggingnumbernoMerge tags meeting the threshold after understanding; 0–1
resource_typeResourceType / "auto"noimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Returns: CloudinaryResource.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
asset_idstring
public_idstring
display_namestring
asset_folderstring
resource_typestring
typestring
formatstring
versionnumber
version_idstring
bytesnumber
etagstring
widthnumber
heightnumber
durationnumber
pagesnumber
is_audioboolean
original_filenamestring
tagsarray<string>
contextobject
context.customobject
created_atstring
urlstring
secure_urlstring
placeholderboolean
existingboolean
processingobject
processing.statestring
processing.kindsobject
processing.updated_atstring
doneboolean
upload_idstring
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/upload" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"file":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==","public_id":"walk-lib-r1-MDP-1791733789929-plain","tags":["docs"]}'

HTTP 200

{
  "asset_id": "85b7ef616a8b4719a41777a036ebc1d2",
  "public_id": "walk-lib-r1-MDP-1791733789929-plain",
  "display_name": "walk-lib-r1-MDP-1791733789929-plain",
  "asset_folder": "",
  "resource_type": "image",
  "type": "upload",
  "format": "png",
  "version": 1791733810,
  "version_id": "fdf3c8cd40c2424d86e8397425a69857",
  "bytes": 70,
  "etag": "b357a19c87624c7c4d131aeeb4ae677f",
  "width": 1,
  "height": 1,
  "original_filename": "file",
  "tags": [
    "docs"
  ],
  "created_at": "2026-10-11T15:50:10.842Z",
  "url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733810/walk-lib-r1-MDP-1791733789929-plain.png",
  "secure_url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733810/walk-lib-r1-MDP-1791733789929-plain.png",
  "placeholder": false
}

Destroy

POST /cloudinary/v1_1/{library_id}/{resource_type}/destroy

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Request body

FieldTypeRequiredDescription
public_idstringyesAsset name in delivery URLs; may contain path segments

Returns: DestroyResult.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
resultstring
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/destroy" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"public_id":"docs/renamed"}'

HTTP 200

{
  "result": "ok"
}

Rename

POST /cloudinary/v1_1/{library_id}/{resource_type}/rename

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Request body

FieldTypeRequiredDescription
from_public_idstringyesOriginal public ID
to_public_idstringyesNew public ID
overwritebooleannoWhether to overwrite a matching public ID

Returns: CloudinaryResource.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
asset_idstring
public_idstring
display_namestring
asset_folderstring
resource_typestring
typestring
formatstring
versionnumber
version_idstring
bytesnumber
etagstring
widthnumber
heightnumber
durationnumber
pagesnumber
is_audioboolean
original_filenamestring
tagsarray<string>
contextobject
context.customobject
created_atstring
urlstring
secure_urlstring
placeholderboolean
existingboolean
processingobject
processing.statestring
processing.kindsobject
processing.updated_atstring
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/rename" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"from_public_id":"docs/pixel","to_public_id":"docs/renamed"}'

HTTP 200

{
  "asset_id": "9339cdae93804c0c8c65d5189ef1f646",
  "public_id": "docs/renamed",
  "display_name": "Sample image",
  "asset_folder": "examples",
  "resource_type": "image",
  "type": "upload",
  "format": "png",
  "version": 1791538418,
  "version_id": "35848c1529994e338e7aa634a1c13d9c",
  "bytes": 70,
  "etag": "b357a19c87624c7c4d131aeeb4ae677f",
  "width": 1,
  "height": 1,
  "original_filename": "file",
  "tags": [
    "docs"
  ],
  "context": {
    "custom": {
      "alt": "Sample"
    }
  },
  "created_at": "2026-10-09T09:33:38.899Z",
  "url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/renamed.png",
  "secure_url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/renamed.png",
  "placeholder": false
}

Tags

POST /cloudinary/v1_1/{library_id}/{resource_type}/tags

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Request body

FieldTypeRequiredDescription
public_idsstring[]yesAsset public IDs
tagstringnoTag name
commandadd / remove / replace / remove_allyesTag or context action

Returns: PublicIds.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
public_idsarray<string>
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/tags" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"public_ids":["docs/pixel"],"tag":"sample","command":"add"}'

HTTP 200

{
  "public_ids": [
    "docs/pixel"
  ]
}

Context

POST /cloudinary/v1_1/{library_id}/{resource_type}/context

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Request body

FieldTypeRequiredDescription
public_idsstring[]yesAsset public IDs
contextstring / objectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it
commandadd / remove_allyesTag or context action

Returns: PublicIds.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
public_idsarray<string>
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/context" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"public_ids":["docs/pixel"],"context":"alt=Sample","command":"add"}'

HTTP 200

{
  "public_ids": [
    "docs/pixel"
  ]
}

Explicit

POST /cloudinary/v1_1/{library_id}/{resource_type}/explicit

ParameterLocationTypeDescription
library_idpathstringLibrary ID
resource_typepathimage / video / raw / autoimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400

Request body

FieldTypeRequiredDescription
public_idstringyesAsset name in delivery URLs; may contain path segments
tagsstring / string[]noAsset 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
contextstring / objectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it

Returns: CloudinaryResource.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
asset_idstring
public_idstring
display_namestring
asset_folderstring
resource_typestring
typestring
formatstring
versionnumber
version_idstring
bytesnumber
etagstring
widthnumber
heightnumber
durationnumber
pagesnumber
is_audioboolean
original_filenamestring
tagsarray<string>
contextobject
context.customobject
created_atstring
urlstring
secure_urlstring
placeholderboolean
existingboolean
processingobject
processing.statestring
processing.kindsobject
processing.updated_atstring
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/image/explicit" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"public_id":"docs/pixel","tags":["docs"]}'

HTTP 200

{
  "asset_id": "9339cdae93804c0c8c65d5189ef1f646",
  "public_id": "docs/pixel",
  "display_name": "Sample image",
  "asset_folder": "examples",
  "resource_type": "image",
  "type": "upload",
  "format": "png",
  "version": 1791538418,
  "version_id": "35848c1529994e338e7aa634a1c13d9c",
  "bytes": 70,
  "etag": "b357a19c87624c7c4d131aeeb4ae677f",
  "width": 1,
  "height": 1,
  "original_filename": "file",
  "tags": [
    "docs"
  ],
  "context": {
    "custom": {
      "alt": "Sample"
    }
  },
  "created_at": "2026-10-09T09:33:38.899Z",
  "url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/pixel.png",
  "secure_url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/pixel.png",
  "placeholder": false
}

CloudinaryResource

FieldTypeRequiredDescription
asset_idAssetIdyesAsset ID
public_idstringyesAsset name in delivery URLs; may contain path segments
display_namestringyesDisplay name
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
resource_typeResourceTypeyesimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400
typeDeliveryTypeyesResource or event type
formatstringyesFile format
versionnumberyesDelivery version
version_idstringyesVersion identifier
bytesnumberyesFile size in bytes
etagstringyesFile checksum
widthnumbernoWidth in pixels
heightnumbernoHeight in pixels
durationnumbernoDuration in seconds
pagesnumbernoDocument pages
is_audiobooleannoWhether this is audio
original_filenamestringnoOriginal file name
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
contextobjectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it
created_atIsoTimestampyesCreation time
urlstringyesOriginal-file URL
secure_urlstringyesHTTPS delivery URL
placeholderfalseyesAlways false
existingbooleannoWhether an existing asset was returned without overwrite
processingProcessingnoOverall and per-kind processing states

DestroyResult

FieldTypeRequiredDescription
resultok / not foundyesOperation result

PublicIds

FieldTypeRequiredDescription
public_idsstring[]yesAsset public IDs

ChunkPending

FieldTypeRequiredDescription
donefalseyesCompleted count; completion flag for chunk responses
upload_idstringyesChunk session identifier

ChunkComplete

FieldTypeRequiredDescription
asset_idAssetIdyesAsset ID
public_idstringyesAsset name in delivery URLs; may contain path segments
display_namestringyesDisplay name
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
resource_typeResourceTypeyesimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400
typeDeliveryTypeyesResource or event type
formatstringyesFile format
versionnumberyesDelivery version
version_idstringyesVersion identifier
bytesnumberyesFile size in bytes
etagstringyesFile checksum
widthnumbernoWidth in pixels
heightnumbernoHeight in pixels
durationnumbernoDuration in seconds
pagesnumbernoDocument pages
is_audiobooleannoWhether this is audio
original_filenamestringnoOriginal file name
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
contextobjectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it
created_atIsoTimestampyesCreation time
urlstringyesOriginal-file URL
secure_urlstringyesHTTPS delivery URL
placeholderfalseyesAlways false
existingbooleannoWhether an existing asset was returned without overwrite
processingProcessingnoOverall and per-kind processing states
FieldTypeRequiredDescription
donetrueyesCompleted count; completion flag for chunk responses
Export

On this page