DEV Community

brian austin
brian austin

Posted on

I built a $10/month Claude API — here's the curl command

I built a $10/month Claude API — here's the curl command

Everyone talks about the Claude API. Few talk about the price.

Claude API usage through Anthropic costs roughly $15 per million tokens on Sonnet. For a developer running a side project, a small SaaS, or just experimenting — that meter is always running.

I built SimplyLouie as a flat-rate Claude API gateway. $10/month. Unlimited calls (within fair use). No per-token billing surprises.

Here's 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",
    "model": "claude-sonnet-4-5"
  }'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "response": "Async/await is syntactic sugar built on top of Promises that lets you write asynchronous code in a synchronous style. When you mark a function with `async`, it automatically returns a Promise; using `await` inside pauses execution until that Promise resolves. This makes error handling with try/catch natural and eliminates deeply nested `.then()` chains.",
  "tokens_used": 78,
  "model": "claude-sonnet-4-5"
}
Enter fullscreen mode Exit fullscreen mode

Python example

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://simplylouie.com/api"

def ask_claude(message: str) -> str:
    response = requests.post(
        f"{BASE_URL}/chat",
        headers={
            "Authorization": f"Bearer {API_KEY}",
            "Content-Type": "application/json"
        },
        json={"message": message}
    )
    return response.json()["response"]

# Use it
result = ask_claude("What's the time complexity of quicksort?")
print(result)
Enter fullscreen mode Exit fullscreen mode

Node.js / JavaScript

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

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

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

// Batch processing example
async function processBatch(prompts) {
  const results = await Promise.all(
    prompts.map(prompt => askClaude(prompt))
  );
  return results;
}

// Usage
const questions = [
  'Summarize the CAP theorem',
  'What is a bloom filter?',
  'Explain CQRS pattern'
];

processBatch(questions).then(answers => {
  questions.forEach((q, i) => {
    console.log(`Q: ${q}`);
    console.log(`A: ${answers[i]}\n`);
  });
});
Enter fullscreen mode Exit fullscreen mode

GitHub Actions integration

Automate code review on every PR:

name: AI Code Review

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Get changed files
        id: changes
        run: |
          echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT

      - name: AI Review
        run: |
          DIFF=$(git diff ${{ github.event.pull_request.base.sha }} HEAD -- '*.js' '*.ts' '*.py' | head -200)

          RESPONSE=$(curl -s -X POST https://simplylouie.com/api/chat \
            -H "Authorization: Bearer ${{ secrets.SIMPLYLOUIE_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d "{\"message\": \"Review this code diff for bugs, security issues, and improvements. Be concise:\\n$DIFF\"}")

          echo "$RESPONSE" | jq -r '.response'
Enter fullscreen mode Exit fullscreen mode

Add SIMPLYLOUIE_API_KEY to your GitHub repo secrets and every PR gets an AI review comment.

Why flat-rate?

Per-token billing is fine when you know your usage patterns. For most developers building side projects or experimenting:

  • You don't know your usage patterns yet
  • You will accidentally write a loop that calls the API 10,000 times
  • You don't want a surprise invoice at the end of the month

Flat-rate means you can experiment freely. Run batch jobs. Try things. The cost doesn't change.

The pricing math

Service Monthly cost What you get
Anthropic API (direct) Variable Pay per token
Claude Pro $20/month Browser only, no API
SimplyLouie Developer $10/month Full API access, flat rate

For context on global pricing:

  • 🇮🇳 India: Rs165/month (vs Rs1,600+ for ChatGPT)
  • 🇳🇬 Nigeria: N3,200/month (vs N32,000+ for ChatGPT)
  • 🇵🇭 Philippines: P112/month (vs P1,120+ for ChatGPT)
  • 🇧🇷 Brazil: R$10/month (vs R$100+ for ChatGPT)

Get your API key

Visit simplylouie.com/developers — 7-day free trial, then $10/month flat.

No per-token billing. No usage caps that surprise you mid-project. Just Claude, available via API, for a predictable price.


50% of revenue goes to animal rescue. We're building affordable AI for everyone.

Top comments (0)