API Reference

Tool Endpoints

Utility APIs for common tasks like QR codes, screenshots, and PDF generation.

QR Code Generator

POST/api/tools/qrcode
$0.005
per request

Generate QR codes from any text or URL

Body Parameters

NameTypeRequiredDescription
datastringYesText or URL to encode
sizenumberNoImage size in pixels (default: 256)
formatstringNoOutput format: png, svg

Request Body

{
  "data": "https://pyrefm.xyz",
  "size": 256
}

Response

{
  "success": true,
  "data": {
    "qrCode": "data:image/png;base64,...",
    "originalData": "https://pyrefm.xyz",
    "size": "256x256"
  }
}

Screenshot Capture

POST/api/tools/screenshot
$0.050
per request

Capture screenshots of any website

Body Parameters

NameTypeRequiredDescription
urlstringYesWebsite URL to capture
widthnumberNoViewport width (default: 1280)
heightnumberNoViewport height (default: 720)
fullPagebooleanNoCapture full page (default: false)

Request Body

{
  "url": "https://pyrefm.xyz",
  "width": 1280,
  "fullPage": false
}

Response

{
  "success": true,
  "data": {
    "imageUrl": "https://...",
    "width": 1280,
    "height": 720,
    "format": "png"
  }
}

PDF Generation

POST/api/tools/pdf
$0.080
per request

Generate PDFs from HTML content or URLs

Body Parameters

NameTypeRequiredDescription
htmlstringNoHTML content to convert
urlstringNoURL to convert to PDF
formatstringNoPaper format: A4, Letter, etc.
marginobjectNoPage margins

Request Body

{
  "url": "https://pyrefm.xyz/docs",
  "format": "A4"
}

Response

{
  "success": true,
  "data": {
    "pdfUrl": "https://...",
    "pages": 5,
    "size": "245KB"
  }
}