api
api
kiln's account service is a JSON API at https://kiln.raya.ac/api/v1. private routes use a bearer session token (Authorization: Bearer <token>), obtained from register or login and stored in the app's keychain. browser sessions use the same token in an HttpOnly, Secure, SameSite=Lax cookie. errors are always {"error":{"code":"...","message":"..."}}.
auth
POST /auth/register—{handle,password,displayName?}returns account, session, recoveryCodePOST /auth/login—{handle,password}returns account, sessionPOST /auth/logout—{}returns okPOST /auth/password—{currentPassword,newPassword}returns account, sessionPOST /auth/recover—{handle,recoveryCode,newPassword}returns account, session, recoveryCode
account
GET /me— the accountPATCH /profile—{displayName?,bio?,location?,website?,accent?}PATCH /settings—{usageSharingEnabled?,publicUsageEnabled?,chatSharingDefault?}GET /sessions— signed-in devicesPOST /sessions/revoke—{id}or{others:true}GET /export— account, usage events and readmesPOST /account/delete—{password}
usage
POST /usage/events— one measured snapshot; returns eventId and duplicateGET /usage/history?limit&before— events and nextBeforeGET /usage/aggregate— counts, models, estimatedSpend, cachedSpend, noncachedSpend
readmes and social
POST /readmes—{title,body,trainingConsent:true,sourceChatId?,tags?}GET /readmes— your readmesPATCH /readmes/{id}—{enabled?,title?,body?,tags?}DELETE /readmes/{id}POST /readmes/{id}/likeandDELETE /readmes/{id}/like— liked, likeCountPOST /follows/{handle}andDELETE /follows/{handle}— following, followers
sharing a readme is explicit and consent-gated: the server rejects a create without trainingConsent: true. only user and assistant text is published, and readmes are revocable at any time.
public pages
/, /explore, /readmes, /r/<slug>, /tags, /tags/<tag>, /u/<handle>, /feed, /followers/<handle>, /following/<handle>, /search, /docs, /api, /stats, /changelog, /about, /readmes.xml, /sitemap.xml, /robots.txt, /healthz.
limits: 600 requests/min/peer, 300/min/account, login and recovery 30/15min/peer, registration 5/hour/peer.