{"openapi":"3.1.0","info":{"title":"Context Keeper","description":"Prompt library: save a prompt or persona and get a short code, load it back by code, search the public library by keyword and category, and manage your own prompts with an owner key.","version":"2.0.0"},"servers":[{"url":"https://cybrix.ai/prompt","description":"Context Keeper API"}],"paths":{"/health":{"get":{"tags":["meta"],"summary":"Service health check and library stats","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/prompts":{"post":{"tags":["prompts"],"summary":"Save a prompt; returns its short code and the owner key","operationId":"save_prompt","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false},"get":{"tags":["prompts"],"summary":"Search or browse public prompts","operationId":"search_prompts","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Keywords.","title":"Q"},"description":"Keywords."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"enum":["writing","coding","business","marketing","education","research","productivity","creative","roleplay","data","career","health","legal","gaming","art","utility","other"],"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"popular | recent | title","default":"popular","title":"Sort"},"description":"popular | recent | title"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/prompts/{short_code}":{"get":{"tags":["prompts"],"summary":"Load a saved prompt by short code","operationId":"load_prompt","parameters":[{"name":"short_code","in":"path","required":true,"schema":{"type":"string","title":"Short Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/prompts/{short_code}/update":{"post":{"tags":["prompts"],"summary":"Edit a prompt you own (owner key required)","operationId":"update_prompt","parameters":[{"name":"short_code","in":"path","required":true,"schema":{"type":"string","title":"Short Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/prompts/{short_code}/delete":{"post":{"tags":["prompts"],"summary":"Delete a prompt you own (owner key required)","operationId":"delete_prompt","parameters":[{"name":"short_code","in":"path","required":true,"schema":{"type":"string","title":"Short Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/mine":{"post":{"tags":["prompts"],"summary":"List the prompts saved with an owner key","operationId":"list_my_prompts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}}},"components":{"schemas":{"DeleteRequest":{"properties":{"owner_key":{"type":"string","title":"Owner Key"}},"type":"object","required":["owner_key"],"title":"DeleteRequest"},"MineRequest":{"properties":{"owner_key":{"type":"string","title":"Owner Key"}},"type":"object","required":["owner_key"],"title":"MineRequest"},"SaveRequest":{"properties":{"title":{"type":"string","maxLength":120,"minLength":2,"title":"Title"},"text":{"type":"string","minLength":10,"title":"Text","description":"The full prompt / persona text to reproduce the context."},"category":{"type":"string","enum":["writing","coding","business","marketing","education","research","productivity","creative","roleplay","data","career","health","legal","gaming","art","utility","other"],"title":"Category","default":"other"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description","description":"One line on what it does."},"tags":{"items":{"type":"string"},"type":"array","maxItems":8,"title":"Tags"},"public":{"type":"boolean","title":"Public","description":"Listed in search for everyone; private = unlisted, loadable by code only.","default":false},"owner_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Key","description":"Reuse the user's key so the prompt joins their library."}},"type":"object","required":["title","text"],"title":"SaveRequest"},"UpdateRequest":{"properties":{"owner_key":{"type":"string","title":"Owner Key"},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Title"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"category":{"anyOf":[{"type":"string","enum":["writing","coding","business","marketing","education","research","productivity","creative","roleplay","data","career","health","legal","gaming","art","utility","other"]},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Public"}},"type":"object","required":["owner_key"],"title":"UpdateRequest"}}}}