Markdown to PDF
v1.0REST API

API 문서

프로그래밍으로 Markdown을 PDF로 변환하세요. 우리의 REST API를 사용하면 단일 HTTP 요청으로 Markdown 콘텐츠에서 전문적이고 스타일링된 PDF를 생성할 수 있습니다.

빠른 시작

간단한 curl 명령어로 30초 만에 PDF를 생성하세요.

1

API 키 획득

대시보드의 API Keys 에서 키를 생성하세요.

2

Markdown 작성

유효한 Markdown은 모두 지원됩니다 — 제목, 목록, 코드 블록, 표, 이미지.

3

요청 전송

키와 Markdown을 사용하여 POST 요청을 보내세요. PDF를 반환 받습니다.

cURL
curl -X POST https://markdowntopdfconverter.com/api/v1/convert \
  -H "Authorization: Bearer mp_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello World\n\nThis is a **test**.", "templateId": "clean"}' \
  -o output.pdf

인증

apiDocs.authentication.description

요청 헤더

헤더설명
AuthorizationBearer mp_live_...Bearer가 앞에 붙는 API 키
Content-Typeapplication/json모든 요청에 필수

apiDocs.authentication.keyFormat


POST /api/v1/convert

Markdown을 스타일링된 PDF 문서로 변환합니다.

요청 본문

markdownstring필수

변환할 Markdown 콘텐츠. 최대 200,000자.

templateIdstring선택

사용할 템플릿. 다음 중 하나: clean, executive, resume, academic, legal, creative. 기본: clean.

filenamestring선택

다운로드된 PDF 파일의 이름. 기본: document.pdf.

localestring선택

렌더링용 로케일. 다음 중 하나: en, es, fr, de, ja, zh-CN, ko, pt-BR, ar, ru, hi, it. 기본: en.

customTemplateIdUUID선택

저장된 커스텀 템플릿의 UUID. 템플릿은 API 키 사용자가 소유해야 합니다.

optionsobject선택

변환 옵션: pageNumbers (boolean), bodyTextColor (hex), headingTextColor (hex), creativeAccent (slate|purple|blue|emerald|rose|amber).

요청 예시

Python
import requests

api_key = "mp_live_your_api_key_here"
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}
payload = {
    "markdown": "# Quarterly Report\n\n## Revenue\n\nRevenue grew **15%** this quarter.",
    "templateId": "executive",
    "options": {"pageNumbers": True}
}

response = requests.post(
    "https://markdowntopdfconverter.com/api/v1/convert",
    json=payload,
    headers=headers
)

with open("report.pdf", "wb") as f:
    f.write(response.content)
JavaScript
const response = await fetch(
  "https://markdowntopdfconverter.com/api/v1/convert",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${apiKey}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      markdown: "# Invoice\n\n**Amount:** $1,200\n\n| Item | Qty | Price |\n| --- | --- | --- |\n| Widget | 5 | $240 |",
      templateId: "clean",
      filename: "invoice",
    }),
  }
);

const blob = await response.blob();
const url = URL.createObjectURL(blob);

// Trigger download
const a = document.createElement("a");
a.href = url;
a.download = "invoice.pdf";
a.click();

템플릿

전문적으로 설계된 6가지 템플릿 중 선택하세요. 각 템플릿은 독특한 타이포그래피, 간격 및 색상 스키머를 가집니다.

clean

Clean

깨깧한 간격의 미니멀, 현대적 sans-serif 디자인.

executive

Executive

전문적인 네비 틱세니 및 페이지 번호가 있는 Serif 제목.

resume

Resume

이력서에 최적화된 콘팩트 단일 컬럼 레이아웃.

academic

Academic

번호된 제목, 넓직한 간격 및 EB Garamond 본문.

legal

Legal

정식 인용 포맷으로 더블 간격의 serif 본문.

creative

Creative

구성 가능한 강조 색상의 굿은 DM Sans 제목.


에러 코드

각 응답은 표준 HTTP 상태 코드를 사용합니다. 결과 처리 방법을 결정하는 데 사용하세요.

상태의미조치
200성공 — PDF 반환응답 본문에서 PDF를 다운로드하세요.
400잘못된 요청 본문JSON 페이로드가 위 스키마와 일치하는지 확인하세요.
401잘못되거나 없는 API 키API 키가 활성화되어 있고 올바르게 형식화되었는지 확인하세요.
402API 크레딩 소진대시보드에서 크레딩을 추가 구매하세요.
404커스텀 템플릿을 찾을 수 없음customTemplateId가 올바르고 당신에게 속해 있는지 확인하세요.
415잘못된 Content-TypeContent-Type 헤더를 application/json으로 설정하세요.
422잘못된 변환 옵션options 객체가 스펙과 일치하는지 확인하세요.
429요청 한도 도달기다린 후 재시도하세요. Retry-After 헤더를 확인하세요.
500서버 오류지수 백오프로 재시도하세요. 지속되면 지원팀에 문의하세요.

API 요금

API 호출은 월간으로 추적됩니다. 각 성공적인 변환은 티어의 월간 한도에 산입니다.

Free

$0

25 / month

테스트 및 평가용.

Starter

$9

500 / month

개인 및 작은 프로젝트용.

Pro

$29

1,000 / month

우선 생성, API를 통한 커스텀 템플릿 지원.

더 필요하신가요? 커스텀 기업 요금에 대해 문의하세요.