Pdffillr TypeScript SDK
The official TypeScript and JavaScript client library for the Pdffillr REST API. Install it, point it at your API key, and every endpoint is immediately accessible through a clean, fully-typed interface — no raw HTTP requests, no manual header management, no JSON parsing. Generated with Stainless.
import Pdffillr from '@pdffillr/sdk';
const client = new Pdffillr({
apiKey: process.env['PDFFILLR_API_KEY'], // This is the default and can be omitted
});
// That's it. Every API resource is available through the client.
await client.sdk.chat.sessions.create({ title: 'My first session' });1. What is the Pdffillr SDK?
The Pdffillr SDK is the official client library for the Pdffillr REST API, published for TypeScript and JavaScript. It is built for server-side and edge runtimes — Node.js services, serverless functions, Deno, Bun, Cloudflare Workers, and more — and gives you structured, strongly-typed access to every API resource through a predictable property chain on the client object.
Without the SDK, integrating the Pdffillr API means writing fetch calls, setting Authorization headers manually, deserialising JSON bodies, and maintaining your own error-handling wrappers. The SDK eliminates all of that. Authentication, request construction, response parsing, automatic retries, and configurable timeouts are handled internally — your code calls a method and receives a typed result.
2. When to Use the SDK
The SDK is the right choice whenever you need to interact with the Pdffillr API from a server-side TypeScript or JavaScript environment. Below are the most common scenarios where teams reach for it.
Your application exposes a REST or GraphQL API and needs to trigger Pdffillr sessions on behalf of your users - for example, when a user submits a form in your front-end, your backend calls sessions.create() and returns the session details.
An AWS Lambda function, a Vercel Serverless Function, or a Cloudflare Worker receives a webhook or a scheduled trigger and uses the SDK to create a session and begin processing a document.
A Node.js script or a CI job that programmatically processes a batch of documents - for example, pulling files from S3 and creating a Pdffillr session for each one - benefits from the SDK's type safety and clean error handling.
A Next.js or Remix application with server-side routes (not browser-side) that needs to trigger or monitor Pdffillr sessions as part of an internal workflow management tool.
3. How It Works
The SDK is a thin, typed wrapper around the Pdffillr REST API. When you call a method, the SDK constructs the correct HTTP request, attaches your API key, sends it over HTTPS, and resolves the returned Promise with a deserialised, fully-typed response object. You never write a fetch call or parse a JSON body manually.
Your application code calls a method like client.sdk.chat.sessions.create(). The method name, parameters, and return type are all defined by the SDK's TypeScript declarations.
Internally, the SDK constructs the HTTP request - method, URL, headers (including Authorization: Bearer <key>), and body - then sends it over HTTPS to the Pdffillr API.
The Pdffillr API processes the request and returns a JSON response. The SDK deserialises the body, applies the TypeScript type, and resolves the Promise with the typed object your code receives.
Explore the SDK
Each page below covers one aspect of the SDK in depth. Start with Installation if this is your first time, or jump directly to the topic you need.
Prerequisites, the npm install command, dotenv setup, module system support, and how to verify everything is working.
API key lifecycle — where to find your key, environment variable setup, per-environment keys, and zero-downtime rotation.
Your first request, the client.sdk.chat.sessions namespace, TypeScript type inference, and production-grade error handling with retry patterns.
Complete documentation for every endpoint, request parameter, response field, and status code in the Pdffillr REST API.
PDFFILLR.AI
The intelligent layer for modern fund
administration. Automating high-stakes
documentation with precision and speed.