---
title: "TIL: Deepgram keyterm prompting for accurate transcription"
description: Improve transcription accuracy for specialised terminology, product names, and technical jargon using Deepgram's keyterm prompting.
canonical: https://lukeocodes.dev/til-deepgram-keyterm-prompting
type: article
locale: en_GB
published: 2026-06-02T00:00:00.000Z
modified: 2026-06-02T00:00:00.000Z
authors:
  - Luke Oliff
section: TIL
tags:
  - TIL
  - Speech-to-Text
  - APIs
feed: https://lukeocodes.dev/rss.xml
search: https://lukeocodes.dev/search.json?q={query}
schema:
  - "@context": https://schema.org
    "@graph":
      - "@type": Organization
        "@id": https://ably.com/#organization
        name: Ably
        url: https://ably.com
      - "@type": WebSite
        "@id": https://lukeocodes.dev/#website
        url: https://lukeocodes.dev
        name: Luke Oliff
        alternateName: lukeocodes
        inLanguage: en
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
        description: Personal blog and writing by Luke Oliff — developer relations, voice AI, developer experience.
        potentialAction:
          - "@type": SearchAction
            target:
              "@type": EntryPoint
              urlTemplate: https://lukeocodes.dev/blog/search?q={search_term_string}
            query-input: required name=search_term_string
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Staff engineer and Staff Tech Lead for Developer Experience at Ably. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Staff Tech Lead, Developer Experience
        worksFor:
          "@id": https://ably.com/#organization
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
  - "@context": https://schema.org
    "@graph":
      - "@type": Organization
        "@id": https://ably.com/#organization
        name: Ably
        url: https://ably.com
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Staff engineer and Staff Tech Lead for Developer Experience at Ably. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Staff Tech Lead, Developer Experience
        worksFor:
          "@id": https://ably.com/#organization
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
      - "@type": BlogPosting
        "@id": https://lukeocodes.dev/til-deepgram-keyterm-prompting#article
        headline: "TIL: Deepgram keyterm prompting for accurate transcription"
        alternativeHeadline: "TIL: Deepgram keyterm prompting for accurate transcription"
        description: Improve transcription accuracy for specialised terminology, product names, and technical jargon using Deepgram's keyterm prompting.
        datePublished: 2026-06-02T00:00:00.000Z
        dateModified: 2026-06-02T00:00:00.000Z
        url: https://lukeocodes.dev/til-deepgram-keyterm-prompting
        mainEntityOfPage: https://lukeocodes.dev/til-deepgram-keyterm-prompting
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: TIL, Speech-to-Text, APIs
        articleSection: TIL
        about:
          - "@type": Thing
            name: Speech-to-Text
        abstract: "TIL Tuesday: Deepgram's keyterm parameter is a single query string addition that tells the STT model to listen harder for specific words. I spent months watching transcripts mangle company names and technical terms before I started using it. The fix was one parameter I should have added on day one."
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/blog/til-deepgram-keyterm-prompting/hero.png
        wordCount: 871
        timeRequired: PT5M
        publisher:
          "@id": https://ably.com/#organization
      - "@type": BreadcrumbList
        itemListElement:
          - "@type": ListItem
            position: 1
            name: Home
            item: https://lukeocodes.dev
          - "@type": ListItem
            position: 2
            name: Writing
            item: https://lukeocodes.dev/blog
          - "@type": ListItem
            position: 3
            name: "TIL: Deepgram keyterm prompting for accurate transcription"
            item: https://lukeocodes.dev/til-deepgram-keyterm-prompting
---

[Luke Oliff.](/)

- [Blog](/blog)
- [CV](/cv)
- [Uses](/uses)
- [User manual](/user-manual)
- [Living with ADHD](/living-and-working-with-adhd)
- [RSS](/rss.xml)

[Luke Oliff · Writing](/blog)

# TIL: Deepgram keyterm prompting for accurate transcription

Jun 2026 · [TIL](/blog/category/til) · 5 min read · [Luke Oliff](/authors/luke)

TIL Tuesday: Deepgram's `keyterm` parameter is a single query string addition that tells the STT model to listen harder for specific words. I spent months watching transcripts mangle company names and technical terms before I started using it. The fix was one parameter I should have added on day one.

The `keyterm` parameter biases the model toward the words you pass. Product names, acronyms, industry jargon, unusual surnames, anything the generic model would guess instead of transcribe correctly. No retraining, no custom vocabulary upload, just a list of terms in the query string.

```bash
curl -X POST "https://api.deepgram.com/v1/listen?model=nova-3&keyterm=Deepgram&keyterm=Nova-3" \
  -H "Authorization: Token YOUR_DEEPGRAM_API_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @audio.wav
```

## How keyterm prompting is different from legacy keywords

If you used Deepgram before Nova-3, you probably used `keywords` with a weight syntax like `keywords=term:2`. That feature still works on older models. Keyterm prompting is a different system with different rules.

Keyterm prompting does not accept weights. The old `keywords=acme:5` syntax is silently accepted but the weight is ignored. The whole string gets treated as a literal keyterm, so `acme:5` would try to boost the literal string "acme:5". This caught me out the first time I migrated.

