apyhub
FILE CONVERSION

Convert Markdown to PDF API

What it does

Markdown to PDF converts Markdown content into a downloadable PDF or a signed S3 URL. Send raw Markdown, a file upload, or a URL that points to a Markdown document, and you get the rendered PDF back in the format you choose.

Use the raw Markdown endpoints when your application already has the content in memory. The request body is the Markdown text itself, and the response is either a binary PDF download or a JSON object containing a data field with a signed S3 URL valid for 5 minutes. Use the file and URL endpoints when you want to convert an existing .md file or a remote Markdown resource instead.

The input limits are explicit: raw Markdown accepts up to 5 MB, URL-based conversion requires a remote resource served as text/markdown or text/plain and capped at 5 MB, and file uploads must be text/markdown, text/plain, or a .md file up to 3 MB. That makes Markdown to PDF a good fit for generating reports, documentation exports, or customer-facing handouts from content your system already stores as Markdown.

Choose the download response when you want to stream the PDF directly to a user, or the signed URL response when a downstream service needs to fetch the generated file later.

▣ ENDPOINT 01 / 06
POST
URL → PDF (file download)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-url-pdf-file

QUICKSTART

GUIDE

Quickstart

Convert a Markdown file at a public URL into a PDF download.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-url-pdf-file?output=sample-output" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.md"}'

What you'll get back

Returns a downloadable PDF file as binary data. The response body is the rendered PDF itself, not a JSON object.

TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
URL pointing to a Markdown file. The remote resource must respond with a Content-Type of text/markdown or text/plain and must not exceed 5 MB.

About this endpoint

What it does

Converts a Markdown file available at a URL into a PDF and returns the rendered document as a downloadable file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename base. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesURL pointing to a Markdown file. The remote resource must respond with a Content-Type of text/markdown or text/plain and must not exceed 5 MB.

Response

Returns a downloadable PDF file as a binary response. The output is a binary file rendered from the Markdown input.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable PDF file rendered from the Markdown input.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 06
POST
URL → PDF (S3 URL)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-url-pdf-url

QUICKSTART

GUIDE

Quickstart

Convert a Markdown file at a public URL into a PDF and return a signed download link.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-url-pdf-url?output=my-document" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.md"}'

What you'll get back

Returns a JSON object with a data string field containing a signed S3 URL for the generated PDF file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/consumer/converter-markdown-pdf/file.pdf?..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
URL pointing to a Markdown file. The remote resource must respond with a Content-Type of text/markdown or text/plain and must not exceed 5 MB.

About this endpoint

What it does

Converts a Markdown file available at a URL into a PDF and returns a signed S3 URL for the generated PDF file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name base. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesURL pointing to a Markdown file. Must be a valid URI. The remote resource must respond with Content-Type: text/markdown or text/plain and must not exceed 5 MB.

Response

Returns a JSON object with a data string field containing a signed S3 URL for the generated PDF file. The URL is valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesSigned S3 URL for the generated PDF file. Valid for 5 minutes.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 06
POST
File upload → PDF (file download)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-file-pdf-file

QUICKSTART

GUIDE

Quickstart

Convert a Markdown file into a PDF download.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-file-pdf-file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.md"

What you'll get back

Returns a downloadable PDF file as binary data.

(binary PDF file)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Markdown file to convert. Must have MIME type text/markdown or text/plain, or a .md file extension. Maximum size 3 MB.

About this endpoint

What it does

Converts an uploaded Markdown file into a PDF and returns the generated PDF as a downloadable binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesMarkdown file to convert. Must have MIME type text/markdown or text/plain, or a .md file extension. Maximum size 3 MB.

Response

Returns a downloadable PDF file as a binary response. The success response is a binary PDF generated from the Markdown input.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable PDF file rendered from the Markdown input.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 04 / 06
POST
File upload → PDF (S3 URL)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-file-pdf-url

QUICKSTART

GUIDE

Quickstart

Upload a Markdown file to generate a PDF download link.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-file-pdf-url?output=my-document" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.md"

What you'll get back

Returns a JSON object with a data string field containing a signed S3 URL for the generated PDF file.

{
  "data": "https://s3.amazonaws.com/bucket/consumer/converter-markdown-pdf/file.pdf?..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Markdown file to convert. Must have MIME type text/markdown or text/plain, or a .md file extension. Maximum size 3 MB.

About this endpoint

What it does

Converts an uploaded Markdown file into a PDF and returns a signed S3 URL for the generated PDF file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output

Request Body

ParameterTypeMandatoryDescription
fileStringYesMarkdown file to convert. Must have MIME type text/markdown or text/plain, or a .md file extension. Maximum size 3 MB.

Response

Returns a JSON object with a data string field containing a signed S3 URL for the generated PDF file, valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesSigned S3 URL for the generated PDF file (valid for 5 minutes).

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 05 / 06
POST
Raw Markdown → PDF (file download)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-raw-pdf-file

QUICKSTART

GUIDE

Quickstart

Convert raw Markdown into a downloadable PDF by sending the Markdown text in the request body.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-raw-pdf-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;# Title\n\n## Section\n\nParagraph text here.\n'

What you'll get back

Returns a binary PDF file (string with format: binary) rendered from the Markdown input.

PDF file download
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Raw Markdown content. Maximum size 5 MB.

About this endpoint

What it does

Converts raw Markdown content into a PDF file and returns the rendered PDF as downloadable binary output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw Markdown content. Maximum size 5 MB.

Response

Returns a binary PDF file download. The success response is a single binary payload, not a JSON object.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable PDF file rendered from the Markdown input.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
Raw Markdown content. Maximum size 5 MB.
▣ ENDPOINT 06 / 06
POST
Raw Markdown → PDF (S3 URL)
https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-raw-pdf-url

QUICKSTART

GUIDE

Quickstart

Send your raw Markdown in the request body to generate a PDF and receive a signed download URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/markdown-to-pdf/md-raw-pdf-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;# Title\n\n## Section\n\nParagraph text here.\n'

What you'll get back

Returns a JSON object with a data string field — a signed S3 URL for the generated PDF file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/consumer/converter-markdown-pdf/file.pdf?..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Raw Markdown content. Maximum size 5 MB.

About this endpoint

What it does

Converts raw Markdown content into a PDF and returns a signed S3 URL for the generated file. The request accepts the Markdown text in the body and can optionally take an output query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw Markdown content. Maximum size 5 MB.

Response

Returns a JSON object with a data string field containing a signed S3 URL for the generated PDF file. The URL is valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesSigned S3 URL for the generated PDF file. Format: URI. Valid for 5 minutes.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
Raw Markdown content. Maximum size 5 MB.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.