{"openapi":"3.1.0","info":{"title":"Ask Velorin Pay","version":"1","description":"Answers questions about Velorin Pay from the site's own pages. The Accept header picks text/html, text/markdown or application/json."},"servers":[{"url":"https://velorinpay.com"}],"paths":{"/ask":{"get":{"summary":"Ask by query, or read the usage page without q","operationId":"askByQuery","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2000}}],"responses":{"200":{"description":"The answer, or without q the usage page.","headers":{"x-ornithopter-served-from":{"schema":{"type":"string","enum":["model","store","coalesced","published"]}},"x-ornithopter-outcome":{"description":"pending while the answer is still being written.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Answer"},{"$ref":"#/components/schemas/Help"}]}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"404":{"description":"The site has no page that answers this (outcome not_covered), or has not answered it yet (outcome deferred).","headers":{"x-ornithopter-outcome":{"schema":{"type":"string","enum":["not_covered","deferred"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"429":{"description":"Too many questions from one visitor.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Searching the pages failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"502":{"description":"The model could not answer just now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"504":{"description":"The answer took too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"301":{"description":"A question a slug can ask is sent to /ask/{slug}.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"description":"An empty q, or not a question.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"413":{"description":"Questions are limited to 2000 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Ask in the request body","operationId":"askByBody","requestBody":{"required":true,"content":{"text/plain":{"schema":{"type":"string","maxLength":2000}},"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"An answer, or a notice that the site has answered all it can today or is still writing the answer.","headers":{"x-ornithopter-served-from":{"schema":{"type":"string","enum":["model","store","coalesced","published"]}},"x-ornithopter-outcome":{"description":"pending while the answer is still being written.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"404":{"description":"The site has no page that answers this (outcome not_covered), or has not answered it yet (outcome deferred).","headers":{"x-ornithopter-outcome":{"schema":{"type":"string","enum":["not_covered","deferred"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"429":{"description":"Too many questions from one visitor.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Searching the pages failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"502":{"description":"The model could not answer just now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"504":{"description":"The answer took too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"400":{"description":"An empty body, or not a question.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"413":{"description":"Questions are limited to 2000 characters. Bodies are limited to 16 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}}}}},"/ask/{slug}":{"get":{"summary":"Ask as a path","operationId":"askBySlug","parameters":[{"name":"slug","in":"path","required":true,"description":"The question as up to 20 words of letters, digits and apostrophes, joined by hyphens.","schema":{"type":"string"},"example":"how-long-do-puffins-live"}],"responses":{"200":{"description":"An answer, or a notice that the site has answered all it can today or is still writing the answer.","headers":{"x-ornithopter-served-from":{"schema":{"type":"string","enum":["model","store","coalesced","published"]}},"x-ornithopter-outcome":{"description":"pending while the answer is still being written.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"404":{"description":"The site has no page that answers this (outcome not_covered), or has not answered it yet (outcome deferred).","headers":{"x-ornithopter-outcome":{"schema":{"type":"string","enum":["not_covered","deferred"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"429":{"description":"Too many questions from one visitor.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Searching the pages failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"502":{"description":"The model could not answer just now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"504":{"description":"The answer took too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Not a question path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"413":{"description":"Questions are limited to 2000 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}}}}},"/ask/topics":{"get":{"summary":"List the topics Ask answers, first page","operationId":"listTopics","responses":{"200":{"description":"A page of the published answers, then the topics of every indexed document, each a URL that asks it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topics"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"429":{"description":"Too many questions from one visitor.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/ask/topics/{page}":{"get":{"summary":"List the topics Ask answers, a later page","operationId":"listTopicsPage","parameters":[{"name":"page","in":"path","required":true,"schema":{"type":"integer","minimum":2}}],"responses":{"200":{"description":"A page of the published answers, then the topics of every indexed document, each a URL that asks it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topics"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}},"404":{"description":"No such page.","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Too many questions from one visitor.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Answer":{"type":"object","required":["question","answer","sources","notice","follow_ups"],"properties":{"question":{"type":"string"},"answer":{"type":"string","description":"Markdown citing sources inline as [n]."},"sources":{"type":"array","items":{"type":"object","required":["cited","title","url"],"properties":{"cited":{"type":"array","items":{"type":"integer"}},"title":{"type":"string"},"url":{"type":["string","null"]}}}},"notice":{"type":"string"},"follow_ups":{"type":"array","items":{"type":"object","required":["question","url"],"properties":{"question":{"type":"string"},"url":{"type":"string"}}}}}},"Topics":{"type":"object","required":["title","description","entry","page","pages","reviewed","documents"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"entry":{"type":"string"},"page":{"type":"integer"},"pages":{"type":"array","items":{"type":"object","required":["url","from","to"],"properties":{"url":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"}}}},"reviewed":{"type":"array","items":{"type":"object","required":["question","url","reviewed_on"],"properties":{"question":{"type":"string"},"url":{"type":"string"},"reviewed_on":{"type":"string","format":"date"}}}},"documents":{"type":"array","items":{"type":"object","required":["name","topics"],"properties":{"name":{"type":"string"},"topics":{"type":"array","items":{"type":"object","required":["topic","url"],"properties":{"topic":{"type":"string"},"url":{"type":"string"}}}}}}}}},"Refusal":{"type":"object","required":["message","hint"],"properties":{"message":{"type":"string"},"hint":{"type":"string"}}},"Help":{"type":"object","required":["title","description","examples","topics","agent_instructions","hint","openapi"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"object","required":["question","url","path"],"properties":{"question":{"type":"string"},"url":{"type":"string"},"path":{"type":"string"}}}},"topics":{"type":"string"},"agent_instructions":{"type":"string"},"hint":{"type":"string"},"openapi":{"type":"string"}}}}}}