Authentication
Authenticate Pixmato API requests with workspace API keys.
Pixmato render API requests use workspace API keys as Bearer tokens.
Authorization: Bearer YOUR_API_KEY
Create an API key
- Open the Pixmato dashboard.
- Go to API keys.
- Create a key for the workspace.
- Store the secret in your server environment. Keys begin with
pxm_.
Server-side only
Do not expose API keys in browser JavaScript, mobile apps, static sites, or public repositories. Generate images from your server, job worker, or a trusted backend action.
What API keys can access
API keys are scoped to one workspace. They can:
- Generate single renders.
- Read workspace templates needed for rendering.
- Read render history and individual render logs for that workspace.
- Upload and list workspace assets.
- Read and manage Brand Assets colors.
API keys cannot:
- Create, update, delete, or clone templates.
- Manage API keys.
- Read or update workspace settings.
- Use dashboard-only provider integrations such as Unsplash search.
- Read billing and usage summaries.
Example
const response = await fetch('https://api.pixmato.com/v1/renders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PIXMATO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
template: 'YOUR_TEMPLATE_ID',
modifications: {
headline: 'Weekly revenue clarity',
},
output: {
format: 'png',
scale: 2,
},
}),
})
Revoke a key
Revoke old or exposed keys from the dashboard. Key management endpoints require a dashboard session and do not accept API-key authentication.