Create and store a key
Sign in to your DocKiln workspace, open Settings → API keys, and create a named key such asinvoice-worker. Copy the full value when it appears. DocKiln stores a hash, so a lost key requires a replacement.
Save the key server-side as DOCKILN_API_KEY. Set DOCKILN_URL to the origin of the instance that issued it. Keep the credential out of client-side JavaScript and URLs.
Verify workspace access
used, quota and resetsAt. This read creates no document. A 401 indicates a missing or invalid credential. A 403 on a settings endpoint means that operation requires a signed-in account session.