Docs Ali Pix /openapi/v2/media/upload
API reference

Upload resources (video/audio)

1. Supports the following mime/type & suffixes "video/mp4": "mp4", "video/mov": "mov", "video/webm": "webm", "video/quicktime": "mov" "audio/mpeg": "mp3", "audio/wav": "wav", "audio/vnd.wave": "wav", "audio/x-wav":…

POST/openapi/v2/media/upload

Body Parametersmultipart/form-data

file string · binary

file or file_url choose one

file_url string

You can use url to upload resources. The following mime-type/ suffix is supported "video/mp4": "mp4", "video/mov": "mov", "video/webm": "webm", "video/quicktime": "mov" "audio/mpeg": "mp3", "audio/wav": "wav", "audio/vnd.wave": "wav", "audio/x-wav": "wav", "audio/x-m4a": "m4a", "audio/aac": "aac", "audio/x-aac": "aac", "audio/wave": "wav", "audio/mp4": "mp3"

Responses

200 application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"file": "",
3"file_url": ""
4}
Code Sample cURL
1curl -X POST "https://api.digislash.com/openapi/v2/media/upload" \
2-H "Authorization: Bearer <API Key>" \
3-F "file=@/path/to/file" \
4-F "file_url="
Response
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}