Skip to content

For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see For full documentation content, see For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at

Universal-2 ​

For the complete documentation index, see llms.txt

Model ID: universal-2Description: Accurate, cost-effective transcription across 99 languages with low latency. Supports code switching and optional keyterms prompting for domain-specific vocabulary (up to 200 words). Supported regions: US and EU.

cURL quickstart:

bash
curl  \
  --header "Authorization: YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "audio_url": "",
    "speech_models": ["universal-2"]
  }'

Universal-2 offers accurate, cost-effective transcription across 99 languages with low latency. It supports code switching and optional keyterms prompting for domain-specific vocabulary (up to 200 words).

Key capabilities ​

  • 99 language support: Transcribe audio in 99 languages with high accuracy
  • Keyterms prompting: Improve recognition of up to 200 domain-specific terms, rare words, and proper nouns
  • Code switching: Handle audio that switches between languages

Supported languages ​

Quickstart ​

Get started with Universal-2 using the code below. This example transcribes a pre-recorded audio file using the Universal-2 model and prints the transcript text to your terminal.

Install the required library

bash
pip install requests

Create a new file main.py and paste the code below. Replace `` with your API key.

Run with python main.py.

python
import requests
import time

base_url = ""
headers = {"authorization": "<YOUR_API_KEY>"}

data = {
    "audio_url": "",
    "speech_models": ["universal-2"],
    "language_detection": True
}

response = requests.post(base_url + "/v2/transcript", headers=headers, json=data)

if response.status_code != 200:
    print(f"Error: {response.status_code}, Response: {response.text}")
    response.raise_for_status()

transcript_response = response.json()
transcript_id = transcript_response["id"]
polling_endpoint = f"{base_url}/v2/transcript/{transcript_id}"

while True:
    transcript = requests.get(polling_endpoint, headers=headers).json()
    if transcript["status"] == "completed":
        print(transcript["text"])
        break
    elif transcript["status"] == "error":
        raise RuntimeError(f"Transcription failed: {transcript['error']}")
    else:
        time.sleep(3)

Install the required library

bash
pip install "assemblyai>=1.0.0"

Create a new file main.py and paste the code below. Replace `` with your API key.

Run with python main.py.

python
import assemblyai as aai

aai.settings.api_key = "<YOUR_API_KEY>"

audio_file = ""

config = aai.TranscriptionConfig(
  speech_models=["universal-2"],
  language_detection=True,
)

transcript = aai.Transcriber().transcribe(audio_file, config)

print(transcript.text)

Install the required library

bash

Create a new file index.mjs and paste the code below. Replace `` with your API key.

Run with node index.mjs.

javascript
const baseUrl = "";
const headers = {
  authorization: "<YOUR_API_KEY>",
};

const data = {
  audio_url: "",
  speech_models: ["universal-2"],
  language_detection: true,
};

const url = `${baseUrl}/v2/transcript`;
let res = await fetch(url, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify(data),
});
if (!res.ok) throw new Error(`Error: ${res.status}`);
const response = await res.json();

const transcriptId = response.id;
const pollingEndpoint = `${baseUrl}/v2/transcript/${transcriptId}`;

while (true) {
  res = await fetch(pollingEndpoint, { headers });
  if (!res.ok) throw new Error(`Error: ${res.status}`);
  const transcriptionResult = await res.json();

  if (transcriptionResult.status === "completed") {
    console.log(transcriptionResult.text);
    break;
  } else if (transcriptionResult.status === "error") {
    throw new Error(`Transcription failed: ${transcriptionResult.error}`);
  } else {
    await new Promise((resolve) => setTimeout(resolve, 3000));
  }
}

Install the required library

bash
npm install assemblyai

Create a new file index.mjs and paste the code below. Replace `` with your API key.

Run with node index.mjs.

javascript
import { AssemblyAI } from "assemblyai";

const client = new AssemblyAI({
  apiKey: "<YOUR_API_KEY>",
});

const audioFile = "";

const params = {
  audio: audioFile,
  speech_models: ["universal-2"],
  language_detection: true,
};

const run = async () => {
  const transcript = await client.transcripts.transcribe(params);
  console.log(transcript.text);
};

run();