Skip to Content

Render

POST
/v1/render

Renders one page of a document, or one frame of an image, at a readable size for vision models and document viewers. Size it with dpi or with width and height, never both; by default the response body is the image file.

Use thumbnail for fixed size previews, and screenshot for web pages as a browser shows them.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Static API key from PAPYRUS_API_KEY

Request Body

  1. body
source*Source

file://, http(s):// URL or :///

destination?|

Connector URI to write the result to

Defaultnull
output?OutputMode

json returns the envelope with the artifact inline, file returns the artifact as the response body; with a destination the response is always the light JSON envelope

Default"file"
Value in"file""json"
options?

Operation options, omitted fields take their defaults

Response Body

The JSON envelope (light with a destination), or the op file for output=file

  1. response
source*

The input document

result*

The primary artifact

options*

The request options with defaults applied

{
  "source": {
    "uri": "s3://demo-s3/papyrus-test/sample.pdf",
    "name": "sample.pdf",
    "size": 18810,
    "mimeType": "application/pdf",
    "extension": "pdf",
    "label": "pdf",
    "group": "document",
    "pageCount": 1
  },
  "result": {
    "uri": "s3://demo-s3/papyrus-test/sample-1.png",
    "name": "sample-1.png",
    "size": 397384,
    "mimeType": "image/png",
    "extension": "png",
    "label": "png",
    "group": "image",
    "width": 1275,
    "height": 1650
  },
  "options": {
    "page": 1,
    "dpi": 150,
    "format": "png"
  }
}