Organizations
An organization is a billing tenant. It owns its own wallet, its own API keys, and its own usage ledger. Members of the org can call the gateway and have those calls attributed to the org's wallet rather than their personal one.
Creating an org
Dashboard β Organizations β Create. Pick a unique slug (it lives in the URL). The creator becomes the owner by default.
Attribution
There are two ways a call gets attributed to an org:
- Org-owned API key β keys created inside the org auto-attribute every call. No header required.
- Personal key +
X-DeepToken-Orgheader β pass the org slug. The caller must be a member.
Authorization: Bearer dtk_...
X-DeepToken-Org: my-org-slug
Wallet modes
Each org chooses one of two modes:
- Strict β Calls return
402 wallet_emptywhen the org wallet hits zero. Personal wallet is never charged. - Fallback β When the org wallet is empty, the caller's personal wallet picks up the bill. Useful for trial flows where you want to absorb overage from a runaway member.
The mode flips in real time from the org settings page; new calls land on the new mode immediately.
Members & roles
- Owner β Full control. Transfer ownership before leaving.
- Admin β Manage members, API keys, and billing. Cannot delete the org.
- Member β Make calls; view their own usage.
- Viewer β Read-only access to dashboards and audit log.
Every membership change writes an audit row.