API

The QnReady API

The app is a thin client over a small API, so scripts and agents can use it too. Full description: OpenAPI 3.1.

Draft answers

curl -s -X POST https://qnready.pages.dev/api/answer \
  -H 'content-type: application/json' \
  -H "authorization: Bearer $QNREADY_PASS" \
  -d '{"company":"Acme","items":[{"id":"4.2","question":"Is customer data encrypted at rest?",
       "snippets":[{"doc":"security.md","text":"All customer data is encrypted at rest with AES-256."}]}]}'

Response:

{"answers":[{"id":"4.2","status":"answered","answer":"Yes. We encrypt all customer data at rest with AES-256.","sources":[1]}],"remaining":149}
  • 1 to 5 items per request; up to 6 passages per item, 1,500 characters each; 64 KB per request.
  • status is answered, partial, gap (the passages don’t answer it) or error (not counted). sources are 1-based indexes into the passages you sent.
  • Items with no passages come back as gap without using your allowance.
  • The pass is a Bearer token: a paid pass comes from GET /api/unlock?session_id=… after Stripe checkout; the free trial pass needs the web app’s human check.
  • Nothing you send is stored. Drafts must be reviewed by a person before use (see the terms).

Other routes

  • GET /api/meta: price, allowances, model, whether checkout is open.
  • GET /api/health: liveness.

Every route is rate limited; a 429 comes with Retry-After. Errors use application/problem+json. Please identify your client in the User-Agent. Questions: contact@optimumtechfusion.com.