How to Run Claude Code for Free (2 Methods)

Riccardo Vandra | AI Systems · Intermediate ·🧠 Large Language Models ·4mo ago

Key Takeaways

The video demonstrates how to run Claude Code for free or at a low cost using alternative providers, specifically by switching between different LLM models such as GLM and Open Router, and provides a step-by-step guide on how to install and configure the AI workspace to achieve this.

Full Transcript

Cloud code cost over $2,000 a year if you use it like I do. So in this video I want to show you two ways to run it for free or almost free. But even more importantly I will show you how to not only depend on Antropic the company behind clothe code. Now before going forward let me show you what we are actually doing over here. So if you think about clo code is what is called an arness. This is essentially a scaffolding for AI agents. So this is not only the model itself the LLM but it also comprises of terminal access tool access looping all these different things like that. Now what we are doing over here with this code switch process is essentially we are changing the brain that we are using. We are switching from using OPUS 4.6 to using a different model over here by changing some configuration variables within cloud code. In order to do that, I built this very simple AI workspace that we can use with all the files within. And by the way, you can have full access to this directly in the AI workspace builder group. Now when it comes to installing this and following the specific steps to install this, what I did is I created a readmi file that you can paste directly within code and say help me implement this and go bypass permission or ask uh before implementing if you want to check every single thing. But essentially what we are doing in this rhymi is we have the full install process. So first off we will create a profiles folder at the user level cloud instance. The second thing is we will be copying the profile configs. So you can figure you can think about the different profiles configs are the different brains that we can switch. So in this case we have entropic, we have open router and then we have GLM which is an open source model. we'll need to add the API keys and then the system will also install this specific command for us. So right now the command is actually installed and we can test this out uh already. So if we go to the terminal here and we can type load switch GLM for example the system switched to GLM and if we do a double check over here we can see that here GLM 4.7 is actually the mention model directly and if we do this once more and do close switch open router uh right now we switch to open router and if we open a new window and we check the model as you can see here we have quen 3 coder free which is a completely free model that you can use within uh clo code okay so now it's actually time to choose the models and then uh get the APIs now in this specific system I added two different variations keep in mind you can add as many as you want by running code switch add um but in this case we have GLM and then we have open router now I chose use GLM because it has a very good performance-wise compared to Clopus and the price is less than like for the uh light plan you are spending uh this is per quarter so um let me do it per month per month you are spending onetenth of a max plan for clothe code um and then you still have a good amount of usage for this um yeah keep in mind this is a subscription coding plan. So exactly the same as the cloud uh plan uh with uh different usages. So in this case here mentioned that the light plan for example is 3x the usage of cloud uh cloud pro uh and the pro plan is 5x uh light plan usage. So is effectively 15x pro plan. Uh the pro plan is not the max plan. So uh keep that in mind. But yeah, this is a solid um solid alternative. Now, the other options that we have available is open router. The beauty about open router is that we can choose literally whichever model we like uh both opensource free models as well as paid models if we really wanted to. And so uh here we have a very broad range in order to understand what is the best model over here. What we can do is we can check two things. We can check the rankings or then we can check the apps. If we check on the apps over here for example you can see which are the models that are actively used for something like open claw for example. So if we look at this it seems that step 3.5 flash is something that is used a lot as well as kim 2.5 or m max 2.5. So those are actually model that we can use uh within our specific system uh for um for open claw or uh cloud code. I think there is also clo code. Yeah. So as you can see over here there's also clo code. A lot of people are actually using oppus 4.6 directly through open router but there's also the possibility to have different other models such as main max over here. Okay. So now that we have an understanding of which models to use, what we can do is we can go within the two platforms. So for GLM you can go to ZAI manage API key API list. Over here you can create a new API key directly and you can copy this API key. The next step will be to go into open router and do the same. So within open router in the top right you will have the settings part. Within the settings you will have API keys. over here you can create a new API key and then copy the key directly um from here. Uh once you have the uh the full keys you can pass those over directly to uh cloud code. So you can say please add this API key to the GLM profile um and this to open router open router and so this will actually change the different profiles and uh update the actual uh keys so that this will become usable and now we can actually switch provider if we wanted to and use those uh without any problem. So if for example we want to do uh GLM we can go close switch GLM and right now if we go back here and check we are running GLM and then we can say something either is everything working cool and then we will essentially have the same system but uh it will use instead of using um cl oppus 4.6 six it will use GLM and then same thing will happen for uh the other model. Now that is how simple it was to actually add the different API keys and the next step is I want to show you how you can add additional models and the easiest way would be to type code switch add and then we can type the specific model. So let's say that we want to use Kimmy uh K2.5 for example. over here it will ask for the provider base URL. Uh now if we go to open router because we want to use open router for example we can find this directly into the documentation uh under open router/ API which is the uh API endpoint that we will use and so let's go back to VS code pass this over here API key will pass the one that we previously used and we'll pass this API key here and then model name. Let's go back here and select the specific model. So, open router and for example we want to use Kimi K 2.5. Let's add this here and right now we added that specific profile and so we can also use that as well. So if right now I type code switch Kimmy K2.5 I switch to this different model and if I open code and do model here as you can see we are using this different model. So this is so powerful because we have unlimited availability to different models right within clo code. So if this video was interesting feel free to subscribe. I push these videos once or twice per week about code and how to actually use clo code for business use cases. So if you're interested in that, just press on the subscribe and I catch you soon in the next video. Bye-bye.

