LicenRoute

Get paid for your API.

Your AI assistant adds keys and usage limits. You approve every change.

See it step by step

Free and open source. Express apps only. Hosted pilot online; no real charges yet.

Four steps, one of them yours

Paste the prompt

Your assistant reads your code and suggests what to charge for. Login, health checks and writes stay free.

Paste this into Claude Code or Cursor

Add paid access to my Express API with LicenRoute.
Read licenroute.com/llms.txt first and follow its rules.
Suggest which routes should be paid and which stay free.
Show me the exact change. I approve it in my terminal.
Run the LicenRoute tests and explain the results simply.
LicenRoute init — express 5.3.0 · app "demo-express"

Proposed plans (choose with --plans 1,2 or by name):
   1  api-catalogo   /api/catalogo/**   GET /api/catalogo
   2  api-informes   /api/informes/**   GET /api/informes, GET /api/informes/:id
      licence only on GET, HEAD; other methods stay as they are now

Left untouched (public, health, static or login):
      GET /health (server.js:5)
      POST /login (server.js:7)

Need your decision (init does not propose them):
      GET / (server.js:6)
      POST /api/pedidos (server.js:11)

Type the code

A short code in your terminal approves the exact change. It’s the one step your assistant can’t do for you.

LicenRoute is going to write:
  modify server.js
  modify .gitignore
  plans: /api/catalogo/**, /api/informes/**
  code: apr_…
If you approve, type 5QPE-95MJ and press Enter (anything else cancels): 5QPE-95MJ
Approval confirmed.
LicenRoute apply — applied (server.js, .gitignore).

Watch the tests

LicenRoute calls your app with no key, a real key, a fake one, after the limit, after revoking, and during an outage.

$ ./node_modules/.bin/licenroute test .
DEMO MODE · LOCAL SIMULATION · not a security test
SIMULATED PASS api-informes:sin-licencia: 402 payment_required
SIMULATED PASS api-informes:licencia-valida: 200
SIMULATED PASS api-informes:licencia-inventada: 403 forbidden
SIMULATED PASS api-informes:cuota: GET 200 · HEAD 200 · GET 200 · HEAD 402
SIMULATED PASS api-informes:revocada: before 200 · after 403
SIMULATED PASS publica /health: 200
SIMULATED PASS central-caido:api-informes: 503
SIMULATED PASS central-recuperado: 200

Undo anytime

licenroute undo puts your files back exactly as they were.

$ ./node_modules/.bin/licenroute undo .
LicenRoute undo — integration 2026-11-21T14-30-11-428Z
  restore .gitignore
  restore server.js
Reverted. This integration's journal has been deleted.

What callers get back

You pick the paid routes. Login and public pages stay free.

A call to a paid route withThe answer
no key402Pay first, with the plan and where to buy it
a valid key200In, and one use is counted
a used-up package402Pay again
a fake or revoked key403Refused
LicenRoute down503Paid routes close, free routes keep working

Agents can read the bill

Bots and AI agents get a 402 that names the plan, the price and the checkout link. They can pay instead of scraping.

How the 402 answer works

GET /api/reports, no key
HTTP/1.1 402 Payment Required
{
  "error": "payment_required",
  "payment": {
    "plan_id": "api-reports",
    "checkout_url": "https://example.com/plans/api-reports",
    "currency": "EUR",
    "unit_price_minor": 150,
    "unit_size": 1000
  }
}

What works today

Available now

  • Express 4 and 5, JavaScript or TypeScript
  • Setup with Claude Code or Cursor, with exact undo
  • Hosted panel with real licences and quotas: create an account
  • 10 APIs with a free trial in the Market
  • English and Spanish

Not yet

  • Real payments (Stripe test mode for now)
  • Next.js, Supabase or Python
  • Uptime guarantees (it is a pilot)
  • Windows

Tell us what you built

Before you paste it

Do I need to understand the code?

Not deeply. You read a short summary and approve it yourself, and your assistant can explain each step.

Will my login break?

No. Login, health checks and sign-up are never made paid, and the tests check that free pages still work.

Can I charge real money?

Not yet. The hosted pilot issues real licences and enforces quotas, but payments stay in Stripe test mode until a security review.

Open a paid lane on your API.

Copy the prompt into your assistant, or try the example app first.

Open the tutorial
git clone https://github.com/licenroute/licenroute.git
cd licenroute && npm ci --ignore-scripts && npm run build
./demo/demo.sh   # shows the change, writes nothing