Skip to main content
PUT
Upload File

Upload File

This API does not directly accept file contents. Instead, it first issues an object storage PUT 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 900 seconds, with a minimum of 60 seconds and a maximum of 3600 seconds.

Method and Path

Request Example

Upload Image

Upload Video

Upload File to the Presigned URL

Once you have the upload_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

headers
object
Custom headers for the upload request.
Content-Type
string
The file MIME type, such as image/png, image/jpeg, or video/mp4.
params
object
Additional query parameters for the upload URL. Can be an empty object {} if no extra parameters are needed.

Response

download_url
string
The public URL that can be directly passed to image, video, and task endpoints after a successful upload.
expire
integer
The expiration time of the pre-signed URL in seconds.
method
string
The upload method, currently fixed as PUT.
upload_url
string
The signed object storage upload URL.

Use Cases

Use it as a media URL after uploading

  1. Call /v1/file/upload to obtain upload_url and download_url.
  2. Upload the file by sending a PUT request to upload_url.
  3. Pass download_url as the input field to interfaces that accept public media URLs.

Notes

This endpoint only issues the upload URL; it does not upload the file for you. Actual file upload requires the client to send another PUT request to upload_url.