@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Urlbox API
@base https://api.urlbox.io
@version v1
@auth Bearer bearer
@endpoints 1
@toc render(1)

@endpoint POST /v1/render/sync
@desc Render a URL as an image or video
@optional {format: str(png/jpg/pdf/svg/mp4/webp/webm/html) # The format of the rendered output, url: str # The URL to render as an image or video, html: str # The raw HTML to render as an image or video, width: int # The viewport width of the rendered output, height: int # The viewport height of the rendered output, block_ads: bool # Whether to block ads on the rendered page, hide_cookie_banners: bool # Whether to hide cookie banners on the rendered page, click_accept: bool # Whether to automatically click accept buttons on the rendered page, gpu: bool # Whether to enable GPU rendering, retina: bool # Whether to render the image in retina quality, thumb_width: int # The width of the thumbnail image, thumb_height: int # The height of the thumbnail image, full_page: bool # Whether to capture the full page, selector: str # The CSS selector of an element you would like to capture, delay: str # The amount of milliseconds to delay before taking a screenshot, wait_until: str(requestsfinished/mostrequestsfinished/loaded/domloaded) # When, metadata: bool # Whether to return metadata about the URL, wait_for: str # CSS selector of an element to wait to be present in the web page before rendering, wait_to_leave: str # CSS selector of an element, such as a loading spinner, to wait to leave the web page before rendering}
@returns(200) {renderUrl: str(uri), size: int(int64)} # Successful operation
@errors {307: Temporary Redirect, 400: Bad request, 401: Unauthorized, 500: Internal server error}

@end
