# PreteWorks API > One key for the whole document-to-web pipeline — over HTTP or MCP, priced per call > (1 unit = $0.002), with a free tier of 500 units/month and no card. > Web: turn any URL into clean Markdown, structured JSON (via AI), a PDF, or a screenshot; > plus batch and same-origin crawl. > PDF: create (from HTML, Markdown, images, .docx, or invoice/receipt/report templates), > edit (merge, split, select, rotate, watermark, number pages, read/set metadata), and > read (extract text, read/fill forms). ## For AI agents - MCP server (Streamable HTTP): https://api.preteworks.com/mcp Authenticate: "Authorization: Bearer ". Setup: https://api.preteworks.com/docs/mcp Tools: - render_html_to_pdf: Render HTML to PDF ($0.01) - merge_pdfs: Merge PDFs ($0.002) - select_pages: Select PDF pages ($0.002) - rotate_pdf: Rotate PDF ($0.002) - watermark_pdf: Watermark PDF ($0.002) - extract_pdf_text: Extract text from a PDF ($0.002) - markdown_to_pdf: Render Markdown to PDF ($0.01) - images_to_pdf: Images to PDF ($0.002) - split_pdf: Split a PDF ($0.002) - read_pdf_form: Read a PDF form ($0.002) - fill_pdf_form: Fill a PDF form ($0.002) - number_pdf: Number PDF pages ($0.002) - pdf_info: Read PDF info ($0.002) - set_pdf_metadata: Set PDF metadata ($0.002) - docx_to_text: Extract text from a DOCX ($0.002) - docx_to_pdf: Convert a DOCX to PDF ($0.01) - data_to_spreadsheet: Create a spreadsheet from rows ($0.002) - file_to_markdown: Convert a file to Markdown ($0.002) - render_document: Generate a document ($0.01) - read_url: Read a web page as Markdown ($0.004) - scrape_page: Scrape a web page ($0.006) - url_to_pdf: Snapshot a web page as PDF ($0.01) - url_to_screenshot: Screenshot a web page ($0.01) - extract_data: Extract structured data (from $0.02) - summarize_document: Summarize a document (varies) - answer_from_document: Answer a question from a document (varies) - batch_scrape: Batch: URLs to Markdown ($0.004 per URL) - crawl_site: Crawl a site to Markdown ($0.006 + $0.004 per page) - map_site: Map a site's URLs ($0.006) - OpenAPI spec: https://api.preteworks.com/openapi.json ## Docs - [Docs](https://api.preteworks.com/docs): auth, quickstart, every endpoint with its price, errors, limits. - [Pricing](https://api.preteworks.com/pricing): price per call, free tier, caps. - [Get an API key](https://api.preteworks.com/signup): free tier or pay as you go, self-serve. - [PreteWorks](https://preteworks.com/): the brand page — all offerings. ## Notes - Legacy base URL https://pdf.preteworks.com still works for existing integrations. - Every URL-fetching op blocks private/internal hosts (SSRF-guarded) and is usage-capped per key and account-wide. - Errors are structured JSON: {"error": "code", "message": "human text"}. - Only successful calls are billed; a failed call is not billed but still counts toward the monthly cap. Retries are billed per attempt (there is no request-level de-dup).