Skip to main content

Text to Speech

Text to Speech is for generating highly realistic, multilingual speech as well as other audio.

Path Parameters
text_to_speech_api_id integer REQUIRED

The API ID.

Header Parameters
Authorization string REQUIRED

Bearer Auth

Example: Bearer #your_token
Request Body
params object

The passed-in fields will partially override the API config.

model string

Possible values: [suno-ai/bark]

Name of the model to use.

speaker string

Possible values: [v2/en_speaker_6]

The name of the voice to use.

inputs object REQUIRED

Parameters for invoking the API.

session_id string

Possible values: length ≤ 32

Unique identifier used to maintain user session state. If not provided, a new session_id will be generated and returned in the response.

prompt string REQUIRED

The source text for synthesizing speech.

Responses
200

OK

Schema OPTIONAL
code integer

Error code. 0 when success.

msg string

Error message. Please use "code" instead of "msg" to determine errors.

data object OPTIONAL

Business data.

session_id string

Unique identifier used to maintain user session state.

audioURL string

URL of generated audio.

400

Invalid input

401

Unauthorized

404

Record not found