Original Description

Build Your AI Workspace (Free): https://l.upliftedconsulting.com/ai-workspace-group Work With Me: https://l.upliftedconsulting.com/yt-call ------ In this video you'll discover how to run Claude Code with alternative providers — for free or almost free — using a single switching command. In particular, we'll cover: - Why Claude Code has a body and a brain - Method 1: OpenRouter with free models - Method 2: GLM for budget-friendly quality - Building a one-command provider switch - Adding unlimited providers to your setup After watching, you'll be able to switch Claude Code between any provider in one second — cutting costs and removing your dependency on a single company. ------ TIMESTAMPS 0:00 - Intro 0:30 - The claude-switch demo 2:00 - Body vs brain explained 3:00 - Method 1: OpenRouter (free) 5:00 - Method 2: GLM (budget) 7:00 - Building the switch command 8:30 - Final recommendations
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

This video teaches how to run Claude Code for free or at a low cost by switching between different LLM models and provides a step-by-step guide on how to install and configure the AI workspace. The video demonstrates how to add API keys and switch between models, and also shows how to add additional models to the AI workspace.

Key Takeaways
  1. Create a profiles folder at the user level cloud instance
  2. Copy profile configs
  3. Add API keys
  4. Install the code switch command
  5. Switch between LLM models using the code switch command
  6. Add additional models to the AI workspace
💡 The video shows how to use alternative providers to run Claude Code for free or at a low cost, and demonstrates how to switch between different LLM models to achieve this.

Related Reads

📰
Changes to LLM pricing: Novita and StreamLake
Learn about the pricing changes for Novita and StreamLake LLMs and how they impact your projects
Dev.to AI
📰
Kimi K3 Open Weights, Node.js 26 Temporal, and the Week Tooling Got Serious
Learn about the latest developments in AI and Node.js, including the release of a 2.8-trillion-parameter open-weights model and a new date API, and how they impact the tech industry
Dev.to AI
📰
Experiments with On-device AI — What building on Gemini Nano actually teaches you
Learn how to build on-device AI experiments with Gemini Nano, a real LLM inside the Chrome browser, and discover the differences from traditional cloud-based AI APIs
Dev.to AI
📰
The eye corrects the ear: fixing my LLM's video hallucinations with OCR and a VAD gate
Learn to fix LLM video hallucinations using OCR and a VAD gate, improving AI accuracy
Dev.to AI

Chapters (7)

Intro
0:30 The claude-switch demo
2:00 Body vs brain explained
3:00 Method 1: OpenRouter (free)
5:00 Method 2: GLM (budget)
7:00 Building the switch command
8:30 Final recommendations
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →