New AssemblyAI-STT-3.7: Next-generation transcription models. Learn more about AssemblyAI-STT-3.7
Insights & Use Cases

Speech-to-text prompting with AssemblyAI-STT-3.7: prompt vs keyterms

Describe your audio and pin the words that matter. Here's how to prompt AssemblyAI-STT-3.7 on pre-recorded audio with prompt and keyterms_prompt, no fine-tuning required.

Abstract green half-sphere illustration

Written by

Martin Schweiger

Published on

12 August 2026

Most of the market assumes speech-to-text prompting doesn’t work: you either fine-tune a model or you live with whatever it hands back. With AssemblyAI-STT-3.7, you can describe your audio and list the words that must come back right, at request time, with no training run and no custom deployment. This guide shows how to prompt AssemblyAI-STT-3.7 on pre-recorded audio, when to use prompt versus keyterms_prompt, and how to send both in one request.

This is the guide for async (pre-recorded) prompting. If you’re transcribing files after the fact, such as meetings, calls, podcasts or clinical visits, you’re in the right place. If you’re prompting a live stream, read prompt engineering for real-time speech-to-text instead. For a deeper look at prompt wording itself, see how to get the most out of prompt engineering.

All the code below is in the companion repo: kelsey-aai/stt-3-7-prompting-examples.

Two prompting tools, and they work together

AssemblyAI-STT-3.7 (assemblyai-stt-3-7) is the flagship model for pre-recorded speech-to-text, with 32 languages and native code switching. It gives you two separate controls for adding context:

  • prompt: a natural-language description of what the audio is about, such as the domain, the scenario, or the full details of the conversation. It sets context. Formatting and behavioral instructions are ignored.
  • keyterms_prompt: an explicit list of up to 1,000 words or phrases (six words max per phrase) you want recognized and spelled exactly. Use it for names, SKUs, drug names and jargon.

Use prompt to tell the model what world the audio lives in, and keyterms_prompt to lock down the exact spellings inside that world.

promptkeyterms_prompt
What it isA plain-language description of the audioA list of words or phrases to spell exactly
LimitUp to 1,500 words (20–50 words is plenty for most audio)Up to 1,000 terms on AssemblyAI-STT-3.7, 200 on Universal-2; 6 words max per term
ModelsAssemblyAI-STT-3.7 onlyAssemblyAI-STT-3.7 and Universal-2
Price on AssemblyAI-STT-3.7$0.05/hr add-on$0.05/hr add-on
Best forDomain, scenario, who is speaking and about whatNames, product names, SKUs, drug names, jargon

Set up a Python 3.11 environment and install the SDK (version 1.10.1 or later includes the AssemblyAI-STT-3.7 model ID):

python3.11 -m venv .venv
source .venv/bin/activate
pip install "assemblyai>=1.10.1" python-dotenv
echo "ASSEMBLYAI_API_KEY=your_api_key_here" > .env

Here’s a contextual prompt on a two-second clip from a League of Legends pro interview. Without a prompt, the model hears “And so look who I’ve been a dear.” With the prompt “League of Legends roles,” it returns “In solo queue, I ban Azir.” (Both outputs are from the AssemblyAI prompting docs.)

"""Contextual prompting: describe what the audio is about."""

from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig

from _common import STT_3_7, get_api_key

# A 2-second clip from a League of Legends pro interview (from the AssemblyAI docs)
AUDIO_URL = "https://assembly.ai/prompt-8"

config = TranscriptionConfig(
    speech_models=[STT_3_7],
    language_detection=True,
    # Describe the audio, not how to format it. Formatting instructions are ignored.
    prompt="League of Legends roles",
)

transcriber = Transcriber(api_key=get_api_key(), config=config)
transcript = transcriber.transcribe(AUDIO_URL)

if transcript.status == "error":
    raise RuntimeError(f"Transcription failed: {transcript.error}")

print(f"Model used: {transcript.speech_model_used}")
print(transcript.text)

