{"openapi":"3.1.0","info":{"title":"YES/NO API","version":"0.1.0","description":"Binary checks on supplied text. A false result means the proposition was not established from the text."},"servers":[{"url":"https://answeryesno.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key beginning ysn_. Keep it on your server."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}}},"paths":{"/v1/check":{"post":{"operationId":"checkText","summary":"Check one yes/no question against supplied text","security":[{"apiKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","minLength":8,"maxLength":100},"description":"Reuse for retries of the same request, up to seven days. Different input with the same key is rejected."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question","text"],"properties":{"question":{"type":"string","description":"A short yes/no question. Default maximum 300 UTF-8 bytes."},"text":{"type":"string","description":"Text to inspect. Default maximum 6000 UTF-8 bytes."}}}}}},"responses":{"200":{"description":"The check completed. One credit is consumed, except on an idempotent replay.","headers":{"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Check-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Invalid or oversized input"},"401":{"description":"Invalid or revoked API key"},"402":{"description":"Allowance exhausted; purchase credits"},"409":{"description":"Request pending or idempotency conflict"},"429":{"description":"Rate limit reached"},"503":{"description":"Busy or unavailable; no credit consumed"}}}},"/api/me":{"get":{"operationId":"getBalance","summary":"Read account and remaining credits","security":[{"apiKey":[]}],"responses":{"200":{"description":"Account and balance"},"401":{"description":"Invalid API key"}}}}}}