v8

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-214977372.7 KB
Upload File

Upload file V1

ImageKit.io allows you to upload files directly from both the server and client sides. For server-side uploads, private API key authentication is used. For client-side uploads, generate a one-time token, signature, and expire from your secure backend using private API. Learn more about how to implement client-side file upload.

The V2 API enhances security by verifying the entire payload using JWT.

File size limit
On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw files and 100MB for videos. On the Lite paid plan, these limits increase to 40MB for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, these limits increase to 50MB for images, audio, and raw files and 2GB for videos. These limits can be further increased with enterprise plans.

Version limit
A file can have a maximum of 100 versions.

Demo applications

  • A full-fledged upload widget using Uppy, supporting file selections from local storage, URL, Dropbox, Google Drive, Instagram, and more.
  • Quick start guides for various frameworks and technologies.
post/api/v1/files/upload

Response

File uploaded successfully.

fileIdstring

Unique fileId. Store this fileld in your database, as this will be used to perform update action on this file.

namestring

Name of the asset.

filePathstring

The relative path of the file in the media library e.g. /marketing-assets/new-banner.jpg.

urlstring

A publicly accessible URL of the file.

thumbnailUrlstring

In the case of an image, a small thumbnail URL.

heightnumber

Height of the image in pixels (Only for images)

widthnumber

Width of the image in pixels (Only for Images)

sizenumber

Size of the image file in Bytes.

bitRateinteger

The bit rate of the video in kbps (only for video).

durationinteger

The duration of the video in seconds (only for video).

audioCodecstring

The audio codec used in the video (only for video).

videoCodecstring

The video codec used in the video (only for video).

isPrivateFileboolean

Is the file marked as private. It can be either true or false. Send isPrivateFile in responseFields in API request to get the value of this field.

isPublishedboolean

Is the file published or in draft state. It can be either true or false. Send isPublished in responseFields in API request to get the value of this field.

fileTypestring

Type of the uploaded file. Possible values are image, non-image.

customMetadataCustomMetadata

A key-value data associated with the asset.

selectedFieldsSchemaSelectedFieldsSchema

This field is included in the response only if the Path policy feature is available in the plan. It contains schema definitions for the custom metadata fields selected for the specified file path. Field selection can only be done when the Path policy feature is enabled.

Keys are the names of the custom metadata fields; the value object has details about the custom metadata schema.

embeddedMetadataEmbeddedMetadata

Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data.

descriptionstring

Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.