Skip to Content
API ReferenceAuthentication

Authentication

The REST API authenticates with a workspace API key sent in the X-API-Key header. Keys look like:

pc_live_xxxxxxxxxxxxxxxxxxxx

Creating a key

  1. Sign in at imaginepdf.com .
  2. Open Settings → API Keys.
  3. Create a key (workspace admins only). Optionally set an expiration date.
  4. Copy the key immediately — it is shown only once. Only a hash is stored, so a lost key cannot be recovered; create a new one instead.

Treat API keys like passwords. They carry the full permissions of the workspace. Store them in a secret manager or environment variable — never in source control or client-side code.

Using a key

Send it on every request:

curl https://api.imaginepdf.com/api/v1/designs \ -H "X-API-Key: $IMAGINEPDF_API_KEY"

Scope

  • Workspace-scoped. A key acts within exactly one workspace. Designs, assets, credits, and batch jobs all belong to that workspace.
  • Plan-gated. API access itself is a plan feature (useApiKeys). If the workspace plan does not include it, key creation and all key routes return HTTP 403. See Credits & plans.

Authentication errors

HTTPerror.codeMeaning
401UNAUTHORIZEDNo key supplied.
401INVALID_API_KEYKey is malformed or does not exist.
401API_KEY_EXPIREDKey passed its expiration date.
403INSUFFICIENT_PERMISSIONSKey is valid but the workspace plan lacks the feature.

See Errors for the complete table.

Browser sessions use cookies and Bearer tokens; the public API and the Claude Code plugin use API keys. The two paths are independent — an API key is the only credential you need for everything in this reference.