API Documentation
Everything you need to integrate ToolCenter into your application. All endpoints accept both GET (query params) and POST (JSON body) requests.
🔑 Authentication
All API requests require a Bearer token. Get your API key from the dashboard.
Authorization: Bearer YOUR_API_KEY
⚠️ Keep your API key secret. Never expose it in client-side code. Always make API calls from your server.
🌐 Base URL
https://toolcenter.dev/api
⏱️ Rate Limits
Each API call counts as 1 unit against your monthly quota, regardless of which API you use.
| Plan | Monthly Calls | Price |
|---|---|---|
| Starter | 100 | Free |
| Pro | 10,000 | €9/mo |
| Business | 50,000 | €29/mo |
When you exceed your limit, the API returns 429 Too Many Requests.
Screenshot API
Capture any website as a pixel-perfect image
POST /v1/screenshot
|
GET /v1/screenshot
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | url or html | URL to capture |
| html | string | url or html | Raw HTML to render and capture |
| markdown | string | No | Markdown content to render |
| width | integer | No | Viewport width (320–3840). Default: 1920 |
| height | integer | No | Viewport height (240–2160). Default: 1080 |
| format | string | No | Output format: png, jpg, webp. Default: png |
| quality | integer | No | Image quality (1–100). For jpg/webp only |
| fullPage | boolean | No | Capture the full scrollable page. Default: false |
| selector | string | No | CSS selector to capture a specific element |
| clip | object | No | Clip region: {x, y, width, height} |
| delay | integer | No | Wait time in ms before capture (0–10000). Default: 0 |
| darkMode | boolean | No | Enable dark mode (prefers-color-scheme: dark). Default: false |
| blockAds | boolean | No | Block advertisements. Default: false |
| blockCookieBanners | boolean | No | Remove cookie consent banners. Default: false |
| blockChatWidgets | boolean | No | Remove chat widgets (Intercom, etc). Default: false |
| customCss | string | No | Custom CSS to inject before capture |
| customJs | string | No | Custom JavaScript to execute before capture |
| userAgent | string | No | Custom User-Agent string |
| headers | object | No | Custom HTTP headers as key-value pairs |
| authentication | object | No | HTTP basic auth: {username, password} |
| emulateDevice | string | No | Device to emulate: iPhone 12, iPhone 13, iPhone 14, iPad, iPad Pro, Pixel 5, Pixel 7 |
| geolocation | object | No | Spoof geolocation: {latitude, longitude} |
| timezone | string | No | Timezone ID, e.g. "America/New_York" |
| language | string | No | Browser language, e.g. "en-US" |
| deviceScale | integer | No | Device scale factor (1–3). Default: 1 |
| omitBackground | boolean | No | Transparent background (PNG only). Default: false |
| reducedMotion | boolean | No | Enable prefers-reduced-motion. Default: false |
Example
curl -X POST https://toolcenter.dev/api/v1/screenshot \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://github.com",
"width": 1920,
"height": 1080,
"format": "png",
"fullPage": true,
"darkMode": true,
"blockAds": true,
"blockCookieBanners": true,
"delay": 1000
}' --output github.png
Returns the image binary with Content-Type: image/png (or jpg/webp).
PDF API
Convert URLs and HTML to PDF documents
POST /v1/pdf
|
GET /v1/pdf
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | url or html | URL to convert to PDF |
| html | string | url or html | Raw HTML to convert to PDF |
| landscape | boolean | No | Landscape orientation. Default: false |
| printBackground | boolean | No | Print background graphics. Default: true |
| format | string | No | Paper format: A4, A3, A5, Letter, Legal, Tabloid. Default: A4 |
| margin | object | No | Margins: {top, right, bottom, left} as CSS values |
Example
curl -X POST https://toolcenter.dev/api/v1/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "A4",
"landscape": false,
"printBackground": true,
"margin": {"top": "1cm", "bottom": "1cm"}
}' --output document.pdf
Returns PDF binary with Content-Type: application/pdf.
QR Code API
Generate customizable QR codes
POST /v1/qr
|
GET /v1/qr
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Text or URL to encode (max 4000 chars) |
| size | integer | No | Image size in pixels (100–2000). Default: 300 |
| format | string | No | png or svg. Default: png |
| color | string | No | Foreground color (hex). Default: #000000 |
| bgColor | string | No | Background color (hex). Default: #ffffff |
| logo | string | No | URL of logo to embed in center |
Example
curl -X POST https://toolcenter.dev/api/v1/qr \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "https://toolcenter.dev",
"size": 500,
"format": "png",
"color": "#4f46e5",
"bgColor": "#ffffff"
}' --output qr.png
Returns image/png or image/svg+xml.
OG Image API
Create dynamic Open Graph images for social media
POST /v1/og-image
|
GET /v1/og-image
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Main title text (max 200 chars) |
| subtitle | string | No | Subtitle or description (max 300 chars) |
| bgColor | string | No | Background color (hex or CSS color) |
| textColor | string | No | Text color (hex or CSS color) |
| fontSize | integer | No | Title font size in pixels (12–120) |
| logo | string | No | URL of logo image to include |
| pattern | string | No | Background pattern: dots, lines, grid, none |
Example
curl -X POST https://toolcenter.dev/api/v1/og-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "My Blog Post Title",
"subtitle": "A deep dive into web APIs",
"bgColor": "#1e1b4b",
"textColor": "#ffffff",
"pattern": "dots"
}' --output og-image.png
Returns 1200×630 PNG image optimized for social media.
Metadata API
Extract meta tags and information from any URL
POST /v1/metadata
|
GET /v1/metadata
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL to extract metadata from |
Example
curl -X POST https://toolcenter.dev/api/v1/metadata \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com"}'
Response Example
{
"title": "GitHub: Let's build from here",
"description": "GitHub is where over 100 million developers...",
"ogTitle": "GitHub: Let's build from here",
"ogDescription": "GitHub is where over 100 million developers...",
"ogImage": "https://github.githubassets.com/images/modules/site/social-cards/campaign-social.png",
"twitterCard": "summary_large_image",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"canonical": "https://github.com/",
"language": "en"
}
Watermark API
Add text watermarks to website screenshots
POST /api/v1/watermark
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | url or html | Website URL to capture and watermark |
| html | string | url or html | Raw HTML to render and watermark |
| watermarkText | string | ✅ | Text to display as watermark |
| watermarkPosition | string | No | Position: center, top-left, top-right, bottom-left, bottom-right (default) |
| watermarkOpacity | float | No | Opacity from 0 to 1 (default: 0.5) |
| watermarkFontSize | integer | No | Font size in px (default: 24) |
| watermarkColor | string | No | CSS color (default: rgba(255,255,255,0.8)) |
| width | integer | No | Viewport width (default: 1920) |
| height | integer | No | Viewport height (default: 1080) |
| format | string | No | png, jpg, or webp (default: png) |
Example
curl -X POST https://toolcenter.dev/api/v1/watermark \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"watermarkText": "CONFIDENTIAL",
"watermarkPosition": "center",
"watermarkOpacity": 0.3,
"watermarkFontSize": 48,
"width": 1280,
"height": 720
}' --output watermarked.png
Image Compression API
Optimize and compress images or screenshots
POST /api/v1/compress
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | url or html | Image URL to compress, or webpage URL to screenshot and compress |
| html | string | url or html | Raw HTML to render, screenshot, and compress |
| quality | integer | No | Compression quality 1-100 (default: 80) |
| maxWidth | integer | No | Maximum output width (resizes proportionally) |
| maxHeight | integer | No | Maximum output height (resizes proportionally) |
| format | string | No | Output format: png, jpg/jpeg, webp (default: jpeg) |
Example — Compress a webpage screenshot
curl -X POST https://toolcenter.dev/api/v1/compress \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"quality": 60,
"maxWidth": 800,
"format": "webp"
}' --output compressed.webp
Example — Compress an existing image
curl -X POST https://toolcenter.dev/api/v1/compress \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/large-photo.jpg",
"quality": 50,
"maxWidth": 1200,
"format": "jpeg"
}' --output optimized.jpg
HTML to Image API
Render HTML and CSS directly as an image
POST /api/v1/html-to-image
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| html | string | ✅ | HTML content to render as image |
| css | string | No | Additional CSS to inject before rendering |
| width | integer | No | Viewport width (default: 800) |
| height | integer | No | Viewport height (default: 600) |
| format | string | No | png, jpg, or webp (default: png) |
| quality | integer | No | Image quality 1-100 (for jpg/webp) |
| omitBackground | boolean | No | Transparent background (PNG only) |
Example — Social media card
curl -X POST https://toolcenter.dev/api/v1/html-to-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<div style=\"background:linear-gradient(135deg,#6366f1,#8b5cf6);color:white;padding:60px;font-family:sans-serif\"><h1 style=\"font-size:48px;margin:0\">My Blog Post</h1><p style=\"font-size:24px;opacity:0.8\">A great article about APIs</p></div>",
"width": 1200,
"height": 630,
"format": "png"
}' --output social-card.png
💡 Tip: This API is perfect for generating dynamic social media cards, email headers, certificate images, and marketing banners from HTML templates.
Usage API
Check your current API usage and limits
GET /v1/usage
{
"plan": "Pro",
"used": 1234,
"limit": 10000,
"resets_at": "2026-03-01T00:00:00+00:00"
}
Error Codes
HTTP status codes and error responses
| Code | Meaning | Description |
|---|---|---|
| 200 | Success | Request succeeded. Binary data or JSON returned. |
| 401 | Unauthorized | Missing or invalid API key. |
| 422 | Validation Error | Invalid parameters. Check the error message. |
| 429 | Rate Limited | Monthly quota exceeded. Upgrade your plan. |
| 500 | Server Error | Something went wrong on our end. |
| 503 | Unavailable | Service temporarily unavailable. Retry shortly. |
{
"error": "Monthly quota exceeded.",
"limit": 10000,
"used": 10000,
"upgrade_url": "https://toolcenter.dev/pricing"
}