{"openapi":"3.1.0","info":{"title":"Pentasor","version":"1.0.0","description":"Senses for AI agents on live websites and media."},"servers":[{"url":"https://api.pentasor.com"}],"paths":{"/v1/read":{"post":{"operationId":"read","summary":"Read a page","description":"Read a URL as it is delivered: status, title, text and links, without running JavaScript. Works on every key. If `sparse` is true the page builds itself in the browser: use `see` instead.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL"}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/see":{"post":{"operationId":"see","summary":"See a page","description":"Load a URL in a real browser and return a screenshot you can look at plus the rendered text. For a video URL, returns frames from it. Free keys get a monthly allowance: call `senses` to see what is left.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL"},"view":{"type":"string","enum":["desktop","mobile"],"description":"screen to load it on (default desktop)"},"full_page":{"type":"boolean","description":"capture the whole page, not just the first screen"}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/hear":{"post":{"operationId":"hear","summary":"Hear audio or video","description":"Transcribe speech from an audio or video URL, up to 20 MB: full text, language and timed segments. Uses one perception per started minute of audio. Free keys get a monthly allowance of minutes.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL of an audio or video file"}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/perceive":{"post":{"operationId":"perceive","summary":"Perceive a target","description":"Health check with an explanation: is it up, how fast, its security headers, and an excerpt of what it says. Paid keys also get sight, or hearing for media. Its `ok` covers those readings only and does NOT check any claim about the content: use `verify` for that.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL"},"intent":{"type":"string","description":"what it should do; recorded with the percept, not judged"}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/verify":{"post":{"operationId":"verify","summary":"Verify a claim","description":"Check a claim about a live page. `must_contain`, `must_not_contain` and `expect_status` are checked exactly. A free-text `expectation` is judged from the page's text on paid keys; on other keys, or when the text can't settle it (how a page looks, what a click does), the verdict is `unverified` and y","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL"},"expectation":{"type":"string","description":"what should be true, in plain words"},"must_contain":{"type":"array","items":{"type":"string"},"description":"text that must appear (ignores case)"},"must_not_contain":{"type":"array","items":{"type":"string"},"description":"text that must not appear (ignores case)"},"expect_status":{"type":"integer","description":"exact HTTP status expected; otherwise any answer under 400 counts as reachable"}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/drive":{"post":{"operationId":"drive","summary":"Drive a web flow","description":"Open a URL in a real browser, run up to 20 steps (60 seconds at most), and return what happened: a timeline, screenshots and the final text. This acts on the live site: clicks and form submits are real. Nothing persists between calls, and typed text is not logged. Steps: {do: goto|click|type|press|w","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","description":"http(s) URL"},"steps":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"do":{"type":"string","enum":["goto","click","type","press","wait","waitFor","scrollIntoView","mark"]},"testid":{"type":"string"},"role":{"type":"string"},"name":{"type":"string"},"selector":{"type":"string"},"text":{"type":"string"},"key":{"type":"string"},"url":{"type":"string"},"ms":{"type":"integer"},"label":{"type":"string"}},"required":["do"],"additionalProperties":false}},"view":{"type":"string","enum":["desktop","mobile"],"description":"screen to load it on (default desktop)"}},"required":["target","steps"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/senses":{"post":{"operationId":"senses","summary":"What can this key do","description":"What this key can use right now: its plan, which tools are open, and how many perceptions are left this month. Free to call.","security":[{"bearer":[]}],"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"type":"object","description":"The result. Screenshot links last 1 hour.","additionalProperties":true}}}},"401":{"description":"Missing or invalid key"},"402":{"description":"A monthly allowance is used up. The error has an upgrade link."},"422":{"description":"Bad or refused target"},"429":{"description":"Too many per minute"}}}},"/v1/history":{"get":{"operationId":"history","summary":"Past checks on this key, newest first, for 90 days. Paid plans. No page text or screenshots.","security":[{"bearer":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"entries, and a cursor when there are more"},"403":{"description":"Not on a paid plan"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"psk_ key (trial: POST /try) or OAuth token"}}}}