Kiro Bridge · Setup guide
Home   Admin

Get your key

Every app below needs two things: the base URL of this server and an API key.

Your endpoints

OpenAI-compatible base URL : __BASE__/v1
Anthropic-compatible base URL: __BASE__

Model IDs

Request any of these as the model field. Your client (IDE) picks the model — the bridge maps it to Kiro. auto lets Kiro choose.

claude-opus-4.5      (most capable — usually the heaviest quota weight)
claude-sonnet-4.5    (default, balanced)
claude-sonnet-4
claude-3.7-sonnet
claude-haiku-4.5     (fastest / cheapest quota weight)
auto
Common OpenAI/Anthropic names (e.g. gpt-4o, claude-3-5-sonnet) are accepted as aliases and mapped to the matching Kiro model.

Get a key

  1. Open the pricing page and pick a plan, or ask an admin to issue one in /admin.
  2. Copy the sk-kiro-… key (shown once).
  3. Check your balance any time:
curl __BASE__/v1/key/info -H "Authorization: Bearer sk-kiro-..."

Add Kiro accounts (admin)

The service routes requests across a pool of Kiro accounts. Add as many as you like — the bridge load-balances and refreshes their tokens automatically.

Option A · Import the local account

If you are logged into Kiro on this machine, open /adminKiro accountsImport local account. Done.

Option B · Paste a token from any machine (JSON)

This is the supported way to add a Kiro login from another computer. You log into Kiro there (IAM Identity Center / AWS Builder ID, or Kiro Desktop social login), then copy the token JSON here. The bridge stores it encrypted and refreshes it automatically.

  1. On the machine where Kiro is logged in, open the auth token file:
    Windows: %USERPROFILE%\.aws\sso\cache\kiro-auth-token.json
    macOS:   ~/.aws/sso/cache/kiro-auth-token.json
    Linux:   ~/.aws/sso/cache/kiro-auth-token.json
    It looks like this (fields vary by login type):
    {
      "accessToken":  "aoa...",
      "refreshToken": "eyJ...",
      "expiresAt":    "2026-01-01T12:00:00Z",
      "profileArn":   "arn:aws:codewhisperer:us-east-1:...:profile/ABC",
      "clientId":     "…",           // may be absent — see step 2
      "clientSecret": "…",           // may be absent — see step 2
      "clientIdHash": "…"            // points at the device-registration file
    }
  2. If clientId/clientSecret are not inside it, open the device-registration file named after clientIdHash and copy them from there:
    ~/.aws/sso/cache/<clientIdHash>.json   →   { "clientId": "...", "clientSecret": "..." }
    Only needed for IAM Identity Center logins. Kiro Desktop social logins refresh with the refreshToken alone.
  3. If profileArn is not in the token file, find it here:
    Windows: %APPDATA%\Kiro\User\globalStorage\kiro.kiroagent\profile.json
    macOS:   ~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent/profile.json
    Linux:   ~/.config/Kiro/User/globalStorage/kiro.kiroagent/profile.json
  4. In /adminKiro accountsAdd account: paste the whole kiro-auth-token.json into the JSON box, and fill the clientId / clientSecret / profileArn fields only if they lived in separate files. Give it a name and click Add account.
Region is derived automatically from the profile ARN (an eu-central-1 profile is called in eu-central-1). Tokens refresh on their own; an account that fails repeatedly is auto-disabled and skipped by the pool. Add several accounts to spread load and raise throughput.

OpenCode

OpenCode talks to any OpenAI-compatible endpoint via a custom provider.

1. Edit opencode.json

Project root or ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "kiro": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Kiro Bridge",
      "options": {
        "baseURL": "__BASE__/v1",
        "apiKey": "sk-kiro-YOUR_KEY"
      },
      "models": {
        "claude-sonnet-4.5": { "name": "Claude Sonnet 4.5" },
        "claude-opus-4.5":   { "name": "Claude Opus 4.5" }
      }
    }
  }
}

2. Run

opencode    # then select model  kiro/claude-sonnet-4.5

Claude Code

Point Claude Code at the Anthropic-compatible endpoint with environment variables.

# macOS / Linux
export ANTHROPIC_BASE_URL="__BASE__"
export ANTHROPIC_API_KEY="sk-kiro-YOUR_KEY"
export ANTHROPIC_MODEL="claude-sonnet-4.5"
claude
# Windows (PowerShell)
$env:ANTHROPIC_BASE_URL="__BASE__"
$env:ANTHROPIC_API_KEY="sk-kiro-YOUR_KEY"
$env:ANTHROPIC_MODEL="claude-sonnet-4.5"
claude
The key is sent as x-api-key to /v1/messages, which this bridge implements natively (streaming + tools).

Codex CLI

Add a custom provider in ~/.codex/config.toml pointing at the OpenAI-compatible endpoint.

model = "claude-sonnet-4.5"
model_provider = "kiro"

[model_providers.kiro]
name = "Kiro Bridge"
base_url = "__BASE__/v1"
env_key = "KIRO_API_KEY"
wire_api = "chat"
# then set the key and run
export KIRO_API_KEY="sk-kiro-YOUR_KEY"   # PowerShell: $env:KIRO_API_KEY="..."
codex

OpenClaude / OpenClaw

These are Anthropic-style clients. Use the Anthropic-compatible endpoint (no /v1 suffix — the client adds /v1/messages).

Base URL : __BASE__
API key  : sk-kiro-YOUR_KEY      (sent as x-api-key)
Model    : claude-sonnet-4.5
# common env-var form
export ANTHROPIC_BASE_URL="__BASE__"
export ANTHROPIC_API_KEY="sk-kiro-YOUR_KEY"
If your client expects an OpenAI base instead, use __BASE__/v1 and put the key in the OpenAI API key field.

Cline / Roo Code (VS Code)

  1. Open the extension settings → API Provider → OpenAI Compatible.
  2. Base URL: __BASE__/v1
  3. API Key: sk-kiro-YOUR_KEY
  4. Model ID: claude-sonnet-4.5

Cursor

  1. Settings → Models → enable Override OpenAI Base URL.
  2. Base URL: __BASE__/v1
  3. API Key: sk-kiro-YOUR_KEY
  4. Add a custom model named claude-sonnet-4.5 and enable it.
Cursor verifies the key by calling the API — keep this server reachable from your machine.

cURL / raw API

OpenAI Chat Completions

curl __BASE__/v1/chat/completions \
  -H "Authorization: Bearer sk-kiro-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4.5","messages":[{"role":"user","content":"hello"}],"stream":true}'

Anthropic Messages

curl __BASE__/v1/messages \
  -H "x-api-key: sk-kiro-YOUR_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4.5","max_tokens":256,"messages":[{"role":"user","content":"hello"}]}'

List models / check balance

curl __BASE__/v1/models     -H "Authorization: Bearer sk-kiro-YOUR_KEY"
curl __BASE__/v1/key/info   -H "Authorization: Bearer sk-kiro-YOUR_KEY"