Skip to main content

Text to Audio

Text to Audio Gateway is for generating sound effects, music and others guided by text input.

Path Parameters
text_to_audio_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.

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

Text prompt to the model for audio generation.

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