Install
npm install @talonic/nodeRequires Node.js 18 or newer. Zero runtime dependencies.
The package works with npm, yarn, pnpm, and bun. It ships ESM and CJS builds with full TypeScript declarations, so it integrates cleanly into any modern Node.js project without additional configuration.
The SDK relies on the built-in fetch available in Node.js 18+. If you are running an older Node.js version, pass a fetch polyfill (such as node-fetch) via the fetch constructor option.
# yarn
yarn add @talonic/node
# pnpm
pnpm add @talonic/node
# bun
bun add @talonic/nodeAfter installation the talonic CLI binary is available in your project. Run npx talonic --help to verify the install. The CLI mirrors the SDK's resource structure, so you can test your API key from the terminal before writing any code. If you installed globally with npm install -g @talonic/node, the talonic command is available directly without npx.
Get an API key (30 seconds)
Every user runs against their own Talonic workspace. Your documents and schemas are private to you.
- Sign up at app.talonic.com. Free tier: 50 extractions per day, no credit card.
- Settings → API Keys → Create New Key.
- Copy the
tlnc_value. - Set it as the
TALONIC_API_KEYenvironment variable, or pass it directly to the client constructor.
import { Talonic } from '@talonic/node'
const talonic = new Talonic({ apiKey: process.env.TALONIC_API_KEY! })
// Quick smoke test: check your credit balance
const balance = await talonic.credits.getBalance()
console.log(`Connected! Balance: ${balance.balance_credits} credits (${balance.tier} tier)`)The constructor validates that the apiKey is a non-empty string and that a fetch implementation is available. It throws a TypeError immediately if either check fails, so you will catch configuration problems at startup rather than on the first API call. The SDK does not validate the tlnc_ prefix or contact the server during construction; authentication errors surface on the first actual request as a TalonicAuthError with status 401 or 403.
# Set your API key
export TALONIC_API_KEY=tlnc_your_key_here
# Test the connection
npx talonic credits balance
# { "balance_credits": 1888, "tier": "pro", ... }tlnc_ values to version control.