Migration Guide: From LeMUR to LLM Gateway

Learn how to migrate your existing LeMUR prompts to the new LLM Gateway

LeMUR will be deprecated on March 31st, 2026. Please migrate to the LLM Gateway before that date for continued access to language model capabilities with more models and better performance.

Overview

This guide helps you migrate from LeMUR to AssemblyAI’s LLM Gateway. While LeMUR was designed specifically for processing transcripts, LLM Gateway provides a more flexible, unified interface for working with multiple language models.

Key differences

FeatureLeMURLLM Gateway
PurposeTranscript-specific LLM tasksGeneral-purpose LLM interface
ModelsLimited model selection15+ models (Claude, GPT, Gemini)

Migration steps

Step 1: Replace transcript processing

Before (LeMUR): LeMUR automatically retrieved transcript text using transcript IDs.

After (LLM Gateway): You need to include the transcript text directly in your request.

1# LeMUR automatically fetched transcript content
2result = transcript.lemur.task(
3 prompt="What was the emotional sentiment of the phone call?",
4 final_model=aai.LemurModel.claude_sonnet_4_20250514
5)

Step 2: Update model names

LLM Gateway uses different model identifiers:

LeMUR ModelLLM Gateway Model
aai.LemurModel.claude_sonnet_4_20250514"claude-sonnet-4-20250514"
"anthropic/claude-sonnet-4-20250514""claude-sonnet-4-20250514"

Step 3: Modify response handling

Before: LeMUR returned a simple response object. After: LLM Gateway returns OpenAI-compatible response format.

1result = transcript.lemur.task(prompt)
2print(result.response) # Direct access to response text

Complete migration example

Here’s a complete example showing how to migrate a LeMUR sentiment analysis task:

1import assemblyai as aai
2
3aai.settings.api_key = "<YOUR_API_KEY>"
4
5# Step 1: Transcribe an audio file
6audio_file = "https://assembly.ai/call.mp4"
7transcriber = aai.Transcriber()
8transcript = transcriber.transcribe(audio_file)
9
10# Step 2: Apply LeMUR
11prompt = "What was the emotional sentiment of the phone call?"
12result = transcript.lemur.task(
13 prompt, final_model=aai.LemurModel.claude_sonnet_4_20250514
14)
15
16print(result.response)

Migration benefits

Moving to LLM Gateway provides several advantages:

More model choices

  • 15+ models including Claude 4.5 Sonnet, GPT-5, and Gemini 2.5 Pro
  • Better performance with newer, more capable models

Flexible input handling

  • Multi-turn conversations for complex interactions
  • Custom system prompts for better context control

Enhanced capabilities

  • Tool calling for function execution
  • Agentic workflows for multi-step reasoning
  • OpenAI-compatible API for easier integration

Next steps

After migrating to LLM Gateway, explore additional capabilities:

Need help?

If you encounter issues during migration:

  1. Check model availability - Ensure your chosen model is supported
  2. Verify API endpoints - LLM Gateway uses different URLs than LeMUR
  3. Update response parsing - Response format follows OpenAI standards
  4. Review token limits - Different models have different context windows

The LLM Gateway provides more flexibility and capabilities than LeMUR, but requires slightly more setup to include transcript content in requests.