{"openapi":"3.1.0","info":{"title":"Alchemyst Press API","version":"1.0.0","description":"Public read API for Alchemyst Press: searchable publication catalogue and editorial question answering. See developer portal at https://press.getalchemystai.com/developers.","contact":{"name":"Alchemyst Press","url":"https://press.getalchemystai.com/contact","email":"press@getalchemystai.com"},"license":{"name":"Terms of Use","url":"https://press.getalchemystai.com/privacy"}},"servers":[{"url":"https://press.getalchemystai.com","description":"Production"}],"tags":[{"name":"catalogue","description":"Publication catalogue search and listing."},{"name":"answer","description":"Editorial question answering grounded in the catalogue."}],"paths":{"/api/publications":{"get":{"operationId":"listPublications","summary":"List publications","description":"Returns the lightweight publication index used by the floating search box. No authentication required. Returns configured flag, publications array, and error field.","tags":["catalogue"],"responses":{"200":{"description":"Publication index","content":{"application/json":{"schema":{"type":"object","required":["configured","publications"],"properties":{"configured":{"type":"boolean","description":"Whether Strapi catalogue is configured."},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"summary":{"type":"string"},"format":{"type":"string"},"authors":{"type":"string"},"publishedAt":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"}}}},"error":{"type":["string","null"],"description":"Error detail when catalogue unreachable, else null."}}}}}}}}},"/api/answer":{"post":{"operationId":"askPress","summary":"Ask Alchemyst Press","description":"Ask a question grounded in the publication catalogue and current page context. Requires query of at least 5 characters. No authentication required; online inference requires server-side OpenRouter key.","tags":["answer"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":5,"description":"User question, at least 5 characters."},"pageContext":{"type":"object","description":"Invoking page snapshot for 'this page' questions.","properties":{"path":{"type":"string","description":"Route path, e.g. /about."},"title":{"type":"string","description":"Document title at ask time."},"excerpt":{"type":"string","description":"Plain-text excerpt of main content, truncated."}}}}}}}},"responses":{"200":{"description":"Answer","content":{"application/json":{"schema":{"type":"object","required":["answer"],"properties":{"answer":{"type":"string","description":"Grounded answer text."},"error":{"type":"string","description":"Machine-readable error code when applicable."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Online answering not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/tools":{"post":{"operationId":"invokeTool","summary":"Invoke a Press tool","description":"Invoke pressSearch (catalogue) or webSearch (general web) tool. Used by local inference path.","tags":["catalogue"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["tool","input"],"properties":{"tool":{"type":"string","enum":["pressSearch"]},"input":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Catalogue search query."}}}}},{"type":"object","required":["tool","input"],"properties":{"tool":{"type":"string","enum":["webSearch"]},"input":{"type":"object","required":["query"],"properties":{"query":{"type":"string"},"type":{"type":"string","enum":["general"]}}}}}]}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"type":"object","required":["tool","content"],"properties":{"tool":{"type":"string"},"content":{"type":"string"}}}}}},"400":{"description":"Invalid tool request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","message","hint"],"properties":{"error":{"type":"string","description":"Machine-readable error code, e.g. method_not_allowed."},"message":{"type":"string","description":"Human-readable error message."},"hint":{"type":"string","description":"How to resolve, with link to docs."}}}}}}