Every Python example imports a small helper file that loads your API key from .env, exits with a clear message if it’s missing, and checks keyterm lists against the API limits before you send them:

"""Shared setup for the AssemblyAI-STT-3.7 prompting examples."""

import os
import sys

from dotenv import load_dotenv

# The flagship pre-recorded model. prompt is only supported on this model.
STT_3_7 = "assemblyai-stt-3-7"


def get_api_key() -> str:
    """Read ASSEMBLYAI_API_KEY from the environment or a local .env file."""
    load_dotenv()
    api_key = os.environ.get("ASSEMBLYAI_API_KEY")
    if not api_key:
        sys.exit(
            "ASSEMBLYAI_API_KEY is not set. Copy .env.example to .env and add "
            "your key from the AssemblyAI dashboard."
        )
    return api_key


def check_keyterms(keyterms: list[str], limit: int = 1000) -> None:
    """Fail fast on lists the API would reject.

    AssemblyAI-STT-3.7 accepts up to 1,000 keyterms (Universal-2: 200),
    and each keyterm can be at most 6 words long.
    """
    if len(keyterms) > limit:
        raise ValueError(f"{len(keyterms)} keyterms; the limit is {limit}")
    for term in keyterms:
        if len(term.split()) > 6:
            raise ValueError(f"Keyterm has more than 6 words: {term!r}")

And here’s keyterms prompting on a name with unusual spelling. Without keyterms, the transcript reads “Kelly Byrne Donahue.” With keyterms_prompt=["Kelly Byrne-Donoghue"], it comes back as “Kelly Byrne-Donoghue.”

"""Keyterms prompting: pin the exact spelling of names and jargon."""

from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig

from _common import STT_3_7, check_keyterms, get_api_key

# A short clip with a name that is easy to misspell (from the AssemblyAI docs)
AUDIO_URL = "https://assemblyaiassets.com/audios/keyterms_prompting.wav"

keyterms = ["Kelly Byrne-Donoghue"]
check_keyterms(keyterms)

config = TranscriptionConfig(
    speech_models=[STT_3_7],
    language_detection=True,
    keyterms_prompt=keyterms,
)

transcriber = Transcriber(api_key=get_api_key(), config=config)
transcript = transcriber.transcribe(AUDIO_URL)

if transcript.status == "error":
    raise RuntimeError(f"Transcription failed: {transcript.error}")

print(f"Model used: {transcript.speech_model_used}")
print(transcript.text)

Two details to note. The auth header is your raw API key, with no Bearer prefix. And speech_models is a list: it names the models AssemblyAI may use, so you can add "universal-2" to cover all 99 languages. AssemblyAI-STT-3.7 takes priority wherever it appears in the list.

Keyterm prompting vs. natural-language prompting

People conflate these two, so here’s what each one does.

Keyterm prompting is targeted. When you pass keyterms_prompt=["Kelly Byrne-Donoghue"], you tell the model which spelling to prefer when it hears that name. The docs describe it as improving accuracy for those terms and for related variations or contextually similar phrases. It’s the right tool for proper nouns, product names, and anything where one wrong character makes the transcript wrong.

Natural-language prompting is contextual. When you pass prompt="League of Legends roles", you bias the model toward a domain, so it resolves ambiguous audio the way a listener who knows that domain would. It won’t force a specific spelling, but it nudges many borderline decisions in the right direction. The model stays grounded in the audio, so context that turns out to be irrelevant won’t cause hallucinated words.

A long keyterm list has costs of its own. Each word in a multi-word phrase counts toward the 1,000 limit, and capitalized and longer words use more capacity. For the failure modes of an overstuffed list, read when keyterm prompting backfires.

Test Prompting Without Writing Code

Add a description and a few key terms, then compare the transcripts. Try prompt and keyterms_prompt on your own audio in the playground.

Try playground

How to write a prompt for AssemblyAI-STT-3.7

Contextual prompts work at three levels of detail. Start with the least specific level that covers your audio, and add detail when the recording has uncommon names or terms the model can’t otherwise know.

