he Get Bulk Project Setup Results endpoint is your go-to tool for managing multiple content localization projects with ease. By retrieving comprehensive setup results for multiple projects in a single API call, this endpoint empowers project managers, content creators, and automation workflows to stay on top of large-scale localization efforts in CAMB.AI Studio.
With this endpoint, you can:
Retrieve detailed setup results for multiple projects simultaneously.
Gain insights into project readiness, including status, duration, and language configurations.
Why Use This Endpoint?
This endpoint is a game-changer for teams managing multiple localization projects. It provides a unified view of your project portfolio, helping you coordinate tasks, allocate resources efficiently, and make data-driven decisions to keep your content pipeline on track.
Copy
import requestsfrom typing import Anydef fetch_bulk_story_results(run_ids: list[int]) -> dict[str, Any] | None: """ Retrieves multiple story conversion outputs in a single request Args: run_ids: List of unique run identifiers from story processing tasks Returns: List of story result dictionaries, or None if request fails """ headers = { "x-api-key": "your-api-key-here", "Content-Type": "application/json", } payload = {"run_ids": run_ids} try: response = requests.post( "https://client.camb.ai/apis/stories-results", headers=headers, json=payload, ) response.raise_for_status() results = response.json() print(f"Retrieved {len(results)} story results successfully") return results except requests.exceptions.HTTPError as e: print(f"Error {e.response.status_code}: {e.response.text}") return None except requests.exceptions.RequestException as e: print(f"Request failed: {e}") return Nonedef process_bulk_results(results: dict[str, Any]) -> None: """ Process and display bulk story results Args: results: List of story result dictionaries """ for i, run_id_key in enumerate(results, start=1): print(f"\n--- Story {i} ---") print(f"Main Audio: {results.get(run_id_key, {}).get('audio_url')}") print(f"Dialogue Track: {results.get(run_id_key, {}).get('dialogue_url')}") transcription = results.get(run_id_key, {}).get("transcription", {}) if transcription: print(f"Transcript entries: {len(transcription)}") first_entry = transcription[0] print( f"First line: [{first_entry['start']}-{first_entry['end']}ms] " f"{first_entry['speaker']}: {first_entry['text'][:50]}..." )# Example usage with multiple run IDsrun_ids_to_fetch = [9872, 9873, 9874, 9875, 9876]bulk_results = fetch_bulk_story_results(run_ids_to_fetch)if bulk_results: process_bulk_results(bulk_results) # Example: Save audio URLs for batch download audio_urls = [ bulk_results.get(result, {}).get("audio_url") for result in bulk_results ] print(f"\nExtracted {len(audio_urls)} audio URLs for batch processing")
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
Response
200
application/json
Successful Response
An array containing the results of one to five project setup runs. Each item in the array is an object that contains the project details.