GET
/
dub-result
/
{run_id}
curl --request GET \
  --url https://client.camb.ai/apis/dub-result/{run_id} \
  --header 'x-api-key: <api-key>'
{
  "run_id": 123,
  "output_video_url": "<string>",
  "output_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.

Understanding Dubbing Results

When you request the results of a completed dubbing task, our system returns a comprehensive package including:

  • Dubbed Video: A complete video file with the original visuals and newly generated voiceover in your target language.
  • Dubbed Audio: An isolated audio track containing only the synthesized speech in your target language.
  • Complete Transcript: A detailed, time-coded transcript of the dubbed content with speaker identification.

This multi-format approach gives you flexibility in how you utilize and distribute your newly localized content across various platforms and use cases.

Accessing You Dubbed content

To retrieve your dubbing results, you’ll need the 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.

Example Request with Python

Here’s how to fetch your completed dubbing results using Python:

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")

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.

Path Parameters

run_id
integer
required

The unique identifier for the run, which was generated during the end to end dub creation process and returned upon task completion.

Response

200
application/json

Successful Response

The response is of type object.