apyhub
FILE CONVERSION · SMART GENERATION

Convert Markdown to PDF API

Hosted on ApyHub

What it does

Markdown to PDF converts Markdown content into a PDF and gives you either a downloadable file or a signed S3 URL, depending on the endpoint you choose.

Send raw Markdown text, a Markdown file upload, or a URL that points to a Markdown resource. For URL-based conversion, the remote file must respond with text/markdown or text/plain and stay under 5 MB. For file uploads, the input must be text/markdown, text/plain, or a .md file, with a 3 MB limit. Raw Markdown accepts up to 5 MB.

Use Markdown to PDF when you need to render docs, README files, release notes, invoices, or generated reports into a shareable PDF format. The response is either a binary PDF download or a JSON object containing data, a signed S3 URL valid for 5 minutes.

Choose the output mode that fits your workflow: direct file download for immediate delivery, or a temporary URL when you want to store, forward, or process the generated PDF downstream.

▣ ENDPOINT 01 / 06
POST
URL → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-url-pdf-url
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/convert-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.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. 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 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 02 / 06
POST
File upload → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-file-pdf-file
QUICKSTARTGUIDE

Quickstart

Convert a Markdown file to a PDF by uploading the file and choosing an output name.

curl -X POST "http://localhost:8080/apyhub/convert-markdown-to-pdf/md-file-pdf-file?output=my-document" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.md"

What you'll get back

Returns a downloadable PDF file as binary data, rendered from the Markdown input.

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

Uploads a Markdown file and returns a downloadable PDF file rendered from that input.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated PDF 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 output schema is a single binary string representing the rendered PDF.

ParameterTypeMandatoryDescription
valueStringYesBinary PDF file downloaded from the Markdown input.

Notes

The uploaded file must be a Markdown source accepted by the schema: either text/markdown, text/plain, or a .md file, and it must not exceed 3 MB.

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 03 / 06
POST
File upload → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-file-pdf-url
QUICKSTARTGUIDE

Quickstart

Upload a Markdown file to generate a PDF and receive a signed download URL.

curl -X POST "http://localhost:8080/apyhub/convert-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 required 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.
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 to the generated PDF. The upload is sent in the request body as a binary file, and the response contains the PDF download URL in data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. 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 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

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
Raw Markdown → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-raw-pdf-file
QUICKSTARTGUIDE

Quickstart

Convert raw Markdown into a PDF file by sending the Markdown text as plain text.

curl -X POST "http://localhost:8080/apyhub/convert-markdown-to-pdf/md-raw-pdf-file?output=my-document" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;# Title\n\n## Section\n\nParagraph text here.'

What you'll get back

Returns a binary PDF file (format: binary) downloadable as the rendered output of your Markdown input.

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 downloadable PDF file. You send the Markdown in the request body and receive the rendered PDF as a binary file in response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename base. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw Markdown content. Maximum size 5 MB.

Response

Returns a downloadable PDF file as a binary response. The output schema is a single binary string, so the response is not a JSON object and does not include named fields.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
Raw Markdown content. Maximum size 5 MB.
▣ ENDPOINT 05 / 06
POST
Raw Markdown → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-raw-pdf-url
QUICKSTARTGUIDE

Quickstart

Send raw Markdown in the request body to generate a PDF link.

curl -X POST "http://localhost:8080/apyhub/convert-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.'

What you'll get back

Returns a JSON object with a data string field containing a signed URL to 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.
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 where the generated file can be downloaded.

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 URI to the generated PDF file. The data value is a signed S3 URL 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
string
Raw Markdown content. Maximum size 5 MB.
▣ ENDPOINT 06 / 06
POST
URL → PDF
http://localhost:8080/apyhub/convert-markdown-to-pdf/md-url-pdf-file
QUICKSTARTGUIDE

Quickstart

Convert a Markdown file at a URL into a downloadable PDF. Replace the sample Markdown URL if you want to render your own file.

curl -X POST "http://localhost:8080/apyhub/convert-markdown-to-pdf/md-url-pdf-file?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 binary PDF file in the response body, downloaded from the Markdown input.

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 generated PDF as a downloadable binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name without extension. 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 of text/markdown or text/plain and must not exceed 5 MB.

Response

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

ParameterTypeMandatoryDescription
binaryStringYesDownloadable PDF file rendered from the Markdown input.

Notes

The source Markdown URL must point to a resource that responds with Content-Type: text/markdown or text/plain, and the file must be no larger than 5 MB.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.