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
gpt-4o, claude-3-5-sonnet) are accepted as aliases and mapped to the matching Kiro model.Get a key
- Open the pricing page and pick a plan, or ask an admin to issue one in /admin.
- Copy the
sk-kiro-…key (shown once). - 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 /admin → Kiro accounts → Import 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.
- 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 } - If
clientId/clientSecretare not inside it, open the device-registration file named afterclientIdHashand copy them from there:~/.aws/sso/cache/<clientIdHash>.json → { "clientId": "...", "clientSecret": "..." }Only needed for IAM Identity Center logins. Kiro Desktop social logins refresh with therefreshTokenalone. - If
profileArnis 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
- In /admin → Kiro accounts → Add account: paste the whole
kiro-auth-token.jsoninto the JSON box, and fill theclientId/clientSecret/profileArnfields only if they lived in separate files. Give it a name and click Add account.
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
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"
__BASE__/v1 and put the key in the OpenAI API key field.Cline / Roo Code (VS Code)
- Open the extension settings → API Provider → OpenAI Compatible.
- Base URL:
__BASE__/v1 - API Key:
sk-kiro-YOUR_KEY - Model ID:
claude-sonnet-4.5
Cursor
- Settings → Models → enable Override OpenAI Base URL.
- Base URL:
__BASE__/v1 - API Key:
sk-kiro-YOUR_KEY - Add a custom model named
claude-sonnet-4.5and enable it.
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"