Skip to main content

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

  1. Find the staff member or student.
  2. Click the key icon.
  3. Choose the budget.
  4. Optionally enable automatic renewal.
  5. Optionally set a validity period.
  6. Click Save.

The API key is shown once. Copy the key immediately and share it securely with the user.

Key shown only once

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.

  1. Open the correct group.
  2. Click Create keys.
  3. Choose budget, automatic renewal and optionally a validity period.
  4. 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.