Installation and setup
Install the Publiq SDK for Node.js, Python or PHP, create your API key and validate the setup with a first call.
1. Install the SDK
The official SDKs are the recommended way to use Publiq — they bring types, automatic retries and idempotency. Install for your language:
npm install publiqpnpm add publiqyarn add publiqpip install publiqcomposer require publiq/publiq2. Create your API key
In the dashboard, go to Settings → API Keys and generate a key. Keys have a scope (full or read-only) — use full to send. Store it securely: it is shown only once.
3. Configure the environment
The SDK reads the PUBLIQ_API_KEY environment variable automatically. Set it in your server environment (.env, provider secrets, etc.):
PUBLIQ_API_KEY=pk_live_xxxxxxxxxxxxxxxx4. Validate the setup
Make a read call to confirm the key works (sends nothing):
import { Publiq } from 'publiq';
const publiq = new Publiq(process.env.PUBLIQ_API_KEY);
const { data } = await publiq.templates.list();
console.log('OK —', data.length, 'templates');curl https://api.publiq.digital/v1/templates \
-H "Authorization: Bearer $PUBLIQ_API_KEY"The Node SDK is written in TypeScript and ships types for every parameter and response — editor autocomplete guides you. Next: Quickstart.