Managing API keys
On the Coding page, you manage API keys for staff and students. An API key gives access to the OpenAI-compatible Coding endpoint of AI-School.
Users use this key in an external programming tool, such as Aider or OpenCode.
Staff and students
The Coding page has separate tabs for:
- Staff
- Students
Students are grouped by group. Staff are shown within the allowed school scope.
A user must have a linked account before a key can be created.
Create a key
- Find the staff member or student.
- Click the key icon.
- Choose the budget.
- Optionally enable automatic renewal.
- Optionally set a validity period.
- Click Save.
The API key is shown once. Copy the key immediately and share it securely with the user.
After closing the window, AI-School cannot show the full API key again. If the key is lost, revoke the old key and create a new one.
Set a budget
Each key has a budget in US dollars. This matches how model costs are calculated.
You can:
- set a budget per key
- enable automatic renewal after usage
- revoke the key when it is no longer needed
The list shows how much budget has been used per user.
Set a validity period
You can limit a key with a start date and end date.
This is useful for lessons or temporary projects. For example:
- start: today at 10:00
- end: today at 11:00
The key only works within that time window. Outside the window, the key is rejected.
Create keys for a group
For students, you can create keys for an entire group at once.
- Open the correct group.
- Click Create keys.
- Choose budget, automatic renewal and optionally a validity period.
- Confirm creating the keys.
After creation, a document with the created keys opens automatically. Download or save this document immediately, because the full keys cannot be shown again later.
Revoke keys
Revoking a key means that the user can no longer use that key.
You can:
- revoke one key for a user
- revoke keys collectively for a group
AI-School asks for confirmation before keys are revoked.
Reporting and control
Usage through Coding is logged. This allows administrators to see:
- who uses the key
- how many requests were made
- how much cost was incurred
- which chats were created through the key
This helps keep programming lessons and projects manageable.