Skip to main content

Installation

Use @markpdf/sdk when your project runs on Node.js, TypeScript, server routes, workers, CLIs, or any JavaScript runtime where the API key can stay server-side.

Install

Configure the API key

Set the key in your environment:
Then create the client:
You can also pass the key explicitly in server-only code:
Never put a private API key in browser code. For Next.js, use @markpdf/nextjs; for public React, Angular, Svelte, or mobile apps, call your own backend.

API endpoint

The production API endpoint is:
You normally do not need to set it manually; the SDK uses the production endpoint by default.

Next step

Continue with Quickstart.