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
| Name | Type | Required | Description |
|---|---|---|---|
| data | string | Yes | Text or URL to encode |
| size | number | No | Image size in pixels (default: 256) |
| format | string | No | Output 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
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Website URL to capture |
| width | number | No | Viewport width (default: 1280) |
| height | number | No | Viewport height (default: 720) |
| fullPage | boolean | No | Capture 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
| Name | Type | Required | Description |
|---|---|---|---|
| html | string | No | HTML content to convert |
| url | string | No | URL to convert to PDF |
| format | string | No | Paper format: A4, Letter, etc. |
| margin | object | No | Page margins |
Request Body
{
"url": "https://pyrefm.xyz/docs",
"format": "A4"
}Response
{
"success": true,
"data": {
"pdfUrl": "https://...",
"pages": 5,
"size": "245KB"
}
}