DEV Community

brian austin
brian austin

Posted on

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

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

I got tired of paying $20/month for Claude when I only use it for:

  • Code review in my terminal
  • Quick text summarization scripts
  • Automated PR descriptions

So I built a simple HTTP wrapper around the Anthropic API, deployed it, and now I charge $2/month flat. No token counting. No surprise bills. Just send a POST request and get a response.

Here's exactly how to use it.


The curl command

curl -X POST https://simplylouie.com/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "message": "Explain async/await in JavaScript in 3 sentences"
  }'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "response": "Async/await is syntactic sugar over JavaScript Promises that lets you write asynchronous code that looks synchronous. The async keyword marks a function as asynchronous, and await pauses execution inside that function until a Promise resolves. This eliminates callback hell and makes error handling straightforward with standard try/catch blocks.",
  "model": "claude-3-5-haiku-20241022"
}
Enter fullscreen mode Exit fullscreen mode

That's it.


Using it in Node.js

const fetch = require('node-fetch');

async function askClaude(question) {
  const res = await fetch('https://simplylouie.com/api/chat', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({ message: question })
  });

  const data = await res.json();
  return data.response;
}

// Code review
const review = await askClaude(
  'Review this function for bugs:\n' + myFunction.toString()
);
console.log(review);
Enter fullscreen mode Exit fullscreen mode

Using it in Python

import requests

def ask_claude(question: str, api_key: str) -> str:
    response = requests.post(
        'https://simplylouie.com/api/chat',
        headers={
            'Content-Type': 'application/json',
            'Authorization': f'Bearer {api_key}'
        },
        json={'message': question}
    )
    return response.json()['response']

# Summarize a document
with open('report.txt') as f:
    text = f.read()

summary = ask_claude(f'Summarize this in 3 bullet points:\n{text}', 'YOUR_API_KEY')
print(summary)
Enter fullscreen mode Exit fullscreen mode

Using it in a bash script

This is my favourite use case — wiring it into my git workflow:

#!/bin/bash
# generate-pr-description.sh
# Usage: ./generate-pr-description.sh

API_KEY="YOUR_API_KEY"
DIFF=$(git diff main --stat)

DESCRIPTION=$(curl -s -X POST https://simplylouie.com/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d "$(jq -n --arg msg "Write a GitHub PR description for these changes:\n$DIFF" '{message: $msg}')" \
  | jq -r '.response')

echo "$DESCRIPTION"
Enter fullscreen mode Exit fullscreen mode

Run it before opening a PR. Instant description, no ChatGPT tab needed.


Why build a wrapper instead of using Anthropic directly?

Three reasons:

1. No token anxiety

With the raw Anthropic API, every call costs money. You start counting tokens in your head before sending a request. That cognitive overhead kills productivity.

With a flat-rate wrapper: just send the request. Think about your code, not your bill.

2. Simpler auth

The Anthropic API requires managing API keys, tracking rate limits, and handling anthropic-version headers. My wrapper is one header: Authorization: Bearer YOUR_KEY.

3. No account for every team member

If you're building a small team tool, you don't want every developer to have their own $20/month Anthropic account. One SimplyLouie subscription, one API key, everyone's covered.


What model does it use?

Claude 3.5 Haiku — Anthropic's fastest model. Perfect for:

  • Code review
  • Documentation generation
  • Quick Q&A in scripts
  • PR descriptions
  • Commit message suggestions

For long document analysis or complex reasoning, Claude Sonnet is available on the higher tier.


Pricing comparison

SimplyLouie Anthropic Direct ChatGPT
Monthly cost $2/month Pay per token $20/month
Unlimited requests
API access Paid tier only
No token counting N/A
Simple REST SDK recommended

For developers in emerging markets

$2/month USD = roughly:

  • BDT 220 — less than a cup of coffee at a Dhaka café
  • PKR 560 — less than 1 hour on Upwork at junior rates
  • NGN 3,200 — one bus ride's worth of naira
  • KSh 260 — M-Pesa transaction pocket change
  • ₱112 — a Jollibee meal

The Anthropic API at full price is designed for Silicon Valley teams with venture funding. This is for developers who are building real things on real budgets.


Get an API key

  1. Go to simplylouie.com/developers
  2. Sign up (7-day free trial, card required, cancel anytime)
  3. Grab your API key from the dashboard
  4. Run the curl command above

Total setup time: 3 minutes.

If you have questions about integration, drop them in the comments. I'll answer everything.


SimplyLouie is a flat-rate Claude API wrapper. $2/month. 50% of revenue goes to animal rescue. simplylouie.com

Top comments (0)