LevelLengthWhat it containsExample
Domain2–5 wordsThe domain onlyMedical consultation call.
Scenario5–15 wordsWhat the conversation is aboutCardiology consultation about chest pain symptoms.
Detailed20–50 wordsFull description, including names, products, or identifiersCardiology consultation between Dr. Smith and an elderly patient regarding recurring chest pain, ECG results, and medication adjustment for hypertension.

Write plain, complete sentences that describe the audio, and keep it to one short block of text. Put lists of terms in keyterms_prompt rather than packing them into the prompt. The API accepts prompts of up to 1,500 words, but the docs’ guidance tops out at about 50 words for a detailed prompt. For more prompt patterns, including how context helps with code-switched audio, see code-switching and contextual prompting in action.

Use prompt and keyterms_prompt in one request

In production, you rarely write a prompt by hand. You build it from data you already have: the calendar title, the participant list, the CRM account, the ticket subject. The script below turns meeting metadata into a scenario-level prompt and a keyterm list, then sends both with speaker labels turned on.

"""Send a prompt and keyterms in one request, built per call from your own data.

Usage:
    python examples/combined_example.py path/or/url/to/audio.mp3
"""

import sys

from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig

from _common import STT_3_7, check_keyterms, get_api_key


def build_config(meeting: dict) -> TranscriptionConfig:
    """Turn metadata you already have (calendar, CRM, ticket) into context."""
    # Scenario-level prompt: plain sentences about what the audio is.
    prompt = (
        f"{meeting['title']}. A {meeting['type']} between "
        f"{' and '.join(meeting['participants'])} about {meeting['topic']}."
    )
    # Keyterms: the exact spellings that must come back right.
    keyterms = meeting["participants"] + meeting["products"]
    check_keyterms(keyterms)

    return TranscriptionConfig(
        speech_models=[STT_3_7],
        language_detection=True,
        prompt=prompt,
        keyterms_prompt=keyterms,
        speaker_labels=True,
    )


meeting = {
    "title": "Quarterly renewal review",
    "type": "customer call",
    "participants": ["Priya Raghunathan", "Tomasz Wieczorek"],
    "topic": "renewing the Northwind Analytics contract and adding seats",
    "products": ["Northwind Analytics", "InsightHub Pro", "SSO add-on"],
}

if len(sys.argv) != 2:
    sys.exit("Usage: python examples/combined_example.py <audio file or URL>")

config = build_config(meeting)
print(f"prompt: {config.prompt}")
print(f"keyterms_prompt: {config.keyterms_prompt}")

transcriber = Transcriber(api_key=get_api_key(), config=config)
transcript = transcriber.transcribe(sys.argv[1])

if transcript.status == "error":
    raise RuntimeError(f"Transcription failed: {transcript.error}")

print(f"Model used: {transcript.speech_model_used}")
for utterance in transcript.utterances or []:
    print(f"Speaker {utterance.speaker}: {utterance.text}")

Run it against any audio URL or local file:

cd examples
python combined_example.py https://assembly.ai/wildfires.mp3

The same request works over plain HTTP. This curl script submits the job and polls until it completes (it needs jq):

#!/usr/bin/env bash
# Submit a transcript with prompt + keyterms_prompt, then poll until it finishes.
# Requires curl and jq.
set -euo pipefail

if [ -z "${ASSEMBLYAI_API_KEY:-}" ]; then
  echo "ASSEMBLYAI_API_KEY is not set. Run: export ASSEMBLYAI_API_KEY=<your key>" >&2
  exit 1
fi

ID=$(curl -s https://api.assemblyai.com/v2/transcript \
  -H "authorization: $ASSEMBLYAI_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "audio_url": "https://assembly.ai/prompt-8",
    "speech_models": ["assemblyai-stt-3-7"],
    "language_detection": true,
    "prompt": "Post-match interview with a League of Legends pro player about champion bans and roles.",
    "keyterms_prompt": ["Azir", "solo queue"]
  }' | jq -r '.id')

