DEV Community

brian austin
brian austin

Posted on

I built a $2/month Claude API — here's the exact curl command to use it

I built a $2/month Claude API — here's the exact curl command to use it

Last year I got fed up paying $20/month for ChatGPT when I was barely using it.

So I built my own Claude API proxy. It costs me under $2/month to run. Then I realized: other developers probably have this same problem.

So I opened it up.

Here's the exact curl command to use it:

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

That's it. You get Claude Sonnet. For $2/month.


Why I built this

I'm a developer in a country where $20/month is real money. ChatGPT at that price point felt extractive — designed for people in San Francisco, not the rest of the world.

I built SimplyLouie as an experiment: what's the minimum viable Claude API proxy? Can I keep costs low enough to charge $2/month and still make it worthwhile?

The answer turned out to be yes.


The full API reference

Chat completions

curl -X POST https://simplylouie.com/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [
      {"role": "system", "content": "You are a helpful coding assistant."},
      {"role": "user", "content": "Write a Python function to parse JSON safely"}
    ],
    "max_tokens": 500
  }'
Enter fullscreen mode Exit fullscreen mode

Response format

{
  "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
  "content": [
    {
      "type": "text",
      "text": "Here's a safe JSON parsing function in Python..."
    }
  ],
  "model": "claude-sonnet-4-5",
  "usage": {
    "input_tokens": 45,
    "output_tokens": 187
  }
}
Enter fullscreen mode Exit fullscreen mode

With conversation history

curl -X POST https://simplylouie.com/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [
      {"role": "user", "content": "What is the capital of France?"},
      {"role": "assistant", "content": "Paris."},
      {"role": "user", "content": "What's the population?"}
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

Python example

import requests

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

def ask_claude(prompt: str, system: str = None) -> str:
    messages = [{"role": "user", "content": prompt}]

    payload = {"messages": messages}
    if system:
        payload["messages"] = [
            {"role": "system", "content": system},
            *messages
        ]

    response = requests.post(
        BASE_URL,
        headers={
            "Authorization": f"Bearer {API_KEY}",
            "Content-Type": "application/json"
        },
        json=payload
    )

    return response.json()["content"][0]["text"]

# Usage
result = ask_claude(
    "Refactor this function to use list comprehension: ...",
    system="You are a senior Python engineer. Be concise."
)
print(result)
Enter fullscreen mode Exit fullscreen mode

JavaScript example

async function askClaude(prompt, systemPrompt = null) {
  const messages = [{ role: 'user', content: prompt }];

  if (systemPrompt) {
    messages.unshift({ role: 'system', content: systemPrompt });
  }

  const response = await fetch('https://simplylouie.com/api/chat', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.LOUIE_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ messages })
  });

  const data = await response.json();
  return data.content[0].text;
}

// Usage
const explanation = await askClaude(
  'Explain the difference between Promise.all and Promise.allSettled',
  'You are a JavaScript expert. Give practical examples.'
);
console.log(explanation);
Enter fullscreen mode Exit fullscreen mode

Rate limits and pricing

Plan Cost Requests/day Model
Free trial 7 days 50 Claude Sonnet
Paid $2/month 200 Claude Sonnet
API tier $2/month 500 Claude Sonnet

For comparison: Claude's direct API charges per token. At typical usage, that's $15-40/month for a developer. Anthropic's Claude.ai is $20/month.

SimplyLouie is $2/month, flat.


The weird part: 50% goes to animal rescue

I adopted a rescue dog last year. It changed how I think about what technology should be for.

So half of every dollar from SimplyLouie goes to animal rescue organizations.

It's not a marketing stunt. It's baked into the model.


Get your API key

Free 7-day trial, no credit card required for the trial:

👉 simplylouie.com/developers


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

Top comments (0)