Enterprise Documentation

AiKey Server Quickstart

A secure intranet control plane for managing upstream AI providers, seats, and virtual keys in bulk.

Prerequisites

  • OS: Linux on amd64 / arm64. Verified on Rocky Linux 9, CentOS Stream 9, and Ubuntu 22.04.
  • Container: Docker + Docker Compose plugin v2 (legacy standalone not supported).
  • Auth: GitHub CLI (gh) authenticated to download from private repos.

Server Administrator Flow

0. Install

Run these commands to authenticate and execute the installer:

gh auth login export GITHUB_TOKEN=$(gh auth token) gh release download v1.0.0-rc.3 -R aikeylabs/launch-master -p 'server-install.sh' -D /tmp sh /tmp/server-install.sh --version v1.0.0-rc.3 --yes

1. Log in to the Control Panel

Open http://SERVER_IP:3000 in your browser. Use default credentials:

Field Default Value
Email admin@aikey.local
Password Admin123456!

2-4. Core Setup Workflow

2. Provider Accounts

Add organizational credentials (Claude, OpenAI, Kimi) that will serve as the upstream backends.

3. Invite Seats

Batch invite developers by email. These emails are used for CLI identity verification.

4. Bulk Issue Keys

Issue Virtual Keys (aikey_vk_*) to invited seats and map them to upstream providers.

Developer User Flow

1. Install the CLI

curl -fsSL https://github.com/aikeylabs/launch/releases/latest/download/local-install.sh | sh

Apply PATH changes immediately: source ~/.zshrc (or .bashrc)

2-4. Authentication & Hook Setup

Initialize the local vault and log in to the enterprise control plane:

# Open local vault console

aikey web

# Connect to server

aikey login --email developer@example.com --control-url http://SERVER_IP:3000

Important: Once logged in, switch to the Vault page in your browser and click the install-hook banner at the top to enable auto-routing in your shell.

5. Run Claude

Open a new terminal to load the hook, then run your CLI directly:

claude

Verify Health

curl http://SERVER_IP:3000/health

Advanced Usage

Provider OAuth login

Add a personal provider account to your local vault (bypassing issued keys):

aikey auth login claude

Inspect Keys and Routes

# List all keys

aikey list

# Show copy-paste route tokens

aikey route

Temporary Key Switching

Switch the active key in the current terminal session only:

aikey activate my-key
aikey deactivate

OpenCode Configuration

Edit ~/.config/opencode/opencode.jsonc to route through AiKey:

{ "$schema": "https://opencode.ai/config.json", "provider": { "anthropic": { "options": { "baseURL": "http://127.0.0.1:27200/anthropic/v1" } } }, "model": "anthropic/claude-opus-4-7" }