echo "Transcript ID: $ID"

while true; do
  RESULT=$(curl -s "https://api.assemblyai.com/v2/transcript/$ID" \
    -H "authorization: $ASSEMBLYAI_API_KEY")
  STATUS=$(echo "$RESULT" | jq -r '.status')
  if [ "$STATUS" = "completed" ]; then
    echo "$RESULT" | jq -r '.text'
    break
  elif [ "$STATUS" = "error" ]; then
    echo "$RESULT" | jq -r '.error' >&2
    exit 1
  fi
  sleep 3
done

Does prompting improve accuracy?

Yes, on the audio where accuracy is hardest: short clips with little context, noisy recordings, and speech full of names and niche references. The two docs examples above show the pattern. A two-second clip that comes back as nonsense without context comes back correct with a three-word prompt, and a name that comes back misspelled comes back exactly right with one keyterm.

It works without fine-tuning. There’s no training run and no custom deployment, just a description of the audio and a list of terms sent with each request. That also means each request can carry different context, which a fine-tuned model can’t do.

The gain depends on your audio, so measure it on your own recordings. Transcribe a sample set with and without context and compare word error rate and the error rate on the terms you care about. Our guides on how accurate speech-to-text is and evaluating speech recognition models walk through the setup.

prompt vs keyterms_prompt: which should you use?

Usually both. In more detail:

  • Reach for prompt when the audio has a clear subject the model benefits from knowing: a cardiology consult, a fantasy-sports podcast, a mortgage call.
  • Reach for keyterms_prompt when exact spelling matters: clinician names, drug names, ticker symbols, internal product names.
  • Use them together whenever both conditions hold, which in real production audio is most of the time.
  • Use keyterms_prompt alone when Universal-2 transcribes the audio. prompt is supported only on AssemblyAI-STT-3.7, while keyterms work on both (up to 200 terms on Universal-2).

Prompting for specialized domains

Healthcare shows the payoff clearly. Medical Mode (domain="medical-v1") improves accuracy on generic and brand-name medication names, in English, Spanish, German and French. A prompt adds what Medical Mode can’t know: who is in the room and what this visit is about. Keyterms pin the clinician’s name and the drugs on the patient’s chart.

"""Medical Mode plus a prompt and keyterms for one clinical encounter.

Usage:
    python examples/medical_example.py path/or/url/to/visit.mp3
"""

import sys

from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig

from _common import STT_3_7, check_keyterms, get_api_key

if len(sys.argv) != 2:
    sys.exit("Usage: python examples/medical_example.py <audio file or URL>")

keyterms = ["Dr. Okafor", "lisinopril", "metoprolol", "atorvastatin"]
check_keyterms(keyterms)

config = TranscriptionConfig(
    speech_models=[STT_3_7],
    language_detection=True,
    # Medical Mode: tuned for generic and brand-name medication names
    domain="medical-v1",
    # This encounter's context
    prompt=(
        "Cardiology follow-up between Dr. Okafor and a patient about blood "
        "pressure readings and a change to hypertension medication."
    ),
    keyterms_prompt=keyterms,
    speaker_labels=True,
)

transcriber = Transcriber(api_key=get_api_key(), config=config)
transcript = transcriber.transcribe(sys.argv[1])

if transcript.status == "error":
    raise RuntimeError(f"Transcription failed: {transcript.error}")

for utterance in transcript.utterances or []:
    print(f"Speaker {utterance.speaker}: {utterance.text}")

Medical Mode is a $0.15/hr add-on. If you process protected health information, AssemblyAI offers a standard Business Associate Addendum (BAA). See AssemblyAI for medical transcription for more. The same pattern of describing the scenario and pinning the vocabulary carries over to legal, finance, and any field with dense proper nouns.

Add Context to Every Transcript

Describe the audio and pin the vocabulary at request time, with no fine-tuning. Get a free API key and send your first prompted request in minutes.

Sign up free

