
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Quickly and easily connect to Mindee's API services using Node.js.
Here's the TL;DR of getting started.
First, get an API Key
Then, install this library:
npm install mindee
Finally, Node.js away!
const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";
// Init a new client
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
// Load a file from disk
const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext");
// Parse it on the API of your choice
const apiResponse = mindeeClient.parse(mindee.product.InvoiceV4, inputSource);
Note: Files can also be loaded from:
A base64 encoded string:
const inputSource = mindeeClient.docFromBase64(myInputString, "my-file-name.ext")
A byte sequence:
const inputSource = mindeeClient.docFromBytes(myInputBytes, "my-file-name.ext")
A stream:
const inputSource = mindeeClient.docFromStream(myReadableStream, "my-file-name.ext")
A buffer:
const inputSource = mindeeClient.docFromBuffer(myBuffer, "my-file-name.ext")
A URL (https
only):
const inputSource = mindeeClient.docFromUrl("https://my-url");
You can also load the document locally before sending it:
const inputSource = mindeeClient.docFromUrl("https://my-url");
await inputSource.init();
const localInputSource = inputSource.asLocalInputSource();
Note: Files hidden behind redirections are rejected by the server; this solution helps to circumvent that issue.
Region-Specific Documents use the following syntax:
const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext");
// The IdCardV1 product belongs to mindee.product.fr, not mindee.product itself
const apiResponse = mindeeClient.parse(mindee.product.fr.IdCardV1, inputSource);
Custom documents will require you to provide their endpoint manually.
const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";
// Init a new client
const mindeeClient = new mindee.Client({
apiKey: "my-api-key"
});
// Load a file from disk
const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext");
// Create a custom endpoint for your product
const customEndpoint = mindeeClient.createEndpoint(
"my-endpoint",
"my-account",
"my-version" // will default to 1 if not provided
);
// Parse it
const apiResponse = await mindeeClient
.enqueueAndParse(
mindee.product.GeneratedV1,
inputSource,
{
endpoint: customEndpoint
}
);
// Handle the response Promise
apiResponse.then((resp) => {
// print a string summary
console.log(resp.document.toString());
// individual pages (array)
console.log(res.document.inference.pages);
});
Options to pass when sending a file to be parsed.
Allows only sending certain pages in a PDF.
In this example we only send the first, penultimate, and last pages:
const apiResponse = mindeeClient.parse(
mindee.product.InvoiceV4,
inputSource,
{
pageOptions: {
pageIndexes: [0, -2, -1],
operation: mindee.PageOptionsOperation.KeepOnly,
onMinPages: 2
}
});
You can also take a look at the Reference Documentation.
Copyright © Mindee
Available as open source under the terms of the MIT License.
v4.29.0-rc1 - 2025-07-21
cutPdf()
in favor of applyPageOperations()
in LocalInputSource
FAQs
Mindee Client Library for Node.js
The npm package mindee receives a total of 4,671 weekly downloads. As such, mindee popularity was classified as popular.
We found that mindee demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.