DEV Community

brian austin
brian austin

Posted on

I built a $10/month Claude API. Here's the curl command.

I wanted Claude API access without the per-token anxiety.

You know the feeling. You're building something, it's going well, then you check your Anthropic bill and it's $47 for a weekend of hacking. That's not a tool anymore. That's a liability.

So I built a flat-rate Claude API. $10/month. Unlimited calls. No surprises.

Here's the curl command:

curl -X POST https://simplylouie.com/api/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Explain async/await in Python in 3 sentences"}
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "id": "msg_01XkQz...",
  "role": "assistant",
  "content": "Async/await lets Python functions pause execution while waiting for I/O operations without blocking the entire program. The `async def` keyword creates a coroutine, and `await` suspends it until the awaited operation completes. This enables thousands of concurrent operations using a single thread via an event loop.",
  "model": "claude-3-5-sonnet",
  "usage": { "input_tokens": 18, "output_tokens": 67 }
}
Enter fullscreen mode Exit fullscreen mode

Why flat-rate API?

Anthropic's API pricing is:

  • claude-3-5-sonnet: $3/million input tokens, $15/million output tokens
  • A 10,000-token conversation = ~$0.18
  • 100 conversations = $18
  • One busy weekend = $40+

For developers building prototypes, internal tools, or small SaaS products, this is unpredictable. You either throttle your app or watch costs spiral.

Flat-rate changes the math entirely.

Python example

import requests

API_KEY = "your_key_here"
BASE_URL = "https://simplylouie.com/api/v1"

def chat(message: str, system: str = None) -> str:
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    payload = {
        "messages": [{"role": "user", "content": message}]
    }

    if system:
        payload["system"] = system

    response = requests.post(
        f"{BASE_URL}/chat",
        headers=headers,
        json=payload
    )
    response.raise_for_status()
    return response.json()["content"]

# Code review bot
review = chat(
    "Review this function for bugs and style issues:\n\n" + my_code,
    system="You are a senior engineer doing code review. Be direct and specific."
)
print(review)
Enter fullscreen mode Exit fullscreen mode

Node.js example

const response = await fetch('https://simplylouie.com/api/v1/chat', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.LOUIE_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    messages: [
      { role: 'user', content: 'Write a SQL query to find duplicate emails in a users table' }
    ]
  })
});

const { content } = await response.json();
console.log(content);
Enter fullscreen mode Exit fullscreen mode

What I use it for

  • Commit message generator: pipe git diff --staged into it, get a conventional commit message back
  • PR description writer: summarize what changed and why
  • Test case generator: give it a function, get 5 edge cases
  • Documentation drafts: input the function signature + inline comments, output JSDoc

All of these run multiple times per day. On Anthropic's direct API, that would be $20-40/month depending on context length. On flat-rate, it's $10/month, period.

The math for indie developers

If you're in the US: $10/month is 2 coffees.

If you're building in Nigeria: N3,200/month vs N15,000+ on pay-per-token.

If you're in India: Rs820/month vs Rs2,500+ on pay-per-token.

If you're in Indonesia: Rp32,000/month — less than a lunch.

The per-token model was designed for enterprise budgets. Flat-rate is designed for builders.

Get an API key

Developer docs and key generation: simplylouie.com/developers

7-day free trial, no charge until day 8, cancel any time.


Building something with this? Drop a comment — I read every one.

Top comments (0)