Skip to content

Introduction

Doppio's API includes several render methods that work in similar ways, but each one has important differences. This guide will help you understand them and choose the one you need.

Render modes

Doppio can return your document in three different ways: direct, sync, and async.

A direct route returns the document directly in response to your request.

A sync route does not return the document directly. Instead, it returns a URL where the rendered document is temporarily hosted.

INFO

If you provide a presigned URL, the returned file URL will point to your own S3 bucket. See here for more information.

An async route responds immediately, then processes your request in the background and calls the provided webhook when the render is complete. The resulting document is still delivered through a hosted URL. See here for more information about the async workflow.

Document types

Doppio can render your document as an image or a PDF. Supported image formats are PNG, JPEG, JPG and WEBP.

Making a request

All requests follow the same principle: send a POST request to the base URL https://api.doppio.sh with some common parameters in the body.

Part of the body changes depending on the render mode and the document type. A PDF route can include an optional pdf object, while an image route can include an optional screenshot object. Async routes also require a webhook parameter inside the doppio object.

Here is a summary of all available routes and what each one expects.

EndpointRender modeDocument typeBody
/v1/render/pdf/directDirectPDFCommon params, PDF params
/v1/render/pdf/syncSyncPDFCommon params, PDF params
/v1/render/pdf/asyncAsyncPDFCommon params, PDF params, Async params
/v1/render/screenshot/directDirectImageCommon params, Screenshot params
/v1/render/screenshot/syncSyncImageCommon params, Screenshot params
/v1/render/screenshot/asyncAsyncImageCommon params, Screenshot params, Async params

All rights reserved