๐ 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 result of a specific end to end dubbing run using the provided run_id.
curl --request GET \
--url https://client.camb.ai/apis/dub-result/{run_id} \
--header 'x-api-key: <api-key>'{
"video_url": "<string>",
"audio_url": "<string>",
"transcript": [
{
"start": 123,
"end": 123,
"text": "<string>",
"speaker": "<string>"
}
]
}Retrieve the completed results of your dubbing process with this endpoint. Once your dubbing task has finished processing, this API call provides access to the final dubbed media files along with a detailed transcript of the content. This allows you to seamlessly integrate the dubbed content into your applications, content management systems, or distribution platforms without requiring additional processing.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 that was provided when during the polling of your dubbing task. This identifier uniquely tracks your specific dubbing task through our processing pipeline.
import requests
import json
# Your API authentication
headers = {
"x-api-key": "your-api-key", # Replace with your actual API key
"Content-Type": "application/json"
}
def get_dubbing_result(run_id):
"""
Retrieves the complete results of a finished dubbing task.
Returns URLs to the final media files and a detailed transcript.
"""
try:
response = requests.get(
f"https://client.camb.ai/apis/dub-result/{run_id}",
headers=headers
)
# Verify the request was successful
response.raise_for_status()
# Extract the dubbing results
result_data = response.json()
print(f"Successfully retrieved dubbing results for Run ID: {run_id}")
print(f"Video URL: {result_data['output_video_url']}")
print(f"Audio URL: {result_data['output_audio_url']}")
print(f"Transcript contains {len(result_data['transcript'])} dialogue entries")
return result_data
except requests.exceptions.RequestException as e:
print(f"Error retrieving dubbing results: {e}")
if hasattr(e, 'response') and e.response is not None:
print(f"Response content: {e.response.text}")
return None
run_id = 12345 # Replace with your actual `run_id` from the dubbing request
dubbing_results = get_dubbing_result(run_id)
# Process the transcript if results were successfully retrieved
if dubbing_results and 'transcript' in dubbing_results:
print("\nTranscript Preview:")
for i, dialogue in enumerate(dubbing_results['transcript'][:3]): # Show first 3 entries
print(f"Speaker {dialogue['speaker']}: {dialogue['text']} [{dialogue['start']} - {dialogue['end']}]")
if len(dubbing_results['transcript']) > 3:
print("... and more dialogue entries")
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.
The unique identifier for the run, which was generated during the end to end dub creation process and returned upon task completion. The unique identifier for the run, which was generated during the creation process and returned upon task completion.
Successful Response
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 GET \
--url https://client.camb.ai/apis/dub-result/{run_id} \
--header 'x-api-key: <api-key>'{
"video_url": "<string>",
"audio_url": "<string>",
"transcript": [
{
"start": 123,
"end": 123,
"text": "<string>",
"speaker": "<string>"
}
]
}