[Money-Saving Hack] Wipe Your API Bill! Use Docker and a bunch of free accounts to build your own unlimited model engine. Enjoy token freedom

The Pain We’ve All Experienced

Brothers, let’s be real for a second—what’s the most frustrating thing when you’re playing with AI?

It’s not when code won’t run, or when the model acts up. The real buzzkill is when you’re deep in the zone and suddenly: “API rate limit exceeded” or “You have exceeded your current quota.” Instantly, your flow is broken, your mood plummets, and it feels like your Ferrari just stalled on the highway.

Not to mention watching your bill rack up sky-high—it’s enough to make your heart bleed. Want to use the top-tier Claude-Opus? Or have GPT-4o code with you all day? Your wallet is the first to object.

But today, we’re going to solve this problem. I’m not sharing some quick hack or temporary trick, but a complete solution that truly gives you “model freedom” once and for all.

Your secret weapon: CLI Proxy API Management Center (an open-source API management proxy)

In simple terms, this is the “chief steward” and “smart dispatcher” for all your API Keys. You can throw all your API Keys in there—free, paid, whatever—and it’ll help you:

  1. Unified Access: Aggregate all your keys into a single, standard OpenAI API endpoint.
  2. Smart Rotation: Automatically switch to available keys. If one key goes down, the next immediately takes over.
  3. Health Checks: Proactively kick out expired or blocked keys to keep service stable.

Sound good? Hold on, it gets better.


Step 1: Deploy Your “Arsenal” (Set Up the Proxy)

This is the foundation, but trust me, it’s super simple.

Recommended setup: Docker!

Why? It’s clean, isolated, won’t mess up your server environment, and easy to move if needed. Just get a cheap VPS (1 core, 1GB RAM is enough), or use your own PC, open a terminal, and run one command:

bash -c ‘set -e
docker stop cli-proxy-api-plus 2>/dev/null || true
docker rm cli-proxy-api-plus 2>/dev/null || true
docker rmi eceasy/cli-proxy-api-plus:latest 2>/dev/null || true
rm -rf ~/cpa-plus 2>/dev/null || true
mkdir -p ~/cpa-plus && cd ~/cpa-plus
curl -fsSL https://raw.githubusercontent.com/router-for-me/CLIProxyAPIPlus/main/config.example.yaml -o config.yaml
sed -Ei “s|^([[:space:]]allow-remote:[[:space:]]).$|\1true|" config.yaml
sed -Ei "s|^([[:space:]]secret-key:[[:space:]]).
$|\1"your password"|” config.yaml
mkdir -p auths logs
docker run -d
–name cli-proxy-api-plus
–restart always
-p 8317:8317
-e TZ=Asia/Shanghai
-v “$(pwd)”/config.yaml:/CLIProxyAPI/config.yaml
-v “$(pwd)”/auths:/root/.cli-proxy-api
-v “$(pwd)”/logs:/CLIProxyAPI/logs
eceasy/cli-proxy-api-plus:latest
docker ps | grep cli-proxy-api-plus || true
echo “:white_check_mark: Deployment complete”
echo “:globe_with_meridians: Management page: http://your-public-IP:8317/management.html”
echo “:key: Login password: your password”’

(Pro tip: This pulls the latest version. You can change the port if you want, and set your own password.)

Once it’s running, you’ll have your own exclusive web management dashboard. Next step is to fill your “arsenal.”

QQ20260404-183147


Step 2: Stock Up on “Ammunition” (The Real Treasure)

This is the real essence of the solution—it determines how powerful your “firepower” will be. Be like a dragon hoarding treasure, collecting every “gold coin” (API Key) you can find.

Core Ammo - Renewable “Perpetual Motion Machines”:

  • Gemini Student Accounts / Google Cloud Free Tier: These are a game-changer! Through OAuth authentication, the keys can auto-renew, so basically unlimited usage. One account’s QPS (queries per second) is limited? No worries—register seven, eight, a dozen accounts, and stack them. The more accounts you have, the higher your theoretical concurrency. As for how to get more Gemini student or PRO accounts, hit me up—I’ve got the hookups.

QQ20260404-183241
QQ20260404-183423
QQ20260404-183457

Standard Ammo - Consumable “Rockets”:

  • Free Quotas from Various Models: Don’t underestimate the “small change”! OpenRouter, NVIDIA, Groq, Together AI, and lots of other platforms offer free trials or credit. Register for each, grab the keys. Even if they run out, they’ll be your main force early on, and are important parts of your “ammo vault.” The quantity makes the difference—register lots of accounts and snatch those keys!

QQ20260404-183625
QQ20260404-183739
QQ20260404-183816
QQ20260404-183608

Step 3: Smart Scheduling (Where the Magic Happens!)

Now, you’re a real “arms dealer.” Throw all the keys you’ve collected into the CLI Proxy backend—no need to worry about anything else.

Then, here’s where the magic unfolds:

  • Model Categorization: You can tag keys—put all the ones that can use claude-3-opus-20240229 together, and all gpt-4o keys together.
  • Auto-Rotation: When you request Claude-Opus, the Proxy will pick one key randomly from your Claude group. If that key gets rate-limited, it’ll instantly and seamlessly try the next one.
  • Total Peace of Mind: No more manual switching, no more worrying about keys suddenly dying. As long as your ammo vault runs deep, your service will always be up. That’s real high availability!

QQ20260404-183945
QQ20260404-183933

Step 4: Unleash Your Firepower (Connect Your Tools)

Now your proxy will give you a unified endpoint, something like: http://your-server-ip:8317.

Now you can use this as your official OpenAI endpoint!

  • In OpenClaw:

openclaw config set models.openai.baseUrl=http://your-server-ip:8317/v1

openclaw config set models.openai.apiKey=sk-xxxxxxxx (put anything here, the proxy doesn’t actually need it)

Now you can directly use models like cn2/claude-opus-4-6-thinking inside OpenClaw!

QQ20260404-184143

  • In VSCode:

Find any plugin that supports OpenAI (I use “continue”), edit the config.json file, and now when you code in VSCode, you’ll have the most powerful model as your co-pilot. It doesn’t get better than that.

QQ20260404-184513

My Coding Setup

Conclusion: Starting Today, Be a Wealthy “Model Player”

Alright friends, that’s all for today. With this combo, you can say goodbye to API anxiety. The core idea: with enough “sand” (keys), you can build a “tower.” Scavenge keys from everywhere and dump them in—quantity is king.

This method not only saves cash, but more importantly, gives you that satisfying sense of “I’m in control of my models.”

The project is open-source—remember to give the original author a star on GitHub to show your support. If you hit any bumps during setup, drop a comment below and let’s all help each other out!

This post was written for me by the gemini-2.5-pro model. Sorry if the wording is rough! If you know any models that are better at writing, please recommend them—thanks a ton!

6 Likes

Thanks for sharing

Some of the images are broken.

Favorites