The safest way to hand out LLM API keys to a team is to stop sharing one key. Give every employee a member account that signs in with their own email and creates their own keys, put members into departments, and cap spend at three levels — key, member and department — with monthly quotas that reset on a fixed billing day. In the HopBase console, all spend is drawn from the company balance and attributed to members and departments, and the Usage page filters by department and exports a CSV your finance team can allocate line by line. This guide walks through each step, who can do what, and which keys should go to people versus services.
Why one shared key breaks down
The problem with a shared key is not cost. It is that three basic things become impossible:
- No attribution: the bill is a single number, so you cannot allocate it by person or team;
- No ceiling: one runaway script can burn the whole month's budget;
- No clean revocation: when someone leaves or the key leaks, you revoke it and every workload stops at once.
Splitting access into members, departments and many keys fixes all three.
Step 1: Map your organisation
Before you click anything, answer three questions on paper:
- Which departments do you have (engineering, data, marketing, support) and who leads each one?
- Roughly how many US dollars per month does each department and each person spend?
- Which services call models without belonging to a person (a support bot, a nightly batch job, CI tests)?
The third answer decides which keys belong to members and which belong directly to a department.
Step 2: Create departments and set the billing day
- In the console, open Team → Departments and add each department.
- Set a department quota in USD — the spending cap for the current period. It is a limit, not a prepayment held from your balance; leave it blank for no cap. All members and keys in the department share it.
- Pick a monthly billing day (any day from the 1st to the 28th). Department and member monthly quotas reset on that day. A change takes effect from the next billing day; the current period is not cut short.
Setting the billing day on or just before your month-end close makes each period line up with one accounting cycle.
Step 3: Add members and assign quotas
- Go to Team → Members → Add member and enter a name, a sign-in email and an initial password. The member signs in with these and can change the password afterwards.
- Choose the member's department. Their spend also counts against the department quota.
- Enter a member quota in USD (required) and choose monthly reset or a one-time total. All of the member's keys and their workbench usage share this quota.
- Tick the allowed groups to limit which model plans this member can use; ticking none means they inherit all of the company's groups.
Once signed in, members create their own keys and can use the workbench and AI Chat. If you do not want members to see prices and discounts, you can hide pricing for members; they still see available resources, usage, quotas and balance.
One edge case to plan for: if member quotas in a department add up to more than the department quota, it is first come, first served. Once the department quota is used up, requests are rejected even for members who still have personal quota left. Requests without enough quota are rejected before processing with HTTP 402 insufficient_quota and are not charged. See the error code reference.
Step 4: Appoint department managers and enterprise admins
One owner managing dozens of people does not scale. Delegate with two roles:
- Department manager: set in the department's settings. Managers receive quota alerts for their department and its members, and can manage the members of their own department (add, edit, remove, adjust quota, disable, change groups). They cannot change the department quota, the billing period or the manager assignment itself.
- Enterprise admin: granted by the owner. Admins manage the team, departments, keys and usage with the same powers as the owner; spend still comes from the company balance. A good fit for your IT or platform lead.
Who can do what
| Action | Owner | Enterprise admin | Department manager | Member |
|---|---|---|---|---|
| Add, edit, remove or disable members | Whole company | Whole company | Own department only | — |
| Change member quotas and allowed groups | Whole company | Whole company | Own department only | — |
| Create, edit or delete departments; set department quota and manager | Yes | Yes | No | — |
| Set the billing day | Yes | Yes | No | — |
| Receive quota alerts for the department and its members | — | — | Yes | — |
| Create own keys, use the workbench and AI Chat | Yes | Yes | Yes | Yes (within member quota) |
Step 5: Keys for people vs keys for services
A key can belong to a member, or belong to no member and sit directly under a department. The rule of thumb:
| Use | Attach to | Recommended settings |
|---|---|---|
| Personal development, coding tools such as Claude Code or Cursor | The member (they create it) | Bound by the member quota; disabled with the member when they leave |
| Production services (support bot, internal apps) | No member, directly to a department | Own key quota, concurrency and IP list; one key per service |
| Batch jobs, CI tests | No member, directly to a department | Expiry date and a small quota so it stops on its own |
A key attached to a member follows that member's department; a key with no member counts against the department it is attached to. Each key can be configured on its own:
- Groups: each key holds 1–10 groups and can only call models in those groups.
GET /v1/modelsreturns the models a key can use (see the models reference); - Quota, expiry, IP list and concurrency: leave expiry blank for a key that never expires;
- Disable or revoke at any time without affecting other keys.
Every key shows who created it, and the server stores only a one-way hash. The OpenAI-compatible base URL is https://api.hop-base.com/v1; examples use sk-your-key.
Step 6: See spend per department and export it
- Open the Usage page and filter by date, key, member, department or key creator.
- Click Export CSV: up to 50,000 rows and 400 days per file. Columns include time, model, usage, official currency, official cost, discount, exchange rate, amount charged and notes.
- Every row can be recomputed: official cost × discount ÷ exchange rate = amount charged. Failed requests are not billed.
Add one more safeguard: set several low-balance alert thresholds on your available balance, so an email and an in-app notice go out before you run dry mid-month. For the full allocation method, read how to reconcile LLM API usage and allocate costs by department; for leaked keys and departing staff, see the API key leak and offboarding runbook.
Organisation changes, member changes, quota and permission changes and key operations are all recorded in the audit log, searchable by time and object. For bank transfer, invoices or enterprise settlement, contact the HopBase team at sales@hop-base.com.
Sign up for HopBase and create your first department
FAQ
How do I give each employee their own LLM API key without sharing one?
Add them as members under Team in the console with a sign-in email and an initial password. Each member signs in and creates their own keys; spend comes from the company balance and is attributed to that member and their department.
What happens if member quotas exceed the department quota?
First come, first served. When the department quota runs out, every member and key in that department is rejected before processing with HTTP 402 insufficient_quota until the next billing day, or until the owner raises the department quota.
How do I track AI usage by department?
Filter the Usage page by department and export the CSV. Each row carries official cost, discount, exchange rate and amount charged, so you can recompute it. Keys attached to a member count toward that member's department; keys with no member count toward the department they are attached to.