Upload File
Uploads
Upload File
Call /v1/file/upload to generate a pre-signed upload URL, then pass the returned download_url to interfaces that accept public asset URLs.
PUT
Upload File
Upload File
This API does not directly accept file contents. Instead, it first issues an object storagePUT URL. After the client obtains the URL, it uploads the file on its own.
- Suitable for pre-uploading images, videos, and other media assets.
- Uses API Key authentication.
- The default expiration time is
900seconds, with a minimum of60seconds and a maximum of3600seconds.
Method and Path
Request Example
Upload Image
Upload Video
Upload File to the Presigned URL
Once you have theupload_url, send a PUT request to that URL with the file contents. The Content-Type must match the value specified when requesting the presigned URL.
Response Example
Authentication
Body
Custom headers for the upload request.
The file MIME type, such as
image/png, image/jpeg, or video/mp4.Additional query parameters for the upload URL. Can be an empty object
{} if no extra parameters are needed.Response
The public URL that can be directly passed to image, video, and task endpoints after a successful upload.
The expiration time of the pre-signed URL in seconds.
The upload method, currently fixed as
PUT.The signed object storage upload URL.
Use Cases
Use it as a media URL after uploading
- Call
/v1/file/uploadto obtainupload_urlanddownload_url. - Upload the file by sending a
PUTrequest toupload_url. - Pass
download_urlas the input field to interfaces that accept public media URLs.