API Documentation
Base URL: https://daebwon.xyz · Authentication via Bearer Token (Authorization: Bearer dw_live_...).
1. Render HTML, Markdown, or URL (POST /api/v1/render)
Returns raw binary application/pdf or image/png. Response headers include X-Render-Duration-Ms, X-Quota-Limit, and X-Quota-Remaining.
curl -X POST https://daebwon.xyz/api/v1/render \
-H "Authorization: Bearer dw_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "markdown",
"format": "pdf",
"page_format": "A4",
"landscape": false,
"margin_mm": 12,
"content": "# Monthly Statement\n\nThank you for your business."
}' --output statement.pdf
Request Body Parameters
mode:"html"|"markdown"|"url"(default:"html")content: HTML or Markdown string (up to 512 KB; required forhtmlandmarkdown)url: Publichttp://orhttps://URL (required forurl; private/loopback IPs are blocked)format:"pdf"|"png"(default:"pdf")page_format:"A4"|"Letter"|"Legal"(PDF only)landscape: boolean (default:false)full_page: boolean (PNG only; default:true)viewport_width/viewport_height: 320–2560 px (default:1280x800)margin_mm: 0–40 mm (PDF only; default:12)
2. Check Monthly Usage (GET /api/v1/usage)
curl https://daebwon.xyz/api/v1/usage \ -H "Authorization: Bearer dw_live_YOUR_KEY"
3. Python Example
import httpx
resp = httpx.post(
"https://daebwon.xyz/api/v1/render",
headers={"Authorization": "Bearer dw_live_YOUR_KEY"},
json={"mode": "url", "url": "https://example.com", "format": "png", "full_page": True},
timeout=30,
)
resp.raise_for_status()
open("capture.png", "wb").write(resp.content)
Support
Need custom volume or key rotation? Email support@daebwon.xyz.