Upload Asset

POSThttps://upload.konpro.ai/v1/asset

Upload media files such as images, videos, or audio to enhance your AI-generated content. The uploaded asset will receive a unique ID that can be used for further API operations, such as creating photo avatars or videos.

Request History

Log in to see full request history

TIMESTATUSUSER AGENT
Make a request to see history.

0 Requests This Month

cURL Request

shell
curl --request POST \
--url https://upload.konpro.ai/v1/asset \
--header 'Content-Type: image/jpeg' \
--header 'x-api-key: <your-api-key>' \
--data-binary '@/path/to/image.jpg'

Supported File Types

File TypeContent-TypeDescription
JPEGimage/jpegJPEG image files
PNGimage/pngPNG image files
MP4video/mp4MP4 video files
WEBMvideo/webmWEBM video files
MPEGaudio/mpegMPEG audio files

Request Headers

HeaderDescription
Content-TypeMIME type of the file being uploaded (e.g., image/jpeg)
x-api-keyYour API key for authentication

Request Body

Raw binary file data of the asset being uploaded.

Response

Response Structure

FieldDescription
idUnique identifier assigned to the uploaded asset
nameName of the uploaded asset (filename)
file_typeType category of the asset (image, video, audio)
folder_idFolder ID where the asset is stored (if applicable)
metaMetadata associated with the asset
image_keyImage key usable for creating photo avatars (only for images)

Sample Response

json
{
  "id": "asset_123456",
  "name": "profile_image.jpg",
  "file_type": "image",
  "folder_id": "folder_789",
  "meta": {
    "size": 1024000,
    "width": 1920,
    "height": 1080,
    "format": "JPEG"
  },
  "image_key": "img_key_abc123"
}

Notes

  • Requires API authentication.
  • Upload binary file data as the request body.
  • Set appropriate Content-Type header based on file type.
  • Supported formats: JPEG, PNG, MP4, WEBM, MPEG.
  • Returns unique asset ID for use in other API operations.
  • Image assets receive an image_key for photo avatar creation.
  • Assets are stored in folders for organization.
  • Refer to Error Responses for error information.

Example Usage

Shell
curl --request POST \
--url https://upload.konpro.ai/v1/asset \
--header 'Content-Type: image/jpeg' \
--header 'x-api-key: <your-api-key>' \
--data-binary '@/path/to/image.jpg'

LANGUAGE

CREDENTIALS

HEADER

RESPONSE

Examples

Choose an example:

application/json
200 - Success
400 - Bad Request