Skip to main content
POST
https://api.iyzpdf.com/v1
/
convert
/
markdown-to-pdf
curl
curl --request POST \
  --url https://api.iyzpdf.com/v1/convert/markdown-to-pdf \
  --header "X-API-Key: $IYZPDF_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "markdown": "# Release Notes\n\n- New PDF routes\n- Updated credit tracking"
  }' \
  --output release-notes.pdf
{
  "fileName": "output.pdf",
  "size": 183240,
  "creditsUsed": 1,
  "creditsRemaining": 49,
  "contentType": "application/pdf"
}

Notes

  • Credits: 1
  • Authenticated Markdown payloads and uploads are limited to 100 MB
  • Uploaded Markdown must contain valid UTF-8 text
  • The generated output file name is markdown.pdf

Authorizations

X-API-Key
string
header
required

Send your server-side API key in the X-API-Key header.

Body

markdown
string
required
options
object
Example:
{
"format": "A4",
"marginTop": "2cm",
"marginBottom": "2cm",
"printBackground": true
}

Response

Successful response.

fileName
string
required
size
integer<int32>
required
creditsUsed
integer<int32>
required
contentType
string
required
creditsRemaining
integer<int32> | null