# Codex + OmniRoute = FREE Unlimited AI Tokens (Setup in 7 Minutes)
Canonical: https://social-archive.org/sequeira33/fpvjxCfiyb
Original URL: https://www.youtube.com/watch?v=SH7Z0vq53Ng
Author: ZeroTokensAI
Platform: youtube
Share mode: full
## Content
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](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=0s) Hello guys, welcome. I have this open AI [0:02](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=2s) Codex open and it is working with Omni [0:05](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=5s) route, which is a free API. They provide [0:07](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=7s) you 1.53 billion tokens per month. Now, [0:11](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=11s) if I ask this open AI Codex, which [0:14](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=14s) models are you using? So, now you can [0:17](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=17s) see it is using these models. From here, [0:21](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=21s) you are using your models. Now, you can [0:24](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=24s) see it is using these models and it is [0:27](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=27s) using it from Integrity designed by [0:30](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=30s) Google team. Now, if I come here to this [0:33](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=33s) Omni route API, which I've already set [0:35](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=35s) up, and if I come to these providers, [0:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=38s) and now you can see here our Integrity [0:40](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=40s) and Integrity CLI are connected. So, we [0:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=43s) are using the models from this Omni [0:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=45s) route API. So, how to set up this? In [0:48](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=48s) this video, I'll show you step-by-step. [0:51](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=51s) So, first we will open a new tab and [0:53](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=53s) here I'll search for Omni route GitHub. [0:55](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=55s) Now, go to this first link. Now, if I go [0:58](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=58s) down, so here are the full details is [1:00](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=60s) given. You can see here it has 290 [1:02](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=62s) providers, 90 plus is free, and it [1:05](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=65s) provide 1.53 billion tokens per month [1:07](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=67s) free. And for the first month, it [1:10](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=70s) provide 2.15 billion tokens. How to set [1:13](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=73s) up this? So, we will go down and here is [1:15](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=75s) the quick start. Click on this. So, it [1:16](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=76s) will take us here. So, to install Omni [1:19](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=79s) route, you need NPM to be installed on [1:21](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=81s) your system. So, for that, you need [1:23](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=83s) Node.js. So, how can you install [1:24](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=84s) Node.js? Search for Node.js and download [1:27](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=87s) and the installation is pretty simple. [1:29](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=89s) Next, next, next and it will install. [1:31](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=91s) I'll copy this command from here. I'll [1:33](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=93s) go here, open a new tab here, and I'll [1:36](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=96s) paste it. Hit enter. And now it will [1:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=98s) take some time to install this Omni [1:40](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=100s) route. So, now Omni route is installed. [1:42](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=102s) So, I'll go to this Omni route, which [1:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=103s) I've already logged in, so I'll log out [1:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=105s) from this. And now, I'll close this. [1:48](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=108s) I'll come here again. I'll copy the [1:49](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=109s) second command. And now, I'll paste it [1:52](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=112s) here. Hit enter. And it will start Omni [1:54](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=114s) route server and it will show you this [1:56](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=116s) dashboard page. Now, the password is [1:58](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=118s) right here. Copy this and paste it here. [2:01](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=121s) Continue, and now you will log in to [2:04](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=124s) Omni route. So, this is Omni route. So, [2:06](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=126s) in this way, you can set up Omni route. [2:09](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=129s) Now, we will install OpenAI Codex. So, [2:11](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=131s) for that, I'll come to new tab, and [2:13](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=133s) here, I'll search for Codex CLI. Go to [2:16](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=136s) this first link. Go down. Select this [2:18](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=138s) Codex CLI. Go down, and here, the [2:20](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=140s) installation method is given. This is [2:22](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=142s) for Mac Linux. So, click on this [2:24](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=144s) Windows. Copy this. Come here. Open a [2:26](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=146s) new window and paste the command here. [2:29](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=149s) All right, enter. So, it will install [2:32](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=152s) OpenAI Codex. So, now it will ask you to [2:35](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=155s) start Codex. Put Y here and hit enter. [2:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=158s) So, it will create all the files. Close [2:40](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=160s) this window of Codex. Now, we will go [2:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=163s) here to this folder. Open it. Go to this [2:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=165s) PC, C, users. HP is my user. You will [2:49](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=169s) have your own user. Now, you can see [2:51](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=171s) here dot Codex folder. So, by default, [2:54](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=174s) this is hidden. So, you can view it from [2:56](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=176s) here. Show and hidden item. So, when you [2:59](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=179s) check this, so it will show the hidden [3:01](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=181s) folders. So, double click on this. Open [3:03](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=183s) it. Here, search for config.toml. [3:06](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=186s) It is right here. Open it. Maximize [3:08](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=188s) this. So, you will not have all these [3:11](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=191s) settings inside it because I've already [3:13](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=193s) made the settings in it. So, I'll paste [3:15](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=195s) these settings in the description of the [3:18](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=198s) video. So, what you have to change are [3:20](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=200s) the game start from here up to here. So, [3:23](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=203s) if this is not available in your [3:25](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=205s) config.toml [3:27](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=207s) so you can copy it from here and paste [3:29](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=209s) it there. Now, what is the base URL? So, [3:31](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=211s) the base URL is from Omni route. So, for [3:33](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=213s) that, I'll come here to Omni route. I'll [3:36](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=216s) go to this endpoints, and this is our [3:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=218s) base URL. So, I'll copy this, and we [3:41](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=221s) will paste it right here. Now, this is [3:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=223s) the API key. So, I'll generate a new API [3:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=225s) key for you. For that, I'll come here [3:48](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=228s) and go here and generate an API key. [3:51](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=231s) I'll name this cordex, and create. I'll [3:54](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=234s) copy the API key, and I'll paste it [3:56](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=236s) here. Now, model provider is OpenAI, and [3:59](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=239s) we will keep it auto. This will be auto. [4:02](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=242s) I'll control S this. Now, we have to set [4:04](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=244s) up some models. So, for that, I'll come [4:07](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=247s) here. I'll click on this done, and now [4:09](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=249s) I'll come to this providers. Now, here [4:11](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=251s) we have the free tier. I've already set [4:13](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=253s) up seven, but I'll show you how to set [4:15](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=255s) up as this is showing error. So, I'll [4:17](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=257s) click on this. I'll delete this, and [4:20](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=260s) I'll add it again. Now, I'll type here [4:22](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=262s) free in API key. Not everyone work with [4:25](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=265s) this, but some of them work like this. [4:28](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=268s) I'll save this, and now you can see two [4:30](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=270s) models imported. I'll close this. I'll [4:33](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=273s) go back. Now, I'll delete this entire [4:35](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=275s) gravity as well, and we will connect it [4:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=278s) again. Sign in. Copy this URL. Come [4:40](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=280s) here, then to Omni route. Click on enter [4:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=283s) manually, and paste the URL here. And [4:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=285s) now, connect. So, it will connect entire [4:47](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=287s) gravity CLI. I'll go again to providers. [4:50](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=290s) Go to free tier. You can add all of [4:52](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=292s) them, but some of them need API key. If [4:55](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=295s) I click on this big box, add, and if I [4:58](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=298s) type here free, and import free models, [5:01](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=301s) and save, so now you can see two models [5:03](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=303s) imported. I'll go back. So, all of these [5:06](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=306s) are free tier models. Here, you can see [5:09](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=309s) 101 free tier models. You can add all of [5:12](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=312s) them. Now, if I click on this deep seek, [5:14](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=314s) and if I add, and if I use here free, [5:17](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=317s) import, and save, so now you can see it [5:19](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=319s) is saying invalid key. So, for this, you [5:22](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=322s) have to go to their website and generate [5:25](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=325s) the API key, and then add it here. So, [5:28](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=328s) then it will start working. So, as I [5:30](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=330s) have shown you how to add models, now we [5:33](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=333s) are good to go. So, now I'll again go to [5:35](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=335s) this CMD, and here I will open a new [5:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=338s) tab, and now here I'll type for decks. [5:41](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=341s) So, now you can see it is showing an [5:42](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=342s) error because it is missing opening [5:45](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=345s) quote. So, for that, I'll come here, and [5:47](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=347s) we will put opening quote here. Control [5:49](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=349s) S it. Now, I'll again we will go to CMD [5:51](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=351s) and type codex and enter. So, now it is [5:54](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=354s) working. So, now if I send it a hi, so [5:56](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=356s) now you can see it has responded me, [5:58](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=358s) "Hi, how can I help you?" Create me a [6:02](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=362s) tic-tac-toe [6:03](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=363s) game in HTML, CSS, and JavaScript and [6:08](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=368s) save it in tic.html [6:12](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=372s) all in one file. Hit enter. So, now you [6:15](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=375s) can see it is working on it. So, we will [6:17](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=377s) wait. So, now you can see it has started [6:19](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=379s) working. I'll create a polished [6:21](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=381s) tic-tac-toe game in a single HTML file [6:23](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=383s) with embedded CSS and JavaScript. And it [6:26](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=386s) has created the HTML file, but it's [6:28](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=388s) still working on it. So, we will wait. [6:30](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=390s) So, now you can see here your [6:32](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=392s) tic-tac-toe game is ready. It has saved [6:34](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=394s) it the file here. So, I'll copy this [6:36](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=396s) path, and I'll go to this browser, open [6:38](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=398s) a new tab, and paste the path here. So, [6:41](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=401s) it will open the HTML file here as you [6:43](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=403s) can see tic-tac-toe, and I play with X, [6:46](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=406s) O, X, O, X. Now, you can see X won. One [6:50](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=410s) If I use here, reset score. X, O, X, O, [6:55](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=415s) X. Now, you can see again X won, and you [6:58](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=418s) can create any round as well. So, in [7:01](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=421s) this way you can set up codex CLI with [7:04](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=424s) on the route, and you can use 1.53 [7:07](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=427s) billion tokens absolutely free. So, I [7:10](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=430s) think that's all for today. I hope you [7:11](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=431s) like the video. If you like the video, [7:13](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=433s) please like, subscribe, and comment. [7:14](https://www.youtube.com/watch?v=SH7Z0vq53Ng&t=434s) Thank you.
