Revecto
API reference

Convert HTML to PDF

POST
/v1/convert

Renders html to a PDF with the chosen engine. Remote images, stylesheets and fonts are fetched and inlined first; one that cannot be fetched is skipped and counted in X-Skipped-Resources. Send the request to the host of your project's region, api.eu.revecto.dev, api.us.revecto.dev or api.apac.revecto.dev; see Regions.

Authorization

ApiKeyAuth
headerAuthorizationBearer <opaque>

API key passed as Bearer token (e.g. rvt_...).

Request Body

application/json
  1. body
html*string

Complete HTML document to render. Remote images, stylesheets and fonts it references are fetched before rendering.

engine*Engine

Rendering engine, required on every render, with no default.

  • chromium renders the document in a full browser engine and supports the CSS a current browser prints; it is the slower engine. It prints @page margin boxes with counter(page) and counter(pages), and repeats a position: fixed element on every page.
  • forme lays the document out without a browser: it is faster and supports a subset of HTML and CSS. A document outside that subset, including any character no available font covers (Arabic, Hebrew, Thai, Devanagari and monochrome emoji are covered by built-in fonts; for Chinese, Japanese and Korean link a Google Fonts stylesheet or register a TrueType font; color emoji are not available; Arabic-Indic and Persian digits are refused because Forme draws them in reverse order), is refused with 422 document not supported by the forme engine, whose unsupported field lists what was not supported.
Value in"forme""chromium"
options?

Page setup for a render. Every property is optional; an omitted one takes its default. An invalid value is refused with 400 invalid request body: <cause>, and a property not listed here with 400 invalid request body: unknown option: <name>.

Response Body

The PDF document; the body is binary.

response?fileapplication/pdf
Formatbinary
Example Request
curl -X POST 'https://api.eu.revecto.dev/v1/convert' \  -H 'Content-Type: application/json' \  -d '{  "engine": "chromium",  "html": "<html><body><h1>Invoice INV-2026-0042</h1></body></html>",  "options": {    "paper_size": "A4",    "landscape": false  }}'
Example Response
"<binary PDF>"