Home

API

Programmatic access for Pro users. Day-1 supports cookie auth from a signed-in browser session; an API token flow is on the way for CI use.

POST /api/diffs

Create a saved diff. Requires Pro subscription.

curl -X POST https://diff.labs.basenull.com/api/diffs \
  -H 'content-type: application/json' \
  -b "bn_session=…"  # signed-in cookie \
  -d '{
    "left": "before text",
    "right": "after text",
    "lang": "yaml",
    "title": "release v1.4.3 config"
  }'

Response: { id, url, view_token }. The url is /d/<id>?t=<view_token> — paste it anywhere; only people with the URL can view.

POST /api/summary

Stateless AI summary. Returns a 2-4 sentence description. Free tier rate-limited per IP (10/day); Pro is unlimited. No diff is persisted.

curl -X POST https://diff.labs.basenull.com/api/summary \
  -H 'content-type: application/json' \
  -d '{ "left": "...", "right": "...", "lang": "json" }'

Request a Bearer-token-auth flow at hello@basenull.com if you're plugging this into CI.