π 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 comprehensive setup results for multiple localization projects in a single API call, streamlining project management in CAMB.AI Studio.
curl --request POST \
--url https://client.camb.ai/apis/project-setup-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'[
{
"run_id": 1,
"project_details": {
"project_name": "<string>",
"project_description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"source_language": 1,
"target_languages": [
1
],
"folder_id": 1,
"studio_url": "<string>"
}
}
]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.
import requests
from typing import Any
def 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 None
def 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 IDs
run_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")
run_ids by priority, language pairs, or deadlines to align with your teamβs workflow.run_ids in each request to ensure fast response times and manageable data 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.
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
1 - 5 elementsThe unique identifier for the run, which was generated during the Project setup process and returned upon task completion.
x >= 0Hide child attributes
This represents the human-readable project identifier you provided when creating the project setup. Think of this as the project's display name that appears throughout CAMB.AI Studio, helping your team quickly identify which content piece they're working with.
3 - 255This field contains the detailed project context you provided during setup, serving as documentation that travels with your project throughout its lifecycle. The description becomes particularly valuable when projects move between team members or when you return to work after time has passed.
3 - 5000This timestamp in UTC timezone marks the exact moment your project setup was initiated, providing crucial information for workflow coordination and project management.
This identifies the original language of your media content, representing one of the most critical configuration decisions that influences every subsequent processing step.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 139, 140, 141, 142, 143, 144, 145, 146, 148 This array contains all the languages you've requested for dubbing output, and each entry will be available in your CAMB.AI Studio project.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150 This optional field indicates the organizational folder where your project resides within your team's workspace structure. Think of this as your project's filing location within CAMB.AI Studio, helping maintain organized project management as your content library grows.
x >= 0This field contains the direct URL link to access your project within CAMB.AI Studio's web interface. Once your project setup is complete, this URL serves as the primary entry point for all creative work, allowing you and your team members to navigate directly to the project's workspace where you can review transcripts, adjust timing, refine translations, and manage the dubbing process.
curl --request POST \
--url https://client.camb.ai/apis/project-setup-results \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"run_ids": [
12345,
6789
]
}
'[
{
"run_id": 1,
"project_details": {
"project_name": "<string>",
"project_description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"source_language": 1,
"target_languages": [
1
],
"folder_id": 1,
"studio_url": "<string>"
}
}
]