Codex + OmniRoute = FREE Unlimited AI Tokens (Setup in 7 Minutes)
Stop burning credits in Codex CLI. In this video I connect OpenAI Codex to OmniRoute — a free, open-source, MIT-licensed local AI gateway that pools 290+ providers and 90+ free tiers behind one endpoint — and get it running end to end in about 7 minutes.
OmniRoute runs on your own machine (localhost:20128), auto-falls back when a provider hits its quota, and stacks RTK + Caveman compression to cut token usage dramatically. Point Codex at one base URL and you get Claude, GPT, Gemini, Kimi, GLM, DeepSeek and hundreds more through a single config.
⚠️ Honest disclaimer: "unlimited" is shorthand for pooled free tiers (~1.4–1.5B tokens/month by OmniRoute's own pool-deduped count), not infinite tokens. Some providers restrict gateway use in their terms — check each provider's ToS before you route production work through it. This is an educational walkthrough of an open-source tool, not a way to bypass anyone's billing.
⏱️ CHAPTERS 00:00 — Why Codex eats your credits 00:45 — What OmniRoute actually is (290 providers, one endpoint) 01:30 — Install: npm i -g omniroute 02:20 — First run + the dashboard tour 03:10 — Connecting your first FREE providers 04:15 — Pointing Codex CLI at OmniRoute (config.toml) 05:20 — Testing it: model "auto" and auto-fallback in action 06:10 — Combos, routing strategies & token compression 06:50 — Costs, limits and what to watch out for
🔗 LINKS OmniRoute (GitHub): https://github.com/diegosouzapw/OmniRoute OmniRoute site: https://omniroute.online OpenAI Codex CLI: https://github.com/openai/codex
💬 Which provider combo are you running? Drop it in the comments — I'm collecting the best free-tier stacks for a follow-up video.
👍 Like + subscribe for more AI coding workflow videos.
#Codex #OmniRoute #AICoding #OpenSource #DeveloperTools
Transcript
0:00 Hello guys, welcome. I have this open AI
0:02 Codex open and it is working with Omni
0:05 route, which is a free API. They provide
0:07 you 1.53 billion tokens per month. Now,
0:11 if I ask this open AI Codex, which
0:14 models are you using? So, now you can
0:17 see it is using these models. From here,
0:21 you are using your models. Now, you can
0:24 see it is using these models and it is
0:27 using it from Integrity designed by
0:30 Google team. Now, if I come here to this
0:33 Omni route API, which I've already set
0:35 up, and if I come to these providers,
0:38 and now you can see here our Integrity
0:40 and Integrity CLI are connected. So, we
0:43 are using the models from this Omni
0:45 route API. So, how to set up this? In
0:48 this video, I'll show you step-by-step.
0:51 So, first we will open a new tab and
0:53 here I'll search for Omni route GitHub.
0:55 Now, go to this first link. Now, if I go
0:58 down, so here are the full details is
1:00 given. You can see here it has 290
1:02 providers, 90 plus is free, and it
1:05 provide 1.53 billion tokens per month
1:07 free. And for the first month, it
1:10 provide 2.15 billion tokens. How to set
1:13 up this? So, we will go down and here is
1:15 the quick start. Click on this. So, it
1:16 will take us here. So, to install Omni
1:19 route, you need NPM to be installed on
1:21 your system. So, for that, you need
1:23 Node.js. So, how can you install
1:24 Node.js? Search for Node.js and download
1:27 and the installation is pretty simple.
1:29 Next, next, next and it will install.
1:31 I'll copy this command from here. I'll
1:33 go here, open a new tab here, and I'll
1:36 paste it. Hit enter. And now it will
1:38 take some time to install this Omni
1:40 route. So, now Omni route is installed.
1:42 So, I'll go to this Omni route, which
1:43 I've already logged in, so I'll log out
1:45 from this. And now, I'll close this.
1:48 I'll come here again. I'll copy the
1:49 second command. And now, I'll paste it
1:52 here. Hit enter. And it will start Omni
1:54 route server and it will show you this
1:56 dashboard page. Now, the password is
1:58 right here. Copy this and paste it here.
2:01 Continue, and now you will log in to
2:04 Omni route. So, this is Omni route. So,
2:06 in this way, you can set up Omni route.
2:09 Now, we will install OpenAI Codex. So,
2:11 for that, I'll come to new tab, and
2:13 here, I'll search for Codex CLI. Go to
2:16 this first link. Go down. Select this
2:18 Codex CLI. Go down, and here, the
2:20 installation method is given. This is
2:22 for Mac Linux. So, click on this
2:24 Windows. Copy this. Come here. Open a
2:26 new window and paste the command here.
2:29 All right, enter. So, it will install
2:32 OpenAI Codex. So, now it will ask you to
2:35 start Codex. Put Y here and hit enter.
2:38 So, it will create all the files. Close
2:40 this window of Codex. Now, we will go
2:43 here to this folder. Open it. Go to this
2:45 PC, C, users. HP is my user. You will
2:49 have your own user. Now, you can see
2:51 here dot Codex folder. So, by default,
2:54 this is hidden. So, you can view it from
2:56 here. Show and hidden item. So, when you
2:59 check this, so it will show the hidden
3:01 folders. So, double click on this. Open
3:03 it. Here, search for config.toml.
3:06 It is right here. Open it. Maximize
3:08 this. So, you will not have all these
3:11 settings inside it because I've already
3:13 made the settings in it. So, I'll paste
3:15 these settings in the description of the
3:18 video. So, what you have to change are
3:20 the game start from here up to here. So,
3:23 if this is not available in your
3:25 config.toml
3:27 so you can copy it from here and paste
3:29 it there. Now, what is the base URL? So,
3:31 the base URL is from Omni route. So, for
3:33 that, I'll come here to Omni route. I'll
3:36 go to this endpoints, and this is our
3:38 base URL. So, I'll copy this, and we
3:41 will paste it right here. Now, this is
3:43 the API key. So, I'll generate a new API
3:45 key for you. For that, I'll come here
3:48 and go here and generate an API key.
3:51 I'll name this cordex, and create. I'll
3:54 copy the API key, and I'll paste it
3:56 here. Now, model provider is OpenAI, and
3:59 we will keep it auto. This will be auto.
4:02 I'll control S this. Now, we have to set
4:04 up some models. So, for that, I'll come
4:07 here. I'll click on this done, and now
4:09 I'll come to this providers. Now, here
4:11 we have the free tier. I've already set
4:13 up seven, but I'll show you how to set
4:15 up as this is showing error. So, I'll
4:17 click on this. I'll delete this, and
4:20 I'll add it again. Now, I'll type here
4:22 free in API key. Not everyone work with
4:25 this, but some of them work like this.
4:28 I'll save this, and now you can see two
4:30 models imported. I'll close this. I'll
4:33 go back. Now, I'll delete this entire
4:35 gravity as well, and we will connect it
4:38 again. Sign in. Copy this URL. Come
4:40 here, then to Omni route. Click on enter
4:43 manually, and paste the URL here. And
4:45 now, connect. So, it will connect entire
4:47 gravity CLI. I'll go again to providers.
4:50 Go to free tier. You can add all of
4:52 them, but some of them need API key. If
4:55 I click on this big box, add, and if I
4:58 type here free, and import free models,
5:01 and save, so now you can see two models
5:03 imported. I'll go back. So, all of these
5:06 are free tier models. Here, you can see
5:09 101 free tier models. You can add all of
5:12 them. Now, if I click on this deep seek,
5:14 and if I add, and if I use here free,
5:17 import, and save, so now you can see it
5:19 is saying invalid key. So, for this, you
5:22 have to go to their website and generate
5:25 the API key, and then add it here. So,
5:28 then it will start working. So, as I
5:30 have shown you how to add models, now we
5:33 are good to go. So, now I'll again go to
5:35 this CMD, and here I will open a new
5:38 tab, and now here I'll type for decks.
5:41 So, now you can see it is showing an
5:42 error because it is missing opening
5:45 quote. So, for that, I'll come here, and
5:47 we will put opening quote here. Control
5:49 S it. Now, I'll again we will go to CMD
5:51 and type codex and enter. So, now it is
5:54 working. So, now if I send it a hi, so
5:56 now you can see it has responded me,
5:58 "Hi, how can I help you?" Create me a
6:02 tic-tac-toe
6:03 game in HTML, CSS, and JavaScript and
6:08 save it in tic.html
6:12 all in one file. Hit enter. So, now you
6:15 can see it is working on it. So, we will
6:17 wait. So, now you can see it has started
6:19 working. I'll create a polished
6:21 tic-tac-toe game in a single HTML file
6:23 with embedded CSS and JavaScript. And it
6:26 has created the HTML file, but it's
6:28 still working on it. So, we will wait.
6:30 So, now you can see here your
6:32 tic-tac-toe game is ready. It has saved
6:34 it the file here. So, I'll copy this
6:36 path, and I'll go to this browser, open
6:38 a new tab, and paste the path here. So,
6:41 it will open the HTML file here as you
6:43 can see tic-tac-toe, and I play with X,
6:46 O, X, O, X. Now, you can see X won. One
6:50 If I use here, reset score. X, O, X, O,
6:55 X. Now, you can see again X won, and you
6:58 can create any round as well. So, in
7:01 this way you can set up codex CLI with
7:04 on the route, and you can use 1.53
7:07 billion tokens absolutely free. So, I
7:10 think that's all for today. I hope you
7:11 like the video. If you like the video,
7:13 please like, subscribe, and comment.
7:14 Thank you.