{"openapi":"3.1.0","info":{"title":"Shotlane","version":"1.0.0","description":"Screenshot web pages, read them as Markdown, and render PDFs."},"servers":[{"url":"https://shotlane.dev"}],"components":{"schemas":{},"securitySchemes":{"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://shotlane.dev/oauth/authorize","tokenUrl":"https://shotlane.dev/oauth/token","scopes":{"render":"Render pages using your Shotlane credits"}}}}}},"security":[{"oauth":["render"]}],"paths":{"/gpt/screenshot":{"post":{"operationId":"takeScreenshot","summary":"Screenshot a web page","description":"Captures a screenshot. Show it to the user with the returned markdown_image.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public web page URL, e.g. https://example.com"},"full_page":{"type":"boolean","description":"Capture the whole page"},"device":{"type":"string","enum":["desktop","desktop_hd","laptop","ipad","iphone","pixel"]},"dark_mode":{"type":"boolean"},"selector":{"type":"string","description":"CSS selector of one element to capture"},"delay":{"type":"integer","description":"Extra wait in ms (0-10000)"}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"image_url":{"type":"string"},"markdown_image":{"type":"string"},"url":{"type":"string"},"credits_remaining":{"type":"integer"}}}}}},"401":{"description":"Not connected"},"402":{"description":"Out of credits"},"422":{"description":"Page could not be loaded"}}}},"/gpt/read":{"post":{"operationId":"readPage","summary":"Read a web page as Markdown","description":"Loads the page in a real browser (JavaScript runs) and returns its main content as Markdown.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public web page URL, e.g. https://example.com"},"main_content":{"type":"boolean","description":"Only the main article (default true)"},"selector":{"type":"string"}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"markdown":{"type":"string"},"word_count":{"type":"integer"},"credits_remaining":{"type":"integer"}}}}}},"401":{"description":"Not connected"},"402":{"description":"Out of credits"},"422":{"description":"Page could not be loaded"}}}},"/gpt/pdf":{"post":{"operationId":"renderPdf","summary":"Render HTML or a web page to PDF","description":"Creates a PDF and returns a download link valid for 24 hours. Provide html or url.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"Complete HTML document"},"url":{"type":"string","description":"Public web page URL, e.g. https://example.com"},"paper":{"type":"string","enum":["A4","Letter","Legal","A3","A5"]},"landscape":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pdf_url":{"type":"string"},"credits_remaining":{"type":"integer"}}}}}},"401":{"description":"Not connected"},"402":{"description":"Out of credits"},"422":{"description":"Page could not be loaded"}}}}}}