POST
/
text-to-sound
curl --request POST \
  --url https://client.camb.ai/apis/text-to-sound \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "prompt": "<string>",
  "duration": 8
}'
{
  "task_id": "<string>"
}
For optimal accuracy, it is recommended to use a concise prompt.

This endpoint initiates the process of converting the text into an audio effect, returning a task_id. To check the status of the task, the /text-to-sound/{task_id} endpoint can be polled.

Authorizations

x-api-key
string
header
required

The x-api-key is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.

Body

application/json
prompt
string

The text to be converted to audio.

duration
number
default:
8

The desired duration of the audio.

Response

200
application/json
Successful Response

A JSON that contains unique identifier for the task. This is used to query the status of the text to sound task that is running. It is returned when a create request is made to generate sound from text.

task_id
string