DocuMind AI — Intelligent PDF Analysis Engine API

🚀Turn any document into instant business insights.Upload PDFs, ask natural-language questions, and get precise, Gemini-powered answers. 💎 Project

Input

Send these Fields as input. A Field not listed here is refused.

input

Upload PDF

An https URL or an upload id.

  • Type: string
  • Required: yes
  • Length in characters: at least 1

input2

Upload 2 PDF(optionally)

An https URL or an upload id.

  • Type: string
  • Required: no

user_input

Ask DocuMind

  • Type: string
  • Required: yes
  • Length in characters: 2 to 500

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_331", {
  input: file("report.pdf"),
  input2: file("report.pdf"),
  user_input: "What is the absolute difference in total revenue between Q4 and Q3?\r\nWhat was the percentage growth in total revenue achieved in Q4 compared to Q3?\r\nBy how much did the revenue from the AI and Automation segment increase in Q4 compared to Q3 in absolute terms?\r\nWhat is the revenue share of the AI and Automation segment in the company's total revenue for each quarter (Q3 and Q4)? (Required calculation: $AI\\ Revenue / Total\\ Revenue$)",
});

for (const path of await run.save("output")) {
  console.log(path);
}

Python

from abysshub import Abyss, file

abyss = Abyss()

run = abyss.run("widget_331", {
    "input": file("report.pdf"),
    "input2": file("report.pdf"),
    "user_input": "What is the absolute difference in total revenue between Q4 and Q3?\r\nWhat was the percentage growth in total revenue achieved in Q4 compared to Q3?\r\nBy how much did the revenue from the AI and Automation segment increase in Q4 compared to Q3 in absolute terms?\r\nWhat is the revenue share of the AI and Automation segment in the company's total revenue for each quarter (Q3 and Q4)? (Required calculation: $AI\\ Revenue / Total\\ Revenue$)",
})

for path in run.save("output"):
    print(path)

cURL

curl https://api.abysshub.com/v1/widgets/widget_331/runs \
  -H "Authorization: Bearer $ABYSS_API_KEY" \
  -F input=@report.pdf \
  -F input2=@report.pdf \
  -F 'user_input=What is the absolute difference in total revenue between Q4 and Q3?
What was the percentage growth in total revenue achieved in Q4 compared to Q3?
By how much did the revenue from the AI and Automation segment increase in Q4 compared to Q3 in absolute terms?
What is the revenue share of the AI and Automation segment in the company'\''s total revenue for each quarter (Q3 and Q4)? (Required calculation: $AI\ Revenue / Total\ Revenue$)'

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

More

Keys, files, errors and limits: API access.