LeMUR

Summarize a transcript using LeMUR

POST
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.

Request

This endpoint expects an object.
answer_format
stringOptional
How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"
context
unionOptional
Context to provide the model. This can be a string or a free-form JSON value.
final_model
enumOptional
The model that is used for the final prompt after compression is performed. Defaults to "default".
Allowed values: defaultbasicassemblyai/mistral-7banthropic/claude-2-1
input_text
stringOptional

Custom 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.

max_output_size
integerOptional
Max output size in tokens, up to 4000
temperature
doubleOptional
The 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.
transcript_ids
list of stringsOptional

A 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.

Response

This endpoint returns an object
request_id
string
The ID of the LeMUR request
response
string
The response generated by LeMUR
POST
1curl -X POST https://api.assemblyai.com/lemur/v3/generate/summary \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "context": "This is an interview about wildfires.",
6 "final_model": "default",
7 "max_output_size": 3000,
8 "temperature": 0,
9 "transcript_ids": [
10 "47b95ba5-8889-44d8-bc80-5de38306e582"
11 ]
12}'
200
Successful
1{
2 "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
3 "response": "- Wildfires in Canada are sending smoke and air pollution across parts of the US, triggering air quality alerts from Maine to Minnesota. Concentrations of particulate matter have exceeded safety levels.\n\n- Weather systems are channeling the smoke through Pennsylvania into the Mid-Atlantic and Northeast regions. New York City has canceled outdoor activities to keep children and vulnerable groups indoors.\n\n- Very small particulate matter can enter the lungs and impact respiratory, cardiovascular and neurological health. Young children, the elderly and those with preexisting conditions are most at risk.\n\n- The conditions causing the poor air quality could get worse or shift to different areas in coming days depending on weather patterns. More wildfires may also contribute to higher concentrations.\n\n- Climate change is leading to longer and more severe fire seasons. Events of smoke traveling long distances and affecting air quality over wide areas will likely become more common in the future.\"\n"
4}