Keyterm prompting supports up to 500 tokens per request, which is roughly 100 words or phrases. Each phrase is one parameter. For multi-word phrases you join the words with `%20` or `+` in the URL:

```bash
curl -X POST "https://api.deepgram.com/v1/listen?model=nova-3&keyterm=customer%20service&keyterm=account%20number" \
  -H "Authorization: Token YOUR_DEEPGRAM_API_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @audio.wav
```

Multiple keyterms go as repeated `keyterm` parameters. Do not separate them with commas or semicolons. The API accepts them without error but treats the whole string as one term, which silently does nothing.

## When keyterm prompting actually matters

The difference shows in the edge cases. A generic STT model hears "I work at DPG" when the speaker said "I work at Deepgram." It hears "let me check the TOS" when they said "let me check the TTS." These are not model failures. They are the model optimising for the most probable word given the acoustic signal, and the most probable word is not always the right one.

I saw this constantly in Deepgram's Discord. A developer integrating a voice agent for a pharmacy would get "CVS" transcribed correctly but "Walgreens" would come back as "wall greens" or "wall greens." Not because the model had a problem with the audio. Because "Walgreens" is a proper noun the model had heard fewer times in training than the phonetic alternatives.

Keyterm prompting solves that without retraining. You pass `keyterm=Walgreens` in the query string and the model adjusts its decoder bias toward that sequence of phonemes. The same audio that produced "wall greens" now produces "Walgreens."

## Using keyterm prompting with the Deepgram SDK

The same parameter is available through the SDKs. In Python:

```python
from deepgram import DeepgramClient

client = DeepgramClient(api_key="YOUR_API_KEY")

with client.listen.v1.connect(
    model="nova-3",
    keyterm=["Deepgram", "Nova-3", "keyterm prompting"]
) as connection:
    connection.on(EventType.MESSAGE, lambda msg: print(msg))
    connection.start_listening()
```

The SDK accepts keyterms as a list of strings. The parameter name is `keyterm` (singular), not `keyterms`. I made that mistake and spent ten minutes wondering why nothing changed.

## The limits and gotchas

Keyterm prompting works with Nova-3 and Flux models. It does not work with Nova-2 or older models. If you are on an older model and try it, the API returns a "Bad Request" error: "The selected model does not support keyterm prompting."

The 500-token limit covers all keyterms combined, not per term. If you need more than that, you need a different strategy. For most use cases 500 tokens is plenty. A pharmacy voice agent might need 30 or 40 drug names. A legal transcription service might need 60 or 70 case names and legal terms. Both fit easily.

Dynamic keyterm updates are a Flux-only feature. With Flux you can send a Configure message mid-stream to swap keyterms as the conversation context changes. With Nova-3 the keyterm list is fixed at connection time.

### FAQ

**What is Deepgram keyterm prompting?**

Keyterm prompting is a query parameter on Deepgram's STT API that biases the model toward specific words and phrases. You pass a list of terms and the model prioritises them during decoding, improving accuracy for proper nouns, jargon, and domain terminology without retraining.

**How do I use keyterm prompting?**

Add `keyterm=TERM` to your API request URL. For the REST API it goes in the query string. For streaming it is a connection parameter. Multiple terms use repeated `keyterm` parameters. The feature is available on Nova-3 and Flux models.

**How is keyterm different from the old keywords feature?**

Keywords accepted weights like `keywords=term:5` to control bias intensity. Keyterm prompting does not support weights. It also uses a different internal mechanism that integrates with the decoder rather than reranking hypotheses. If you pass a weight with keyterm, it is silently ignored.

**Can I update keyterms mid-stream?**

With Flux, yes. Send a Configure control message over the WebSocket with a new keyterm list. With Nova-3, no. The keyterm list is locked at connection time.

**What is the keyterm limit?**

500 tokens total across all keyterms in a single request. Roughly 100 words or phrases. If you exceed the limit the API returns an error.

[← Newer: TIL: Encoding Files as Base64 in the Terminal](/til-base64-inline-audio)

[All posts](/blog) →

## Search this site

`GET https://lukeocodes.dev/search.json?q=<words>` returns matching posts as JSON, each with its page URL and its markdown URL. Add `&limit=<1-50>` for more than 10. How it works: [/blog/search](https://lukeocodes.dev/blog/search.md).

```sh
curl "https://lukeocodes.dev/search.json?q=developer+relations"
```

---

© 2026 Luke Oliff. Posts live at the root of this site.

- [GitHub](https://github.com/lukeocodes)
- [LinkedIn](https://www.linkedin.com/in/lukeocodes)
- [X](https://x.com/lukeocodes)
- [Bluesky](https://bsky.app/profile/lukeocodes.dev)
- [Email](mailto:luke@lukeoliff.com)
- [RSS](/rss.xml)

## Cookies

This site sets one analytics cookie, from Google Analytics, and only in a browser that accepts the cookie banner. A client that does not run scripts sets no cookies, so there is nothing to accept or decline here.

[Cookie policy](/cookies)
