Summarize content from URLs, text & PDFs API
Give it a web address, a pasted text or a PDF, and get back a clean summary in markdown. Choose the length (brief, standard or detailed), the focus (key points
- Id:
widget_392 - Price: Ƀ 30 a run, plus the Call Price, Ƀ 0.1 an API run. Your first 100 API runs carry no Call Price.
- Widget page: Run it in your browser
- Docs: Call Abyss from your code
Input
Send these Fields as input. A Field not listed here is refused.
input_type
Input type: url, text or file (PDF)
- Type: string
- Required: yes
- Allowed values:
url,text,file
url
URL (for input type url)
- Type: string
- Required: no
- Length in characters: at most 2048
text_content
Text (for input type text)
- Type: string
- Required: no
- Length in characters: at most 30000
file_content
PDF (for input type file)
An https URL or an upload id.
- Type: string
- Required: no
summary_length
Summary length
- Type: string
- Required: no
- Allowed values:
brief,standard,detailed
focus
Focus
- Type: string
- Required: no
- Allowed values:
key_points,numbers_data,conclusions,action_items
language
Summary language
- Type: string
- Required: no
- Allowed values:
english,spanish,french,german
Run it
One call presses the Widget and answers the run once its status is succeeded or failed, however long it takes. The key is read from ABYSS_API_KEY. Install the library with npm install abysshub or pip install abysshub; cURL sends the Fields as a form.
JavaScript
// index.mjs
import Abyss, { file } from "abysshub";
const abyss = new Abyss();
const run = await abyss.run("widget_392", {
input_type: "file",
file_content: file("monetary20240131a1.pdf"),
summary_length: "standard",
focus: "numbers_data",
language: "english",
});
console.log(run.result);
for (const path of await run.save("output")) {
console.log(path);
}Python
from abysshub import Abyss, file
abyss = Abyss()
run = abyss.run("widget_392", {
"input_type": "file",
"file_content": file("monetary20240131a1.pdf"),
"summary_length": "standard",
"focus": "numbers_data",
"language": "english",
})
print(run.result)
for path in run.save("output"):
print(path)cURL
curl https://api.abysshub.com/v1/widgets/widget_392/runs \
-H "Authorization: Bearer $ABYSS_API_KEY" \
-F input_type=file \
-F file_content=@monetary20240131a1.pdf \
-F summary_length=standard \
-F focus=numbers_data \
-F language=englishA succeeded run carries its result and its output_files. Their URLs are signed for each read: re-read the run, never store a URL. A run still queued or running in the answer (after an hour, or when the API is busy) is read again at its Location with ?wait=true.
What it answers
The Example Run's result, the JSON the Widget wrote to output/output.json:
{
"content": "The Federal Reserve's **January 31, 2024** statement held the federal funds target range steady at **5-1/4% to 5-1/2%**, with the Committee stating it does not expect to cut rates until it has *greater confidence* that inflation is moving sustainably toward its **2%** objective. Economic activity is described as expanding at a solid pace, job gains have moderated since early 2023 but remain strong, and the unemployment rate remains low, while inflation has eased but is still elevated. The Committee judges that risks to its employment and inflation goals are moving into better balance, though the outlook is uncertain and it remains highly attentive to inflation risks. Balance sheet runoff continues, with a **$60 billion** monthly cap on Treasury securities redemptions and a **$35 billion** monthly cap on agency debt and MBS principal reinvestments. The implementing decisions set the interest rate on reserve balances at **5.4%**, the standing overnight repo minimum bid rate at **5.5%**, the reverse repo offering rate at **5.3%**, the repo aggregate limit at **$500 billion**, the reverse repo per-counterparty limit at **$160 billion per day**, and the primary credit rate at **5.5%**, all effective **February 1, 2024**. The decisions were unanimous among the Board of Governors, and the FOMC vote included **12** voting members led by Chair Jerome H. Powell."
}More
Keys, files, errors and limits: API access.