🚀 Introducing MARS8 Series — Four Powerful Variants | Available on All Major Clouds | Learn about the model here
🚀 Introducing MARS8 Series — Four Powerful Variants | Available on All Major Clouds | Learn about the model here
Retrieve multiple generated audio files for completed Sound and Music tasks using multiple run IDs.
curl --request POST \
--url https://client.camb.ai/apis/text-to-sound-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'{
"1234": {
"output_url": "https://audio-storage.camb.ai/files/audio_1234.flac"
},
"5678": {
"output_url": "https://audio-storage.camb.ai/files/audio_5678.flac"
}
}This endpoint retrieves audio outputs generated from multiple previously completed Sound and Music tasks in a single request. It allows you to efficiently fetch results for several text-to-sound generation runs simultaneously, making it ideal for batch processing workflows and applications that need to handle multiple audio files at once. Unlike the single result endpoint that takes a run ID as a URL parameter, this bulk endpoint accepts multiple run IDs in the request body, providing a more efficient way to retrieve results when working with multiple text-to-sound tasks.Documentation Index
Fetch the complete documentation index at: https://docs.camb.ai/llms.txt
Use this file to discover all available pages before exploring further.
// Note: Replace with your actual Run IDs
{
"run_ids": [
"12345",
"678910",
"112233"
]
}
[
12345: {
"output_url": "https://storage.example.com/audio/12345.wav"
},
678910: {
"output_url": "https://storage.example.com/audio/678910.wav"
},
112233: {
"output_url": "https://storage.example.com/audio/112233.wav"
}
]
curl -X POST "https://client.camb.ai/apis/text-to-sound-results" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"run_ids": [
"12345",
"678910",
"112233"
]
}'
// Example JavaScript code for handling the bulk response
const response = await fetch('/text-to-sound-results', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
run_ids: [
"12345",
"678910",
"112233"
]
})
});
const data = await response.json();
// Process each result
data.results.forEach(result => {
console.log(`Audio ready for ${result}: ${result.output_url}`);
// Download or process the audio file
});
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.
An array of unique positive integers, each representing the ID of a specific run. You must provide between 2 and 5 IDs, and all IDs must correspond to the same run type (e.g., all text-to-speech or all dubbing runs).
2 - 5 elements[12345, 6789]Successful Response
curl --request POST \
--url https://client.camb.ai/apis/text-to-sound-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'{
"1234": {
"output_url": "https://audio-storage.camb.ai/files/audio_1234.flac"
},
"5678": {
"output_url": "https://audio-storage.camb.ai/files/audio_5678.flac"
}
}