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.

PlanMonthly CallsPrice
Starter100Free
Pro10,000€9/mo
Business50,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

ParameterTypeRequiredDescription
urlstringurl or htmlURL to capture
htmlstringurl or htmlRaw HTML to render and capture
markdownstringNoMarkdown content to render
widthintegerNoViewport width (320–3840). Default: 1920
heightintegerNoViewport height (240–2160). Default: 1080
formatstringNoOutput format: png, jpg, webp. Default: png
qualityintegerNoImage quality (1–100). For jpg/webp only
fullPagebooleanNoCapture the full scrollable page. Default: false
selectorstringNoCSS selector to capture a specific element
clipobjectNoClip region: {x, y, width, height}
delayintegerNoWait time in ms before capture (0–10000). Default: 0
darkModebooleanNoEnable dark mode (prefers-color-scheme: dark). Default: false
blockAdsbooleanNoBlock advertisements. Default: false
blockCookieBannersbooleanNoRemove cookie consent banners. Default: false
blockChatWidgetsbooleanNoRemove chat widgets (Intercom, etc). Default: false
customCssstringNoCustom CSS to inject before capture
customJsstringNoCustom JavaScript to execute before capture
userAgentstringNoCustom User-Agent string
headersobjectNoCustom HTTP headers as key-value pairs
authenticationobjectNoHTTP basic auth: {username, password}
emulateDevicestringNoDevice to emulate: iPhone 12, iPhone 13, iPhone 14, iPad, iPad Pro, Pixel 5, Pixel 7
geolocationobjectNoSpoof geolocation: {latitude, longitude}
timezonestringNoTimezone ID, e.g. "America/New_York"
languagestringNoBrowser language, e.g. "en-US"
deviceScaleintegerNoDevice scale factor (1–3). Default: 1
omitBackgroundbooleanNoTransparent background (PNG only). Default: false
reducedMotionbooleanNoEnable prefers-reduced-motion. Default: false

Example

cURL
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

ParameterTypeRequiredDescription
urlstringurl or htmlURL to convert to PDF
htmlstringurl or htmlRaw HTML to convert to PDF
landscapebooleanNoLandscape orientation. Default: false
printBackgroundbooleanNoPrint background graphics. Default: true
formatstringNoPaper format: A4, A3, A5, Letter, Legal, Tabloid. Default: A4
marginobjectNoMargins: {top, right, bottom, left} as CSS values

Example

cURL
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

ParameterTypeRequiredDescription
textstringYesText or URL to encode (max 4000 chars)
sizeintegerNoImage size in pixels (100–2000). Default: 300
formatstringNopng or svg. Default: png
colorstringNoForeground color (hex). Default: #000000
bgColorstringNoBackground color (hex). Default: #ffffff
logostringNoURL of logo to embed in center

Example

cURL
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

ParameterTypeRequiredDescription
titlestringYesMain title text (max 200 chars)
subtitlestringNoSubtitle or description (max 300 chars)
bgColorstringNoBackground color (hex or CSS color)
textColorstringNoText color (hex or CSS color)
fontSizeintegerNoTitle font size in pixels (12–120)
logostringNoURL of logo image to include
patternstringNoBackground pattern: dots, lines, grid, none

Example

cURL
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

ParameterTypeRequiredDescription
urlstringYesURL to extract metadata from

Example

cURL
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

JSON Response
{
  "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

ParameterTypeRequiredDescription
urlstringurl or htmlWebsite URL to capture and watermark
htmlstringurl or htmlRaw HTML to render and watermark
watermarkTextstringText to display as watermark
watermarkPositionstringNoPosition: center, top-left, top-right, bottom-left, bottom-right (default)
watermarkOpacityfloatNoOpacity from 0 to 1 (default: 0.5)
watermarkFontSizeintegerNoFont size in px (default: 24)
watermarkColorstringNoCSS color (default: rgba(255,255,255,0.8))
widthintegerNoViewport width (default: 1920)
heightintegerNoViewport height (default: 1080)
formatstringNopng, 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

ParameterTypeRequiredDescription
urlstringurl or htmlImage URL to compress, or webpage URL to screenshot and compress
htmlstringurl or htmlRaw HTML to render, screenshot, and compress
qualityintegerNoCompression quality 1-100 (default: 80)
maxWidthintegerNoMaximum output width (resizes proportionally)
maxHeightintegerNoMaximum output height (resizes proportionally)
formatstringNoOutput 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

ParameterTypeRequiredDescription
htmlstringHTML content to render as image
cssstringNoAdditional CSS to inject before rendering
widthintegerNoViewport width (default: 800)
heightintegerNoViewport height (default: 600)
formatstringNopng, jpg, or webp (default: png)
qualityintegerNoImage quality 1-100 (for jpg/webp)
omitBackgroundbooleanNoTransparent 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
Response
{
  "plan": "Pro",
  "used": 1234,
  "limit": 10000,
  "resets_at": "2026-03-01T00:00:00+00:00"
}
⚠️

Error Codes

HTTP status codes and error responses

CodeMeaningDescription
200SuccessRequest succeeded. Binary data or JSON returned.
401UnauthorizedMissing or invalid API key.
422Validation ErrorInvalid parameters. Check the error message.
429Rate LimitedMonthly quota exceeded. Upgrade your plan.
500Server ErrorSomething went wrong on our end.
503UnavailableService temporarily unavailable. Retry shortly.
Error Response Format
{
  "error": "Monthly quota exceeded.",
  "limit": 10000,
  "used": 10000,
  "upgrade_url": "https://toolcenter.dev/pricing"
}