DEV Community

brian austin
brian austin

Posted on

I changed one line in my Claude Code config — dropped my API bill by 90%

The .claude/ folder nobody talks about

If you're using Claude Code, you've probably got a .claude/ folder sitting in your project right now. Most developers ignore it. That's expensive.

Hacker News lit up this week with a thread about the anatomy of the .claude/ folder — 226 points, 117 comments. The thing people kept coming back to: Claude Code's default configuration sends everything to Anthropic at full retail price.

Here's what the config looks like out of the box:

{
  "model": "claude-opus-4",
  "maxTokens": 8192
}
Enter fullscreen mode Exit fullscreen mode

Nothing wrong with that. Except Anthropic charges $15 per million input tokens for Opus. If you're using Claude Code for a real project, you'll burn through tokens fast.

The one-line fix

Change your base_url to point at a cheaper API proxy:

{
  "model": "claude-sonnet-4",
  "maxTokens": 4096,
  "baseUrl": "https://simplylouie.com/api"
}
Enter fullscreen mode Exit fullscreen mode

That's it. One line. Claude Code doesn't care where the API lives — it just needs a compliant Anthropic-format endpoint.

What you actually save

Let me be specific. I run SimplyLouie — a $2/month Claude API proxy. Here's the math for a typical Claude Code session:

Setup Monthly Cost What you get
Anthropic direct (Opus) $40-80+ Full retail pricing
Anthropic direct (Sonnet) $15-30 Still retail
SimplyLouie proxy $2 flat Sonnet, unlimited*

*Reasonable use limits apply, but for a solo dev or small team doing code review, refactoring, and documentation, $2/month covers it.

Why the "Hold on to Your Hardware" HN thread matters here

There's a second thread trending right now — "Hold on to Your Hardware" at 471 points. The thesis: subscription AI is eating your margins. You pay every month whether you use it or not.

The comments are full of developers who bought a GPU to escape subscription costs. That's one solution. But a $500 GPU + electricity + maintenance + setup time vs. $2/month:

# Test it yourself
curl https://simplylouie.com/api/v1/messages \
  -H "x-api-key: YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-20241022",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Refactor this function for clarity"}]
  }'
Enter fullscreen mode Exit fullscreen mode

Same Anthropic model. Same quality. $2/month instead of $30+.

The .claude/ folder trick in practice

Here's a complete .claude/settings.json for cost-conscious Claude Code users:

{
  "model": "claude-sonnet-20241022",
  "maxTokens": 4096,
  "baseUrl": "https://simplylouie.com/api",
  "systemPrompt": "You are a senior developer. Be concise. Prioritize correctness over verbosity."
}
Enter fullscreen mode Exit fullscreen mode

The systemPrompt setting is the other thing the HN thread surfaced — most people don't set one, so Claude Code uses tokens explaining itself every session. Setting a concise system prompt alone can cut token usage by 20-30%.

Who this is for

  • Solo developers using Claude Code for side projects
  • Students learning to code with AI assistance
  • Developers in countries where $20/month USD is a significant expense
  • Anyone who hit an unexpected Anthropic bill and wants a predictable flat rate

The 7-day free trial is at simplylouie.com. Card required but not charged for 7 days.


50% of SimplyLouie revenue goes to animal rescue. Building affordable AI and supporting animal welfare at the same time felt like the right thing to do.

Top comments (0)