I built a $2/month Claude API — here's the curl command
I've been using Claude Code for months. The problem? Anthropic's API costs add up fast, and Claude Pro at $20/month locks you into their web UI.
So I built a flat-rate Claude API proxy. $2/month. Unlimited requests. Here's how to use it.
The basics
First, get your API key at simplylouie.com/developers.
Then, it's a drop-in replacement for the Anthropic API:
curl https://simplylouie.com/api/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-sonnet-20241022",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude"}
]
}'
You get back a standard Anthropic-format response:
{
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"model": "claude-3-5-sonnet-20241022",
"stop_reason": "end_turn"
}
Using it with Claude Code
This is where it gets powerful. Claude Code supports ANTHROPIC_BASE_URL to point at any API-compatible endpoint:
export ANTHROPIC_BASE_URL=https://simplylouie.com
export ANTHROPIC_API_KEY=your_simplylouie_key
claude
Or add it to your shell profile permanently:
# ~/.bashrc or ~/.zshrc
export ANTHROPIC_BASE_URL=https://simplylouie.com
export ANTHROPIC_API_KEY=sk-lou-xxxxxxxxxxxx
Now every claude command routes through the flat-rate proxy. No per-token billing surprises.
Using it with Python
The Anthropic Python SDK respects ANTHROPIC_BASE_URL automatically:
import anthropic
import os
# Set env vars, or pass directly:
client = anthropic.Anthropic(
api_key="your_simplylouie_key",
base_url="https://simplylouie.com"
)
message = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[
{"role": "user", "content": "Explain async/await in Python"}
]
)
print(message.content[0].text)
Using it with LangChain
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic(
model="claude-3-5-sonnet-20241022",
anthropic_api_key="your_simplylouie_key",
anthropic_api_url="https://simplylouie.com"
)
response = llm.invoke("What is the capital of France?")
print(response.content)
Using it with LlamaIndex
from llama_index.llms.anthropic import Anthropic
llm = Anthropic(
model="claude-3-5-sonnet-20241022",
api_key="your_simplylouie_key",
base_url="https://simplylouie.com"
)
response = llm.complete("Write a haiku about Python")
print(response.text)
Why flat-rate instead of pay-per-token?
For most developers, pay-per-token billing creates a weird anxiety loop:
- You write a prompt
- You wonder if it's too long
- You truncate it to save tokens
- You get a worse response
- You wonder if you should have paid more
Flat-rate removes that entirely. Send 100 requests or 10,000 — same $2/month.
This is especially useful for:
- Exploratory development: Testing prompts without watching a meter
- CI/CD pipelines: Code review bots that run on every PR
- Team setups: One API key, multiple developers, no token-splitting math
- Side projects: You want Claude in your app but don't want per-request billing unpredictability
The pricing math
Anthropic's direct API pricing for Claude 3.5 Sonnet:
- Input: $3 per million tokens
- Output: $15 per million tokens
If you send ~100 requests/day with average 500 tokens in/500 tokens out:
- ~3M input tokens/month = $9
- ~3M output tokens/month = $45
- Total: $54/month
Flat-rate: $2/month.
Obviously I'm not running this at a loss — it works because most users use it less than the average. But if you're a moderate user who hits Claude a few hundred times a month, you come out way ahead.
Rate limits
The free tier (7-day trial) has rate limits to prevent abuse. Paid tier ($2/month) has generous limits designed for developer usage — not enterprise scale, but more than enough for side projects, agents, and personal tooling.
Getting started
- Sign up at simplylouie.com — 7-day free trial, card required
- Get your API key from the dashboard
- Replace
https://api.anthropic.comwithhttps://simplylouie.comin your code - Done
The API is a drop-in replacement. No SDK changes required. No new libraries. Just a different base URL.
SimplyLouie is built by one developer. 50% of revenue goes to animal rescue. $2/month flat-rate Claude API — simplylouie.com/developers
Top comments (0)