Appearance
Upload file
POST
/v1/files/upload
Upload a file that can be used across various endpoints.
Authorizations
BearerAuth
TypeHTTP (bearer)
Request Body
Content Type: multipart/form-data when using the file field.
When uploading binary content with the file field, submit the request body as multipart/form-data; this requirement is not needed when using the url field.
Schema
file string
The File object (not file name) to be uploaded. Mutually exclusive with the url parameter.
Format binary
url string
The URL of the file to uploaded. Mutually exclusive with the file parameter.
purpose stringrequired
The intended purpose of the uploaded file.
For the following purposes:
- reference: Supported format (mp3, m4a). The supported audio duration range is [30,30] seconds, excess will be trimmed.
- vocal: Supported format (mp3, m4a). Utilizes vocal extracted from uploaded audio. The supported vocal duration range is [15,30] seconds, excess will be trimmed.
- melody: Supported format (mp3, m4a, mid). Utilizes vocal extracted from uploaded audio, uploading a MIDI file is recommended. The supported audio duration range is [5,60] seconds, excess will be trimmed.
- instrumental: Supported format (mp3, m4a). The supported audio duration range is [30,30] seconds, excess will be trimmed.
- voice: Supported format (mp3, m4a). The supported audio duration range is [5,15] seconds, excess will be trimmed.
- audio: Supported format (mp3, m4a). A common audio file, used for song extension and similar purposes.
- remix: Supported format (mp3, m4a). A common audio file, used for remix purposes.
- soundtrack: Supports videos and images. Supported video format (.mp4, .mov, .avi, .mkv, .webm). Supported image format (.jpg, .jpeg, .png, .webp).
- lyrics-video: Supported format (.jpg, .jpeg, .png). A common image file, used for lyrics video background images.
Valid valuesreferencevocalmelodyinstrumentalvoiceaudioremixsoundtracklyrics-video
Responses
The uploaded File object.
application/json
POST
/v1/files/upload