DEV Community

CBT Tools
CBT Tools

Posted on

I Benchmarked My Free CBT API Against 3 Commercial Mental Health Apps

I built a free API that detects cognitive distortions in text using CBT (Cognitive Behavioral Therapy). It's live, it's open-source, and it costs $0. Then I looked at what $100+/week gets you from commercial mental health apps.

Here's the honest comparison.

The Free API

The CBT Thought Analyzer API is a rule-based cognitive distortion detector hosted on Render. You send it text, it returns the distortions found and a CBT reframe for each.

curl -X POST https://cbt-thought-analyzer.onrender.com/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "I failed this task so I must be a complete failure who will never succeed at anything"}'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "output": "Detected 4 cognitive distortions: All-or-Nothing Thinking, Overgeneralization, Emotional Reasoning, Should Statements.",
  "distortions": [
    {
      "id": "allornothing",
      "name": "All-or-Nothing Thinking",
      "confidence": "medium",
      "matched_patterns": ["never", "complete failure"],
      "reframe": "Is there a middle ground? What counts as 'good enough' here? One mistake doesn't cancel everything else that's worked."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

It detects 10 distortions from Beck's cognitive model: All-or-Nothing Thinking, Overgeneralization, Mental Filter, Disqualifying the Positive, Jumping to Conclusions, Magnification/Minimization, Emotional Reasoning, Should Statements, Labeling, and Personalization/Blame.

What it is: a pattern-matching engine that identifies cognitive distortion patterns in text and suggests a CBT reframe.

What it is NOT: not a chatbot, not a therapist, not a diagnosis, not AI/ML. It's a rules engine built on 40 years of CBT research.

The Commercial Apps

Woebot

  • What it does: AI chatbot that uses CBT techniques in conversation
  • Cost: Free (with premium features)
  • Privacy: Conversations stored on their servers
  • Evidence: Published studies show modest efficacy for mild depression

Wysa

  • What it does: AI penguin chatbot with CBT exercises
  • Cost: Free basic, $73.99/year premium
  • Privacy: Server-side conversation processing
  • Evidence: NHS-approved in UK trials

BetterHelp

  • Cost: $65–$100/week
  • Privacy: HIPAA-compliant therapy platform
  • Evidence: Real therapist, real CBT — the gold standard

The Benchmark

Dimension Free API Woebot Wysa BetterHelp
Cost $0 $0 $74/yr $65–100/wk
Response format JSON API Chat Chat Video/text
Privacy No data stored Server-side Server-side HIPAA
Transparency Open-source Proprietary Proprietary N/A
Integration REST API App only App only Platform
Distortions detected 10 Conversational Conversational Therapist-led
CBT reframe Yes (per distortion) Yes (in chat) Yes (in chat) Yes (clinical)

Where the Free API Wins

1. Privacy. The API is stateless. No accounts, no sessions, no data retention. You send text, you get distortions, the server forgets. For mental health data, this matters enormously — the less data stored, the less data that can be breached.

2. Programmability. It's a REST API. You can integrate it into anything — a journaling app, a Slack bot, a VS Code extension that checks your commit messages for catastrophizing. Try doing that with Woebot.

3. Transparency. The detection rules are open-source. You can read exactly what patterns trigger "All-or-Nothing Thinking" and disagree with them. With commercial apps, the detection logic is a black box.

4. Cost. $0. Not freemium, not "free with ads," not "free for 7 days." Free.

Where the Commercial Apps Win

1. Conversational depth. A chatbot can have a back-and-forth. The API is one-shot: text in, distortions out. CBT works best as a dialogue, not a single analysis.

2. Clinical nuance. A licensed therapist (BetterHelp) can read between the lines, ask probing questions, and adapt. A rules engine matches patterns. It will never catch what a trained human catches.

3. Scope. The API only detects distortions. It doesn't treat depression, anxiety, trauma, or anything else. Commercial apps address broader mental health needs.

4. Accountability. BetterHelp has a licensed professional responsible for your care. The API has no accountability mechanism — it's a tool, not a provider.

The Honest Takeaway

These aren't competitors. They're different tools for different needs.

  • Building a mental health app? Use the free API as a building block. It handles distortion detection so you can focus on your product.
  • Mild negative thinking you want to understand? The API can identify your patterns in seconds.
  • Actual mental health condition? See a therapist. BetterHelp, local services, whatever you can access. A rules engine is not treatment.

The benchmark isn't "free API vs therapy." It's "can a free, transparent, privacy-preserving tool provide value in specific contexts?" And the answer is yes — for self-awareness, for integration, for education, for early pattern recognition before someone needs clinical care.

Try It

curl -X POST https://cbt-thought-analyzer.onrender.com/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "Everyone always rejects me. I should just give up. Nothing ever works out for me."}'
Enter fullscreen mode Exit fullscreen mode

The source code is on GitHub. The API is free, has no rate limit (it's on a free Render tier, so it sleeps after 15 min of inactivity — first request takes ~15s to wake up), and stores zero data.

If you integrate it into something, I'd love to hear about it. And if you need more than distortion detection — please, talk to a professional.

Top comments (0)