Generate Videos/Images
Upload Assets
Upload assets file
Start with the API
POST https://devapi.vidnoz.com/v2/asset/upload
Request Attributes
Parameter | Required | Type | Description |
---|---|---|---|
file | true | file | Files to upload |
filetype | true | int | File type: 1=image; 2=video; 3=audio |
name | false | string | Specify the asset name. If not specified, it will be randomly generated. |
Response Attributes
Parameter | Type | Description |
---|---|---|
id | string | Asset ID |
name | string | Asset name |
filtype | int | File type: 1=image; 2=video; 3=audio |
filesize | int | File size (byte) |
format | string | File Format: png;jpg;gif;bmp;svg;webp;mp4;m4v;mov;webm;wav;mp3...... |
dimension | obj | Content size, only for images and videos |
dimension.width | int | Content width (unit: pixel) |
dimension.height | int | Content height (unit: pixel) |
duration | int | Content duration (unit: second), only for video and audio types |
download_url | string | Download Link |
Example
Request Attributes
curl --request POST \
--url https://devapi.vidnoz.com/v2/asset/upload \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'file="your_file"' \
--form 'filetype="1"' \
--form 'name="your_filename"' \
Response Attributes
{
"code": 200,
"message": "ok",
"data": {
"id": "cHpWR3VKRGhMamtrc05XWGRLUmpwQT09",
"name": "filename",
"filetype": "3",
"filesize": 450564,
"format": "mp3",
"dimension": "320x178",
"dimension.width": 0,
"dimension.height": 0,
"duration": 9.39,
"download_url": "https://r2-aivid-000-prod.214dcedd27630abef236dcb67de0ce92.r2.cloudflarestorage.com/10/asset/202503/67ce4622a561a.mp3?response-content-type=audio%2Fmpeg&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=91ac9d3ee865be05c575d38c9bdd1275%2F20250310%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250310T015340Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604800&X-Amz-Signature=db6e62331e73cc18682a3e63e4c420f1d53e0a76544d3d62c7fd0b24e9c3a541"
}
}