File Conversion Endpoints#

Convert is the deterministic half of EnConvert: 51 endpoints that take a file or a URL and hand back the same content in another format. Every one is a POST to /v1/convert/<id>, so once you have called one you know how to call the rest.

One request shape#

Three things change between conversions: the id in the path, what you send, and what the result is. Nothing else moves.

Path. POST https://api.enconvert.com/v1/convert/<id>, where <id> names the conversion pair: url-to-pdf, doc-to-pdf, csv-to-json, heic-to-webp.

Input. Either a file or a URL.

  • File conversions, 46 of the 51, take multipart/form-data with the file in a file field.
  • Web page conversions, the other five, take application/json with a url field that accepts one URL or an array of them.

Output. Every conversion writes its result to object storage and answers with a signed download URL that is valid for 15 minutes. Endpoints that support direct_download can stream the bytes back as the response body instead; each family page states its own default. See Signed URLs.

Example#

Send a URL, get a PDF:

curl -X POST https://api.enconvert.com/v1/convert/url-to-pdf \
  -H "X-API-Key: sk_your_private_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
{
    "presigned_url": "https://spaces.example.com/...signed...",
    "object_key": "live/files/4127/url-to-pdf/example_20260405_123456789.pdf",
    "filename": "example_20260405_123456789.pdf",
    "file_size": 48213,
    "conversion_time_seconds": 2.41
}

The upload form of the same call, for the 46 file endpoints:

curl -X POST https://api.enconvert.com/v1/convert/doc-to-pdf \
  -H "X-API-Key: sk_your_private_key" \
  -F "[email protected]"

Pick a family#

Page Endpoints What it covers
Conversion Matrix all 51 Every input format and every output format in one table, with the endpoint id for each pair. Start here when you know what you have and what you want.
Web Pages 5 Render a live URL to PDF, to a full-page PNG, or to Markdown, or crawl an entire site and get one ZIP back.
Documents 13 Word, Excel, PowerPoint, Pages, Numbers, OpenDocument, HTML and Markdown into PDF, plus anything-to-pdf (36 input extensions) and anything-to-markdown (22).
Data Formats 11 JSON, XML, YAML, CSV and TOML in both directions, plus Markdown to HTML.
Images 22 JPEG, PNG, SVG, HEIC and WebP between each other, PDF pages rendered to JPEG, and same-format compression.

Each family page lists its endpoints in a table with the exact path for each. Every endpoint then has its own page: request parameters, the response, the error cases it can return, and code samples.

Office endpoints ignore page geometry. The nine LibreOffice-backed endpoints (doc-to-pdf, excel-to-pdf, ppt-to-pdf, odt-to-pdf, ods-to-pdf, odp-to-pdf, ots-to-pdf, pages-to-pdf, numbers-to-pdf) accept pdf_options but honour only grayscale. Page size, orientation and margins come from the source document, so setting one of those explicitly returns 400.

What every convert endpoint shares#

  • Credentials and content types are the same across the API. See Endpoints.
  • Async and batch are available on the five web page endpoints only. File uploads always run synchronously, one file per request. See Sync and Async Jobs and Batch Processing.
  • Upload size is capped per plan, starting at 5 MB on Founding. Over the cap you get 413 with your file size and the ceiling in the body. See Rate Limits and Quotas.
  • Cost is one op per conversion. A batch of 10 URLs is 10 ops, and the whole batch is checked against your remaining allowance before any page renders.
  • Timeouts are real. LibreOffice conversions are cut off at 120 seconds and return 504; the gateway itself gives up on any request after 300 seconds.
  • Errors use the same status codes across families: 400 for bad input, 401 for bad credentials, 402 for quota, 403 for a plan-gated feature, 413 for an oversized upload. See Errors.

Frequently asked questions#

Which endpoints accept a URL instead of a file?#

The five web page endpoints: url-to-pdf, url-to-screenshot, url-to-markdown, website-to-pdf and website-to-screenshot. The other 46 are upload-only, anything-to-pdf included. To convert a document that lives at a URL, fetch it yourself and upload the bytes.

Can I convert several files in one request?#

Not as uploads. Batching works on the URL endpoints, where the url field takes an array, and it needs a private key plus a plan with batch access; the Founding plan's batch limit is 0. See Batch Processing.

What if my format pair is not one of the 51?#

Check anything-to-pdf first: it accepts 36 input extensions and covers pairs that have no dedicated endpoint. For text you want to read rather than print, anything-to-markdown accepts 22. Neither one does OCR, so image input to anything-to-markdown returns 400.

How do I find the endpoint for a specific format pair?#

Open the Conversion Matrix. It lists every input format down one axis and every output across the other, with the endpoint id in the cell.