Skip to main content

LeMUR API reference

AssemblyAI's LeMUR (Leveraging Large Language Models to Understand Recognized Speech) is a framework to process audio files with an LLM.

Endpoints

POST/lemur/v3/generate/taskAsk LeMUR to use one or more transcripts with a custom Task to handle your customizable prompt.
POST/lemur/v3/generate/summaryGenerate a custom summary from one or more transcripts.
POST/lemur/v3/generate/question-answerCreate answers to one or more questions about one or more transcripts.
POST/lemur/v3/generate/action-itemsExtract action items from one or more meeting transcripts.
DELETE/lemur/v3/{request_id}Request deletion of a previously submitted LeMUR request.

Task

Use LeMUR to ask anything with a custom Task

transcript_idsstring[]NoN/ANoneA list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower. Use either transcript_ids or input_text as input into LeMUR.
input_textstringNoN/ANoneCustom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000. Use either transcript_ids or input_text as input into LeMUR.
promptstringYesN/ANoneYour text to prompt the model to produce a desired output, including any context you want to pass into the model.
final_modelstringNodefault, basic, anthropic/claude-2-1defaultThe model that is used for the final prompt after compression is performed.
max_output_sizeintNoN/A2000Max output size in tokens. Up to 4000 allowed.
temperaturefloatNoN/A0.0The temperature to use for the model. Higher values result in answers that are more creative, lower values are more conservative. Can be any value between 0.0 and 1.0 inclusive.

Example JSON:

{
"transcript_ids": ["abc-def-123", "def-abc-123"],
"prompt": "You are a helpful coach. Provide an analysis of the transcripts and offer areas to improve with exact quotes. Include no preamble. Start with an overall summary then get into the examples with feedback.",
"final_model": "basic"
}

Custom Summary

Custom Summary allows you to distill a piece of audio into a few impactful sentences. You can give the model context to obtain more targeted results while outputting the results in a variety of formats described in human language.

transcript_idsstring[]NoN/ANoneA list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower. Use either transcript_ids or input_text as input into LeMUR.
input_textstringNoN/ANoneCustom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000. Use either transcript_ids or input_text as input into LeMUR.
contextanyNoN/ANoneContext to provide the model. This can be a string or a free-form JSON value.
answer_formatstringNoN/ANoneHow you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"
final_modelstringNodefault, basic, anthropic/claude-2-1defaultThe model that is used for the final prompt after compression is performed.
max_output_sizeintNoN/A2000Max output size in tokens. Up to 4000 allowed.
temperaturefloatNoN/A0.0The temperature to use for the model. Higher values result in answers that are more creative, lower values are more conservative. Can be any value between 0.0 and 1.0 inclusive.

Example JSON:

{
"transcript_ids": ["abc-def-123", "def-abc-123"],
"context": "these are sales calls",
"answer_format": "bullet points",
"final_model": "basic"
}

Question & Answer

Question & Answer allows you to ask free-form questions about a single transcript or a group of transcripts. The questions can be any whose answers you find useful, such as judging whether a caller is likely to become a customer or whether all items on a meeting's agenda were covered.

transcript_idsstring[]NoN/ANoneA list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower. Use either transcript_ids or input_text as input into LeMUR.
input_textstringNoN/ANoneCustom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000. Use either transcript_ids or input_text as input into LeMUR.
questionsquestion[]YesN/ANoneA list of questions to ask. Question format listed below.
contextanyNoN/ANoneContext to provide the model. This can be a string or a free-form JSON value.
final_modelstringNodefault, basic, anthropic/claude-2-1defaultThe model that is used for the final prompt after compression is performed.
max_output_sizeintNoN/A2000Max output size in tokens. Up to 4000 allowed.
temperaturefloatNoN/A0.0The temperature to use for the model. Higher values result in answers that are more creative, lower values are more conservative. Can be any value between 0.0 and 1.0 inclusive.

Question

These are the fields to be used in the list of questions.

questionstringYesN/ANoneThe question you wish to ask. For more complex questions use default model.
contextanyNoN/ANoneAny context about the transcripts you wish to provide. This can be a string, or free-form JSON.
answer_formatstringNoN/ANoneHow you want the answer to be returned. This can be any text. Can't be used with answer_options. Examples: "short sentence", "bullet points"
answer_optionsstring[]NoN/ANoneWhat discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"]

Example JSON:

{
"transcript_ids": ["abc-def-123", "def-abc-123"],
"questions": [
{
"question": "Were the transcripts about politics?"
},
{
"question": "Were the policies related to taxes?",
"answer_options": ["yes", "no"]
}
],
"context": "this is a political meeting"
}

Action Items

Use LeMUR to generate a list of Action Items from a transcript

transcript_idsstring[]NoN/ANoneA list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower. Use either transcript_ids or input_text as input into LeMUR.
input_textstringNoN/ANoneCustom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000. Use either transcript_ids or input_text as input into LeMUR.
contextanyNoN/ANoneContext to provide the model. This can be a string or a free-form JSON value.
answer_formatstringNoN/ABullet PointsHow you want the action items to be returned. This can be any text.
final_modelstringNodefault, basic, anthropic/claude-2-1defaultThe model that is used for the final prompt after compression is performed.
max_output_sizeintNoN/A2000Max output size in tokens. Up to 4000 allowed.
temperaturefloatNoN/A0.0The temperature to use for the model. Higher values result in answers that are more creative, lower values are more conservative. Can be any value between 0.0 and 1.0 inclusive.

Example JSON:

{
"transcript_ids": ["abc-def-123", "def-abc-123"],
"context": "these are customer support calls",
"answer_format": "Bullet Points",
"final_model": "basic"
}

Request Deletion

Delete the data for a previously submitted LeMUR request. LLM response data, as well as any context provided in the original request will be removed.

request_idstringYesN/ANoneThe ID of the LeMUR request whose data you want to delete. This would be found in the response of the original request.

Example usage:

curl -X DELETE "https://api.assemblyai.com/lemur/v3/{request_id}" \
-H "Authorization: API_KEY"

Learn more