Docs
SDK (NPM package)
A small TypeScript client for the browser and Node.js, with types for every response field.
Install
npm install @seeqr/clientDecode an image on the server
import { Seeqr } from "@seeqr/client";
const seeqr = new Seeqr({ apiKey: process.env.SEEQR_API_KEY! });
const result = await seeqr.scan({ imageUrl: "https://example.com/ticket.png" });
if (result.safety.level === "danger") {
throw new Error("Refusing to follow a high-risk QR destination");
}
console.log(result.decoded);Decode locally in the browser
The local decoder needs no API key and never uploads the image.
import { decodeLocal } from "@seeqr/client/browser";
const input = document.querySelector("input[type=file]") as HTMLInputElement;
input.addEventListener("change", async () => {
const file = input.files?.[0];
if (!file) return;
const { decoded } = await decodeLocal(file);
console.log(decoded);
});Good to know
- Ships ESM and CJS builds with full TypeScript types
- No native dependencies - runs in edge runtimes and workers
- Errors are typed, so you can branch on no_code_found vs rate_limited
- Keep server keys server-side; use decodeLocal for anything client-facing