curl --request POST \
--url https://api.assemblyai.com/lemur/v3/generate/summary \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"transcript_ids": [
"47b95ba5-8889-44d8-bc80-5de38306e582"
],
"context": "This is an interview about wildfires.",
"final_model": "anthropic/claude-3-5-sonnet",
"temperature": 0,
"max_output_size": 3000
}
'import requests
url = "https://api.assemblyai.com/lemur/v3/generate/summary"
payload = {
"transcript_ids": ["47b95ba5-8889-44d8-bc80-5de38306e582"],
"context": "This is an interview about wildfires.",
"final_model": "anthropic/claude-3-5-sonnet",
"temperature": 0,
"max_output_size": 3000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transcript_ids: ['47b95ba5-8889-44d8-bc80-5de38306e582'],
context: 'This is an interview about wildfires.',
final_model: 'anthropic/claude-3-5-sonnet',
temperature: 0,
max_output_size: 3000
})
};
fetch('https://api.assemblyai.com/lemur/v3/generate/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.assemblyai.com/lemur/v3/generate/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transcript_ids' => [
'47b95ba5-8889-44d8-bc80-5de38306e582'
],
'context' => 'This is an interview about wildfires.',
'final_model' => 'anthropic/claude-3-5-sonnet',
'temperature' => 0,
'max_output_size' => 3000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.assemblyai.com/lemur/v3/generate/summary"
payload := strings.NewReader("{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.assemblyai.com/lemur/v3/generate/summary")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assemblyai.com/lemur/v3/generate/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}"
response = http.request(request)
puts response.read_body{
"request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
"usage": {
"input_tokens": 27,
"output_tokens": 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"
}{
"error": "This is a sample error message"
}{
"error": "Authentication error, API token missing/invalid"
}{
"error": "Not found"
}{
"error": "Too Many Requests"
}{
"error": "Internal Server Error"
}Summarize a transcript using LeMUR
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.
curl --request POST \
--url https://api.assemblyai.com/lemur/v3/generate/summary \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"transcript_ids": [
"47b95ba5-8889-44d8-bc80-5de38306e582"
],
"context": "This is an interview about wildfires.",
"final_model": "anthropic/claude-3-5-sonnet",
"temperature": 0,
"max_output_size": 3000
}
'import requests
url = "https://api.assemblyai.com/lemur/v3/generate/summary"
payload = {
"transcript_ids": ["47b95ba5-8889-44d8-bc80-5de38306e582"],
"context": "This is an interview about wildfires.",
"final_model": "anthropic/claude-3-5-sonnet",
"temperature": 0,
"max_output_size": 3000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transcript_ids: ['47b95ba5-8889-44d8-bc80-5de38306e582'],
context: 'This is an interview about wildfires.',
final_model: 'anthropic/claude-3-5-sonnet',
temperature: 0,
max_output_size: 3000
})
};
fetch('https://api.assemblyai.com/lemur/v3/generate/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.assemblyai.com/lemur/v3/generate/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transcript_ids' => [
'47b95ba5-8889-44d8-bc80-5de38306e582'
],
'context' => 'This is an interview about wildfires.',
'final_model' => 'anthropic/claude-3-5-sonnet',
'temperature' => 0,
'max_output_size' => 3000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.assemblyai.com/lemur/v3/generate/summary"
payload := strings.NewReader("{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.assemblyai.com/lemur/v3/generate/summary")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assemblyai.com/lemur/v3/generate/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcript_ids\": [\n \"47b95ba5-8889-44d8-bc80-5de38306e582\"\n ],\n \"context\": \"This is an interview about wildfires.\",\n \"final_model\": \"anthropic/claude-3-5-sonnet\",\n \"temperature\": 0,\n \"max_output_size\": 3000\n}"
response = http.request(request)
puts response.read_body{
"request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
"usage": {
"input_tokens": 27,
"output_tokens": 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"
}{
"error": "This is a sample error message"
}{
"error": "Authentication error, API token missing/invalid"
}{
"error": "Not found"
}{
"error": "Too Many Requests"
}{
"error": "Internal Server Error"
}Authorizations
Body
Params to generate the summary
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.
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.
Context to provide the model. This can be a string or a free-form JSON value.
The model that is used for the final prompt after compression is performed.
anthropic/claude-3-5-sonnet, anthropic/claude-3-opus, anthropic/claude-3-haiku, anthropic/claude-3-sonnet, anthropic/claude-2-1, anthropic/claude-2, default, anthropic/claude-instant-1-2, basic, assemblyai/mistral-7b Max output size in tokens, up to 4000
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.
0 <= x <= 1How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"