🚀 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
Retrieves the results of multiple dubbing runs simultaneously using an array of run_id values
curl --request POST \
--url https://client.camb.ai/apis/dubbing-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'{
"1344": {
"video_url": "https://example.com/video/processed_123.mp4",
"audio_url": "https://example.com/audio/processed_123.mp3",
"transcript": [
{
"start": 0,
"end": 5000,
"text": "Hello, this is a sample transcript.",
"speaker": "Speaker 1"
}
]
}
}Efficiently retrieve the results of multiple dubbing tasks in a single API call. This bulk endpoint allows you to fetch completed dubbing results for multiple runs at once, making it ideal for applications that need to process large volumes of content or manage multiple dubbing projects simultaneously.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.
run_id values in the request payload. Each run_id uniquely identifies a specific dubbing task that was created through our dubbing pipeline.
{
"run_ids": [12345, 67890, 24680, 13579]
}
import requests
# Your API authentication
headers = {
"x-api-key": "your-api-key", # Replace with your actual API key
"Content-Type": "application/json",
}
def get_bulk_dubbing_results(run_ids):
"""
Retrieves the results of multiple dubbing tasks in a single request.
Returns a collection of dubbing results with media URLs and transcripts.
"""
payload = {"run_ids": run_ids}
try:
response = requests.post(
"https://client.camb.ai/apis/dubbing-results",
headers=headers,
json=payload,
)
# Verify the request was successful
response.raise_for_status()
# Extract the bulk dubbing results
results_data = response.json()
print(f"Successfully retrieved results for {len(results_data)} dubbing runs")
# Process each result
for key in results_data:
print(f"Run ID: {key}")
print(f"\nVideo URL: {results_data.get(key, {}).get('video_url')}")
print(f"\nAudio URL: {results_data.get(key, {}).get('audio_url')}")
print(f"\nTranscript entries: {len(results_data.get(key, {}).get('transcript', []))}")
return results_data
except requests.exceptions.RequestException as e:
print(f"Error retrieving bulk dubbing results: {e}")
if hasattr(e, "response") and e.response is not None:
print(f"Response content: {e.response.text}")
return None
# Example usage with multiple run IDs
run_ids = [41707, 40413] # Replace with your actual run IDs
bulk_results = get_bulk_dubbing_results(run_ids)
# Process successful results
if bulk_results:
print(f"\n{len(bulk_results)} runs completed successfully:")
for result in bulk_results:
run_id = result
transcript = bulk_results.get(run_id, {}).get("transcript", [])
if transcript:
print(f"\nRun ID {run_id} - Transcript Preview:")
for i, dialogue in enumerate(transcript[:2]): # Show first 2 entries
speaker = dialogue.get("speaker", "Unknown")
text = dialogue.get("text", "")
start = dialogue.get("start", "")
end = dialogue.get("end", "")
print(f" Speaker {speaker}: {text} [{start} - {end}]")
if len(transcript) > 2:
print(f" ... and {len(transcript) - 2} more dialogue entries")
video_url: URL to the dubbed video (if completed)audio_url: URL to the dubbed audio (if completed)transcript: Complete transcript with timing information (if completed)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
An object containing the results of one to five dubbing runs. Each key in the object is a unique identifier for a run, and the corresponding value is the result of the dubbing run.
Hide child attributes
Direct link to download the complete dubbed video file.
Direct link to download the isolated dubbed audio track.
Array of dialogue items containing speaker identification, timing information and textual transcript for each dialogue item.
Hide child attributes
The start time (in seconds) of the dialogue.
The end time (in seconds) of the dialogue.
The actual text content of the dialogue spoken by the speaker.
The name or identifier of the speaker delivering the dialogue.
curl --request POST \
--url https://client.camb.ai/apis/dubbing-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'{
"1344": {
"video_url": "https://example.com/video/processed_123.mp4",
"audio_url": "https://example.com/audio/processed_123.mp3",
"transcript": [
{
"start": 0,
"end": 5000,
"text": "Hello, this is a sample transcript.",
"speaker": "Speaker 1"
}
]
}
}