Skip to main content
POST
/
v1
/
conversions
/
image-to-pdf
curl -X POST https://api.okrapdf.com/v1/conversions/image-to-pdf \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -F "file=@scan.png" \
  -F "namespace=scan-as-pdf"

Overview

Stores a PNG or JPEG from multipart upload or source URL as a private file asset, then publishes an immutable PDF derivative with preview and download URLs.
file
file
PNG or JPEG file when using multipart form data.
url
string
Source image URL when using JSON.
namespace
string
Optional hosted PDF namespace.
curl -X POST https://api.okrapdf.com/v1/conversions/image-to-pdf \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -F "file=@scan.png" \
  -F "namespace=scan-as-pdf"