Skip to main content

Overview

Convert spoken audio or video into accurate, timestamped text with speaker labels. The pipeline is asynchronous: submit a job with a local file or a public URL, poll until it completes, then retrieve the segmented transcript.

Prerequisites

1

Create an account

Sign up at CAMB.AI Studio if you haven’t already.
2

Get your API key

Go to Settings β†’ API Keys in Studio and copy your key. See Authentication for details.
3

Install the SDK

Skip this step if you’re using the direct API.
4

Set your API key to use in your code


Code

Transcribing a local file

Pass media_file instead of media_url to upload a local file:

Subtitle Formatting

By default, the transcript is segmented by natural speech patterns rather than by subtitle-length rules. Pass formatting_options to segment it into subtitle-ready cues instead:
  • max_segment_duration_in_seconds (default 7.0): the longest a single segment may stay on screen.
  • min_segment_duration_in_seconds (default 1.0): the shortest a single segment may stay on screen.
  • max_characters_in_segment (default 42): the maximum number of characters allowed in one segment.
Once the task succeeds, request the transcript as srt or vtt instead of the structured JSON by passing format_type (and optionally data_type) to the result call. The response then carries a single transcript string instead of a segment array:
Need subtitles translated into languages other than the source? Use the Subtitles tutorial. It runs the same segmentation across one or more target languages.

Parameters

Required

Optional

Result shape

get_transcription_result returns a TranscriptionResult with a transcript array. Each segment contains: When you pass format_type and/or data_type, the call instead returns a TranscriptExportResult with a single transcript string, either the rendered srt/vtt/txt content or a presigned URL to it.

Languages

The Python and TypeScript SDKs expect the Languages enum: If you’re calling the API directly (not via the SDK), pass the locale tag. Numeric language IDs still work but are deprecated.
For the full list of supported source languages, see the Source Languages reference.

Tips

  • Supported formats: .mp3, .wav, .aac, .flac, .mp4, .mov, and .mxf (MXF is enterprise-only). For best quality use a lossless format like WAV or FLAC.
  • File size: Uploaded files must be under 20 MB. For longer recordings, host the file and pass a media_url instead, or split the recording into chunks.
  • Polling timeout: For long media, cap your polling loop (e.g. 60 attempts x 5s = 5 minutes) and handle the timeout gracefully.
  • Pick the right language: Specifying the correct source language significantly improves accuracy. For multilingual content, choose the predominant language.

Next Steps

Create Transcription API

Full API reference for the transcription endpoint.

Poll Transcription Result

Status polling endpoint reference.

Get Transcription Run Result

Retrieve the transcript segments and timing data.

Subtitles

Generate cue-ready subtitles translated into one or more target languages.

Dubbing

Translate a video into another language while preserving the original voice.
Last modified on July 27, 2026