Docs
SmartCodedBot LLM speaks the OpenAI and Anthropic wire formats. If your code already calls either one, you change two lines.
Quickstart
Fastest route: one line installs the smartcodedbot command for your user, with no sudo. It asks for your key with hidden input and keeps it in a file only you can read.
curl -fsSL https://llm.smartcodedbot.com/install.sh | bash -s -- --localThen smartcodedbot claude starts Claude Code through SmartCodedBot. Every command, option and how to check the script first are in Install the CLI.
Sign in with any Ethereum wallet. It is a signature, not a transaction.
Name it and set its caps in the dashboard. Copy it, because it is shown once.
Point your SDK at the base URL and pass a live model id.
Models serving right now: loading. The full list with status is on the models page.
Install the CLI
The smartcodedbot command saves your key once, then starts Claude Code or any OpenAI or Anthropic tool pointed at SmartCodedBot. It is one bash script for macOS, Linux and WSL, with no sudo and no Node.
curl -fsSL https://llm.smartcodedbot.com/install.sh | bash -s -- --localThe command goes in ~/.local/bin, and that folder is added to your PATH in your shell profile if it is missing.
Paste the sk-scb- key from /app. Typing is hidden. The key is checked against the gateway before it is saved.
The key lives in ~/.config/smartcodedbot/key, readable only by you. It is never put on a command line, so other programs cannot see it in the process list.
Commands
| Command | What it does |
|---|---|
smartcodedbot claude | Starts Claude Code through SmartCodedBot on a served Claude model. Pick another with --model, for example smartcodedbot claude --model qwen3.5-plus:free. Other arguments go to Claude Code, for example smartcodedbot claude -p "say OK". |
smartcodedbot chat "prompt" | Prints one reply. Add -m model-id to pick a model, or pipe text in. |
smartcodedbot models | Lists the models your key can call. |
smartcodedbot status | Shows the gateway, which key is in use (last four characters only) and whether it works. |
smartcodedbot run tool args | Runs any tool with OPENAI_BASE_URL, OPENAI_API_KEY, ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY set for that tool only. |
eval "$(smartcodedbot env)" | Sets the same four variables in your current shell. |
smartcodedbot login | Saves a new key, replacing the old one. |
smartcodedbot logout | Deletes the stored key from this computer. The key itself stays valid until you revoke it in /app. |
smartcodedbot update | Reinstalls the latest version and keeps your key. |
Installer options
| Option | Effect |
|---|---|
--local | Installs for the current user. This is the default. |
--bin DIR | Installs the command into another folder. |
--no-key | Skips the key prompt. Run smartcodedbot login later. |
--dry-run | Prints what would change and changes nothing. |
--uninstall | Removes the command and the stored key. |
Options go after bash -s --. For a CI job or a server with no terminal, set SCB_API_KEY in the environment instead of saving a key. SCB_MODEL picks the model for smartcodedbot claude and smartcodedbot chat.
Check the script before you run it
Piping a script into bash runs whatever the server sends, so read it first if you prefer. It is plain text at /install.sh, and its SHA-256 is at /install.sh.sha256. The script only uses HTTPS, and does nothing if the download is cut off part way.
curl -fsSL https://llm.smartcodedbot.com/install.sh -o smartcodedbot-install.sh
curl -fsSL https://llm.smartcodedbot.com/install.sh.sha256 | sed 's/install\.sh$/smartcodedbot-install.sh/' | shasum -a 256 -c -
bash smartcodedbot-install.sh --localTo remove it: curl -fsSL https://llm.smartcodedbot.com/install.sh | bash -s -- --uninstall.
Claude Code, in one minute
SmartCodedBot speaks the Anthropic Messages API, so Claude Code works by changing environment variables. No plugin, no local proxy, no fork of the CLI.
smartcodedbot claude does step 2 for you and picks a Claude model SmartCodedBot is serving. Add --model to choose another.The key goes in ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_API_KEY stays empty, so Claude Code does not ask to confirm the key or mix it up with your own Claude sign-in.
- 1 · Make a keyOpen /app, sign in with your wallet and press Create key. It starts with
sk-scb-. - 2 · Point it at SmartCodedBotPaste the block below into your shell profile, or run it in the session you want to use.
- 3 · Check the routeRun
claude -p "say OK". A reply means your traffic is going through SmartCodedBot, and it shows up in Usage within seconds.
ANTHROPIC_MODEL to a model from the live list below, or the first request fails with an unknown model error.export ANTHROPIC_BASE_URL=https://llm.smartcodedbot.com
export ANTHROPIC_AUTH_TOKEN=sk-scb-YOUR_KEY
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL=loading
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
claudeServing free right now. Tap a model to copy its id:
How a request flows
The gateway sits between your code and the model routes. It checks your key, applies your caps, forwards the call, and stamps a receipt on the way back.
Keys and sign-in
Accounts are wallet addresses. Sign-in asks your wallet to sign a plain text message that names this site and a one-time nonce. It sends no transaction and costs no gas. Sessions last a few weeks in that browser.
The free lane is reserved for $VISOR holders. A wallet must hold at least the minimum VISOR on Base when a key is minted, and again when the playground runs. Check any wallet at /api/visor?address=0x....
Send the key as authorization: Bearer sk-scb-.... The Anthropic endpoint also accepts x-api-key.
| Setting | What it does |
|---|---|
| Requests per minute | Up to the account maximum, lower if you set it. |
| Daily request cap | Stops the key after this many calls in a UTC day. |
| Daily token cap | Stops the key after this many input and output tokens in a UTC day. |
| Expiry | The key stops working on this date. |
| Allowed models | The key can call only the models you tick. /v1/models lists only those. |
| Allowed IP addresses | The key works only from these addresses. Exact IPv4 or IPv6, or IPv4 ranges such as 10.0.0.0/24, up to 20. |
| Revoke | Takes effect on the next request. |
Endpoints
| Method and path | Shape |
|---|---|
| POST /v1/chat/completions | OpenAI chat, streaming on OpenAI-native models |
| POST /v1/messages | Anthropic messages, streaming on Anthropic-native models |
| POST /v1/messages/count_tokens | Anthropic token estimate |
| POST /v1/responses | Passed through on OpenAI-native routes |
| POST /v1/embeddings | Passed through on OpenAI-native routes |
| GET /v1/models | Models with tier and ready flag, needs a key |
| GET /api/models | Public status, latency and limits, no key |
Anthropic SDK
Streaming
Set stream: true. On OpenAI-native models the gateway asks the route for usage in the final chunk, so your log still gets token counts.
Models
Pass the id exactly as listed. Ids ending in :free are on the free tier. A model is serving when its route has capacity now, and queued when it does not. Calling a queued model returns 503 with the source route-queued.
Both endpoints accept every model. When a model's native shape differs from the endpoint you call, the gateway converts it, without streaming.
Limits
Three layers apply, checked in this order. The numbers are read live from the gateway.
| Layer | What it caps |
|---|---|
| Your key | Loading |
Errors
Refusals made by the gateway carry x-smartcodedbot-limit-source and the same value in the body, plus retry-after in seconds when waiting helps.
| Source | Status | Meaning |
|---|---|---|
| key-rate | 429 | This key went over its per-minute limit. |
| key-daily-cap | 429 | This key reached a daily cap set by its owner. |
| free-quota | 429 | Your share of the free tier ran out for this window. |
| free-pool | 429 | Shared free capacity is full for everyone until the next window. |
| key-inactive | 403 | The key was revoked or expired. |
| key-ip | 403 | The request came from an address outside the key's allowlist. The message names the address it saw. |
| key-model | 403 | The key is limited to other models. The message lists the ones it allows. |
| route-queued | 503 | The model is listed but not serving yet. |
| route-unavailable | 502 | The route refused the gateway. Your key is fine, retry or pick another model. |
| unknown-model | 404 | No route matches that model id. |
| stream-unsupported | 400 | Streaming was asked for across shapes. Use the native endpoint or set stream to false. |
{
"error": {
"type": "rate_limit_error",
"code": "key-daily-cap",
"message": "this key reached its cap of 500 requests today. The owner can raise it in the dashboard.",
"retry_after": 41230
}
}Any other error status came from the model route and is passed through unchanged.
Receipts
Every completed response carries these headers. The dashboard log shows the same values for each request.
| Header | Value |
|---|---|
| x-smartcodedbot-latency-ms | Time spent in the gateway and the model route |
| x-smartcodedbot-tokens-in | Input tokens reported by the route |
| x-smartcodedbot-tokens-out | Output tokens reported by the route |
| x-smartcodedbot-cache | hit when served from the free-tier cache |
Streamed responses carry the latency header up front. Token counts arrive in the final stream chunk and are recorded in your log.
Data handling
The gateway does not store prompts or outputs. For each request it logs the time, key id, model, status, latency and token counts, which is what your dashboard reads.
Keeping secrets out of prompts
An agent such as Claude Code sends file contents as part of the request. If it opens .env, your keys are inside the prompt and the other side of the route reads them. Put a .claudeignore in the repository root so those files are never read:
.env
.env.*
*.pem
*.key
*.p12
id_rsa*
seed*.txt
secrets/
.aws/
.npmrc
node_modules/
.git/Then confirm it worked: ask the agent to read .env. It should report the path as ignored rather than printing the contents. If it prints keys, stop and rotate them.