Upload Asset
POST
https://upload.konpro.ai/v1/assetUpload 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
| TIME | STATUS | USER 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 Type | Content-Type | Description |
|---|---|---|
| JPEG | image/jpeg | JPEG image files |
| PNG | image/png | PNG image files |
| MP4 | video/mp4 | MP4 video files |
| WEBM | video/webm | WEBM video files |
| MPEG | audio/mpeg | MPEG audio files |
Request Headers
| Header | Description |
|---|---|
| Content-Type | MIME type of the file being uploaded (e.g., image/jpeg) |
| x-api-key | Your API key for authentication |
Request Body
Raw binary file data of the asset being uploaded.
Response
Response Structure
| Field | Description |
|---|---|
| id | Unique identifier assigned to the uploaded asset |
| name | Name of the uploaded asset (filename) |
| file_type | Type category of the asset (image, video, audio) |
| folder_id | Folder ID where the asset is stored (if applicable) |
| meta | Metadata associated with the asset |
| image_key | Image 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
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request