Upload Prompt Audio

Use this API to upload prompt audio files to enhance the similarity and stability of the synthesized voice.
POST/v1/files/upload

Authorization

AuthorizationstringheaderRequired
HTTP: Bearer Auth

Request Header

Content-Typeenum<string>Default: multipart/form-dataRequired

Request Body multipart/form-data

purposeenum<string>Required

Purpose of the file:
  • prompt_audio:Voice clone prompt audio

filebinaryRequired

Binary data of the file to be uploaded. Specifications:
  • Mono wav format;
  • Duration should be at least 5 seconds and at most 2 minutes. Recommended duration 5-15 seconds.

Response Body Structure

fileobject

file.file_idlong

Unique file identifier (15 digits)

file.bytesinteger

File size (bytes)

file.created_atinteger

Creation time Unix timestamp (seconds)

file.filenamestring

File name

file.purposestring

Purpose of the file, default prompt_audio

base_respobject

base_resp.status_codeinteger

Status code (0=normal; 100001=parameter error; 100101=authentication failed; 100501=triggered RPM rate limit; 100999=internal system error)

base_resp.status_msgstring

Status details