Developing a software project no longer requires a massive budget. In a recent guide by Hasan Aboul Hasan, it was demonstrated how to bypass expensive API costs by routing Claude Code through OpenRouter to access high-quality free models. [00:00]
Here is the step-by-step breakdown of the free setup and three essential tips for building real-world applications with AI.
The Free Setup Guide
The core idea is to change the configuration of Claude Code locally to point to OpenRouter, which offers a variety of powerful free models.
- Project Configuration:
- Create a folder in your project named
.code. - Create a file inside that folder called
settings.json.local. [00:20]
- Create a folder in your project named
- OpenRouter Integration:
- Go to OpenRouter.ai, create an account, and generate a new API Key. [00:42]
- Paste this key into the
authentication tokenfield in yoursettings.json.localfile. - Set the Base URL to the OpenRouter API endpoint. [01:42]
- Selecting a Free Model:
- Search the OpenRouter model library for “free.”
- Popular choices include NVIDIA’s coding models or the MiniMax M2.5. Copy the model string and paste it into your local settings. [01:15]
3 Tips for Building Real Projects with AI
Using a free model is only half the battle; you need to manage the AI effectively to prevent “hallucinations” and broken code.
1. Keep Your Structure Modular
AI works within a “context window.” If you dump your entire application into one massive file, the AI will eventually lose track and start breaking existing features. [03:09]
- The 600-Line Rule: Keep your files small (ideally under 600 lines). [03:25]
- Single Responsibility: Each file should do exactly one thing. This makes it easier for the AI to understand and connect the building blocks.
2. Know What to Ask For (Beyond “Vibe Coding”)
The AI will not protect you from architectural problems you aren’t aware of. For example, if you don’t know what a race condition is, you won’t prompt the AI to prevent data loss when multiple users save at once. [03:58]
- Your Job: You don’t need to write every line of code, but you must know the building blocks of your application so you can ask for the right protections. [04:16]
3. One Task Per Session + GitHub
Treat your development like a production pipeline. [04:44]
- Micro-Tasks: Create a plan (e.g., in a
plan.mdfile) and break every feature into tiny tasks. - The Workflow: Finish one task, test it manually, and push to GitHub immediately. [05:00]
- Why? If the AI breaks something in the next step, you have a clean backup of the working feature to revert to.

Leave a Reply