# π Free Claude Code + Aerolink Setup Guide by subh.expp π¬
Hey family! Welcome back to **subh.expp**. If you want to use the powerful **Claude Opus 4.8** inside your terminal for *free* (or super cheap) using the **Aerolink** gateway, you are in the right place!
Follow this quick guide to set everything up in less than 2 minutes. π
---
## π Step 1: Get Your Aerolink API Key
1. Go to the official website: **[aerolink.lat](<https://aerolink.lat>)** π
2. Sign up and verify your account using their **Telegram Bot** (this links your phone number and activates your account).
3. Go to the **API Keys** section, click **Create Key**, and copy your secret key (it looks like `aero_live_...`). ποΈ
---
## π€ Step 2: Feed This Prompt to Your AI Assistant
Copy the prompt below and paste it into **any AI Coding Assistant** (like Gemini, Cursor, Cline, or Copilot) running on your computer. It will automatically install Claude Code and configure the settings for you!
```text
Hey! Please set up Claude Code on my system to use the Aerolink API gateway.
Here are the details:
- Base URL: <https://capi.aerolink.lat/>
- Model: claude-opus-4-8
- Key: <PASTE_YOUR_AEROLINK_KEY_HERE>
Please write this configuration directly to my ~/.claude/settings.json file in the correct format:
{
"theme": "light",
"env": {
"ANTHROPIC_BASE_URL": "<https://capi.aerolink.lat/>",
"ANTHROPIC_API_KEY": "<PASTE_YOUR_AEROLINK_KEY_HERE>",
"ANTHROPIC_MODEL": "claude-opus-4-8",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"model": "sonnet[1m]",
"apiKeyHelper": "echo '<PASTE_YOUR_AEROLINK_KEY_HERE>'"
}
If Claude Code is not installed on my system, please install it globally using `npm install -g @anthropic-ai/claude-code` first.
Once the AI assistant completes the setup:
claude
Created with β€οΈ for the subh.expp community.
π¬ Add-on guide by subh.expp β Use this alongside the main Claude Code setup guide!
Tired of being stuck on one gateway? This tool lets you switch between 5+ free Claude Code API gateways with one click β no more editing JSON files manually! π₯
| Gateway | Models Available | How to Get Key |
|---|---|---|
| π Agent Router | Claude Opus 4.8, GPT-5, DeepSeek V3.1 | agentrouter.org/console/token |
| βοΈ Aerolink | Claude Opus 4.6, Claude Sonnet | aerolink.lat β Telegram verify |
| π§ FreeModel AI | Claude Opus, Claude Sonnet | freemodel.dev |
| π OpenRouter | 100+ models (Claude, GPT, Llama, etc.) | openrouter.ai/keys |
| βοΈ Custom | Any Anthropic-compatible endpoint | Your own server |
Copy-paste this into your terminal: π
# Clone or download the gateway-switcher folder
# Then run these commands:
cd gateway-switcher
npm install
That's it β one dependency (Express.js), installs in 3 seconds. β‘
npm run dev
You'll see:
β‘ Gateway Switcher running at:
β <http://localhost:3847>
π Config path: ~/.claude/settings.json
Now open http://localhost:3847 in your browser! π
~/.claude/settings.json!claude
π‘ Pro tip: Your API keys are saved in your browser β you won't have to re-enter them when switching back and forth!
Want to set this all up automatically? Copy this prompt into any AI coding assistant: π
Hey! Please set up the Claude Code Gateway Switcher on my system.
Steps:
1. Create a folder called "gateway-switcher" in my current project directory
2. Create these files:
package.json:
{
"name": "gateway-switcher",
"version": "1.0.0",
"type": "module",
"scripts": { "dev": "node server.js" },
"dependencies": { "express": "^5.1.0" }
}
3. Create server.js β an Express server on port 3847 that:
- Serves static files from a "public" folder
- GET /api/config β reads ~/.claude/settings.json and returns it as JSON
- POST /api/config β writes the request body to ~/.claude/settings.json
- GET /api/test β tests a connection to a given provider URL + API key
4. Create public/index.html, public/style.css, public/app.js β a dark-mode web UI with:
- Cards for these gateways: Agent Router (agentrouter.org), Aerolink (capi.aerolink.lat), FreeModel AI (cc.freemodel.dev), OpenRouter (openrouter.ai/api), and a Custom option
- Each card has an API key input field
- "Apply to Claude Code" button that POSTs the config to the server
- "Test Connection" button that calls GET /api/test
- Shows a preview of the generated settings.json
- Premium dark UI with gradients, animations, and JetBrains Mono code font
5. Run npm install
6. Start the server with npm run dev
7. Open <http://localhost:3847> in my browser
βββββββββββββββββββββββββββββββββββ
β Browser (localhost:3847) β
β βββββββββββββββββββββββββ β
β β Click "Apply" button β β
β ββββββββββββ¬βββββββββββββ β
β β POST /api/config β
β βΌ β
β βββββββββββββββββββββββββ β
β β Express Server β β
β β (server.js) β β
β ββββββββββββ¬βββββββββββββ β
β β fs.writeFileSync β
β βΌ β
β βββββββββββββββββββββββββ β
β β ~/.claude/settings.jsonβ β
β βββββββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββ β
β β Claude Code reads it β β
β β on next startup β β
β βββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββ
Each gateway needs a different settings.json. Here's what each one looks like:
{
"env": {
"ANTHROPIC_API_KEY": "sk-YOUR_AGENT_ROUTER_KEY",
"ANTHROPIC_AUTH_TOKEN": "sk-YOUR_AGENT_ROUTER_KEY",
"ANTHROPIC_BASE_URL": "<https://agentrouter.org/>",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"apiKeyHelper": "echo 'sk-YOUR_AGENT_ROUTER_KEY'"
}
{
"env": {
"ANTHROPIC_API_KEY": "aero_live_YOUR_KEY",
"ANTHROPIC_BASE_URL": "<https://capi.aerolink.lat/>",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"apiKeyHelper": "echo 'aero_live_YOUR_KEY'"
}
{
"env": {
"ANTHROPIC_API_KEY": "fe_oa_YOUR_KEY",
"ANTHROPIC_BASE_URL": "<https://cc.freemodel.dev/>",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"apiKeyHelper": "echo 'fe_oa_YOUR_KEY'"
}
{
"env": {
"ANTHROPIC_API_KEY": "sk-or-v1-YOUR_KEY",
"ANTHROPIC_BASE_URL": "<https://openrouter.ai/api/>",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"apiKeyHelper": "echo 'sk-or-v1-YOUR_KEY'"
}
Q: Do I need to restart Claude Code after switching?
A: Yes! Just close the current claude session and run claude again. It re-reads settings.json on startup. π
Q: Can I use this to switch mid-conversation?
A: No β you need to exit and re-launch claude for the new gateway to take effect.
Q: My gateway shows "Test Failed" β what do I do? A: Double-check your API key is correct, and that you've verified your account on that gateway's website. Some gateways require Telegram or email verification first. π
Q: Can I add more gateways?
A: Yes! Open public/app.js and add a new entry to the PROVIDERS array. The UI updates automatically. βοΈ
Made with β‘ by subh.expp β Switch gateways, not vibes.