For administrators
← All topics

Model API keys

Keys of the installation, the organisation and the mailbox, which one is used when, and a local model instead of the cloud.

Language models are paid for at their provider through an API key. draften keeps keys on three levels, and the assistant takes the nearest one.

Three levels

LevelWhereWho manages it
mailboxthe mailbox's page → API keys of the mailboxthe mailbox owner
organisationOrganisation → API keys of the organisationthe organisation's owners and managers
operator (default)Installation → Default API keysthe draften operator

An assistant without its own choice uses the inherited key: the nearest active key of the default API — the mailbox's first, then the organisation's, then the operator's. In the assistant's Settings → Models and keys a specific key and model can be chosen per task (triage, drafting, learning).

Providers

Adding a key

Choose the API, enter a name ("company Anthropic account", say) and the key (the whole one, sk-…). The key is stored encrypted and never shown again — the list shows only its ending. A key can be switched off, switched on and deleted; a key that an assistant names in its settings cannot be deleted (change it there first, or just switch the key off).

Storing keys requires the server to have MASTER_KEY set.

Costs

We recommend setting a monthly spend limit right at the provider (in the console for Anthropic) in case something loops. In draften, each assistant also has a daily cost cap — see Cost and caps.

Plain text version