Authentication
Every request needs a Pendra API key, which starts with
pdr_sk_. Each key belongs to one organisation.
Create a key
In the
console,
open API Keys and choose Create API key.
The key is shown once, so save it straight away in your secret manager.
A key with the keys:write permission can also
create keys from code.
Send the key
Send it as a bearer token in the Authorization header:
curl https://api.pendra.ai/api/v1/chat/completions \
-H "Authorization: Bearer pdr_sk_..." \
-H "Content-Type: application/json" \
-d '{"model":"qwen3.6:27b","messages":[{"role":"user","content":"Hello"}]}'
The Anthropic-compatible /v1/messages, the
Responses endpoint and
/v1/models also accept it in an x-api-key
header, which is how Anthropic clients send it.
Key permissions
You choose what a key can do when you create it. The console shows a grid with a Read and a Write box for each area, and write includes read. A new key can call models and list them, and nothing else.
For a key that only looks after your setup, such as a monitoring script or
a deploy tool, choose Clear and tick what it needs. A key
without inference:write can't call models.
| In the console | Permission | Lets the key | Default |
|---|---|---|---|
| Inference | inference:write |
Call every model | On |
| Models | models:read |
List models, and check which fit a worker | On |
| Usage | usage:read |
Read usage logs, requests in progress and throughput | Off |
| Workers, read | workers:read |
Read worker status, events and power | Off |
| Workers, write | workers:write |
Change worker and model settings, and install or remove models | Off |
| GPU rental, read | compute:read |
See the GPUs you can rent, your instances and spend | Off |
| GPU rental, write | compute:write |
Rent and stop GPUs, which spends money | Off |
| API keys, read | keys:read |
List your organisation's keys | Off |
| API keys, write | keys:write |
Create, rotate and revoke keys | Off |
-
Ticking
workers:writeticksmodels:readtoo, since installing a model starts with the model list. It only works on a key created by an owner or operator. See User roles. -
keys:writelets a key create keys only with permissions it has itself, expiring no later than it does. See Managing API keys. - Permissions can't be changed after a key is made. Create a new key with the ones you need, then revoke the old one.
- Keys made before permissions existed can do everything except manage API keys.
A key without the permission a request needs gets a 403
that names it, for example
API key is missing the required scope: usage:read.
Rotate or revoke a key
If a key may have leaked, rotate it with the rotate button next to it. It gets a new secret, shown once, and the old one stops working at once. Its name, permissions, expiry and settings stay the same, so you only need to update the secret where it's used. If the key can manage keys, also deal with any keys it touched that you don't recognise. The list marks them "Made by" or "Rotated by" it.
To revoke a key, use its ⋯ menu. Revoking takes effect at once, and the key's usage history stays. You can do both from code too, see Managing API keys.
A key whose creator has left your organisation shows a warning. It keeps working for inference until you revoke it or it expires, but it can no longer reach usage, workers, GPU rental or other keys.
Things only the console can do
Billing, approving or removing workers, GPU rental budgets, and renaming a
key or changing its content filtering need a signed-in console session. Calling them with an API key gets
a 403 saying so, whatever the key, so test a key on an
endpoint it can use, such as /models, or
/api/v1/workers for a key without Inference that can see
workers.