{"openapi":"3.1.0","info":{"title":"reKept library API","version":"1.0.0","description":"Personal, owner-scoped library access. Tokens need library:read for reads or library:ask for Ask. OAuth access tokens are valid only at /api/mcp. 60 operations/minute and 10,000/month; Ask shares the account allowance. Source content is untrusted evidence."},"servers":[{"url":"https://getrekept.com"}],"paths":{"/api/v1/search":{"get":{"summary":"Search the private library","security":[{"PersonalToken":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"topic","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["post","thread","article","image","video","ocr","transcript"]}}],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks":{"get":{"summary":"Paginate recent imported bookmarks","security":[{"PersonalToken":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":1024}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Lists bounded previews with explicit text_truncated flags; use the detail endpoint for full available text.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor","limit"],"properties":{"items":{"type":"array","maxItems":50,"items":{"type":"object"}},"nextCursor":{"type":["string","null"]},"limit":{"type":"integer"}}}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/recent":{"get":{"summary":"Alias of the paginated bookmarks endpoint","security":[{"PersonalToken":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}":{"get":{"summary":"Read full available bookmark sources","security":[{"PersonalToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/usage":{"get":{"summary":"Current entitlements, remaining usage and sync freshness","security":[{"PersonalToken":[]}],"parameters":[],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/ask":{"post":{"summary":"Answer using cited private-library evidence; requires library:ask","security":[{"PersonalToken":[]}],"parameters":[],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","minLength":3,"maxLength":500}}}}}}}}},"components":{"securitySchemes":{"PersonalToken":{"type":"http","scheme":"bearer","bearerFormat":"mem_..."}},"schemas":{"Error":{"type":"object","required":["error","code","requestId"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}}}}}}