File Conversion SDKs#
Official client libraries for the EnConvert file conversion API, currently available for Node.js / TypeScript as @enconvert/node-sdk on npm. Each SDK exposes the full conversion surface as type-safe methods, handles authentication, and includes built-in recovery for long-running conversions that exceed reverse-proxy timeouts by falling back to polling GET /v1/convert/status/{job_id}.
Available SDKs#
| Language | Package | Status | Source |
|---|---|---|---|
| Node.js / TypeScript | @enconvert/node-sdk |
Stable | enconvert/node-sdk |
Why use an SDK?#
Calling the REST API directly works, but the SDKs add several conveniences on top:
- Type-safe options. Editor autocomplete for every parameter, every endpoint.
- Automatic timeout recovery. Long conversions (heavy URL-to-PDF, large documents) sometimes exceed the 60-second reverse-proxy timeout. The SDKs generate a client-side
job_id, send it with the request, and transparently fall back to pollingGET /v1/convert/status/{job_id}if the original request returns 5xx, with no extra code on your side. - Streaming downloads. When you pass
saveTo, the SDK streams the response straight to disk with backpressure, so memory stays constant regardless of file size. - Consistent errors. A small hierarchy (
AuthenticationError,RateLimitError,APIError) lets youtry/catchwithout parsing status codes.
Get started#
- Node.js / TypeScript: Node 18+, zero runtime dependencies, dual ESM + CJS, full type definitions.
Get an API Key#
The SDK needs a private API key (sk_live_...). Generate one from the dashboard and pass it to the constructor. Never hardcode it in client-side code.
Frequently asked questions#
Is there a Node.js SDK for file conversion APIs?#
Yes. @enconvert/node-sdk is the official, stable Node.js / TypeScript client for the EnConvert API: Node 18+, zero runtime dependencies, dual ESM + CJS builds, and full type definitions.
Why use an SDK instead of calling the file conversion REST API directly?#
The SDKs add type-safe options with editor autocomplete, automatic timeout recovery for long conversions, streaming downloads to disk via saveTo, and a consistent error hierarchy (AuthenticationError, RateLimitError, APIError) so you can try/catch without parsing status codes.
How does the SDK handle conversions that exceed the reverse-proxy timeout?#
The SDK generates a client-side job_id, sends it with the request, and transparently falls back to polling GET /v1/convert/status/{job_id} if the original request returns 5xx, with no extra code on your side.
Can I mix SDK calls with raw HTTP requests?#
Yes. The SDK hits the same public REST endpoints documented on this site, so you can mix SDK calls and raw HTTP calls against the same project.
What API key does the SDK need?#
A private API key (sk_live_...), generated from the dashboard and passed to the constructor. Never hardcode it in client-side code.