Moving from Universal-3.5 Pro to AssemblyAI-STT-3.7

Universal-3.5 Pro, the previous model this guide covered, was deprecated on November 17, 2026. If you already prompt it, the parameters carry over. Change the model ID and check a few behavior changes from the AssemblyAI-STT-3.7 migration guide:

  • Model ID: replace "universal-3-5-pro" with "assemblyai-stt-3-7" in speech_models. Keep "universal-2" in the list if you need languages AssemblyAI-STT-3.7 doesn’t support.
  • Fallback: with language_detection=True and only AssemblyAI-STT-3.7 in the list, there’s no fallback to another model. Add Universal-2 if you want one.
  • Disfluencies: AssemblyAI-STT-3.7 keeps filler words, repetitions and false starts by default. Set disfluencies=False to keep your old output.
  • Default model: from December 8, 2026, accounts that use Universal-3.5 Pro or Universal-3 Pro by default, without setting speech_models, move to AssemblyAI-STT-3.7 automatically.
  • Pricing: AssemblyAI-STT-3.7 is $0.21/hr. On this model, prompting and keyterms prompting are add-ons at $0.05/hr each. See pricing.

Async vs streaming: which prompting guide do you need?

The tools differ by surface, so pick the guide that matches what you’re building.

  • Async / pre-recorded (this guide): you have a file. Use prompt and keyterms_prompt on AssemblyAI-STT-3.7. The whole recording exists, so you can send full context up front.
  • Streaming / real-time: you have a live conversation and no complete file. The AssemblyAI-STT-3.7-Realtime and AssemblyAI-STT-3.7-Realtime-Agent models support keyterms prompting (up to 100 terms) and carry context forward from earlier turns. See the streaming prompting docs and keyterm prompting for real-time accuracy.

If you’re not sure which you’re building, ask whether you’re processing a recording or a live stream. That answer picks your guide.

Try it yourself

Clone the companion repo, add your API key to .env, and run the prompt and keyterms examples against the sample clips. Then point combined_example.py at your own recordings with your own metadata. If you’d rather experiment without code first, try prompting in the playground.

Prompt Your First AssemblyAI-STT-3.7 Transcript

AssemblyAI-STT-3.7 is $0.21/hr for pre-recorded audio, with prompt and keyterms_prompt available as add-ons. Grab a free API key and start building.

Sign up free

Frequently Asked Questions (FAQs)

Does prompting improve speech-to-text accuracy?

Yes, especially on short clips, noisy audio, and recordings full of names or niche terms. Passing a description of the audio with prompt and a list of terms with keyterms_prompt helps AssemblyAI-STT-3.7 resolve words it would otherwise mishear, with no fine-tuning. Measure the gain on a sample of your own audio.

Can I use prompt and keyterms_prompt in the same request?

Yes. On AssemblyAI-STT-3.7 you can send both: prompt describes the audio, and keyterms_prompt lists the exact spellings. Most production audio benefits from both.

How many keyterms can I pass on AssemblyAI-STT-3.7?

Up to 1,000 words or phrases, with a maximum of six words per phrase. Each word in a phrase counts toward the limit, and capitalized or longer words use more capacity, so the practical limit can be lower. Universal-2 accepts up to 200 keyterms, and the real-time models accept up to 100.

How long can a prompt be?

The API accepts up to 1,500 words in prompt, but most prompts work best short. The docs recommend 2–5 words for a domain, 5–15 words for a scenario, and 20–50 words for a detailed description with names and identifiers.

What does prompting cost on AssemblyAI-STT-3.7?

AssemblyAI-STT-3.7 is $0.21/hr for pre-recorded audio. Prompting and keyterms prompting are each a $0.05/hr add-on on this model. On Universal-2, keyterms prompting is included and prompt isn’t supported.

Can I control formatting through the prompt?

No. The prompt field sets context, and formatting or behavioral instructions in it are ignored. Use keyterms_prompt for spelling and dedicated parameters such as punctuate, format_text and disfluencies for output shape.