API Documentation

Authentication

All requests require X-API-Key header.

curl -H "X-API-Key: af_live_xxx" /api/v1/text/wordcount

Rate Limits

TierDailyRatePrice
Free100/day10/min$0/mo
Starter5,000/day60/min$19/mo
Pro25,000/day200/min$49/mo
Business100,000/day500/min$99/mo

Text Utilities

POST/api/v1/text/summarize

Extract summary.

{"text":"...","sentences":3}
POST/api/v1/text/keywords

Extract keywords.

{"text":"...","count":10}
POST/api/v1/text/sentiment

Analyze sentiment.

{"text":"I love this!"}
POST/api/v1/text/wordcount

Count words/chars/sentences.

{"text":"..."}
POST/api/v1/text/slug

Generate URL slug.

{"text":"My Blog Post!"}

Data Transform

POST/api/v1/data/json-to-csv

JSON array to CSV.

{"data":[{"name":"Alice"}]}
POST/api/v1/data/csv-to-json

CSV to JSON.

{"csv":"name,age
Alice,30"}
POST/api/v1/data/flatten

Flatten nested object.

{"data":{"user":{"name":"Tim"}}}
POST/api/v1/data/diff

Diff two objects.

{"a":{"age":35},"b":{"age":36}}

Hash & Encode

POST/api/v1/hash/md5

MD5 hash.

{"input":"hello"}
POST/api/v1/hash/sha256

SHA-256 hash.

{"input":"hello"}
POST/api/v1/encode/base64

Base64 encode/decode.

{"input":"hello","action":"encode"}
GET/api/v1/generate/uuid

Generate UUID v4.

Email Validation

POST/api/v1/email/validate

Validate a single email address. Checks syntax, MX records, disposable domains, role-based addresses, and free providers. Returns a deliverability score (0-100).

{"email":"user@example.com"}

Response:

{"email":"user@example.com","valid":true,"score":95,"deliverability":"high","checks":{"syntax":true,"mx":true,"disposable":false,"role":false,"free":false},"mx":[{"host":"mail.example.com","priority":10}],"domain":"example.com"}
POST/api/v1/email/validate/batch

Validate up to 50 emails at once.

{"emails":["user@gmail.com","test@mailinator.com"]}

Image Optimization

POST/api/v1/image/info

Get image metadata (width, height, format, channels, size).

{"url":"https://example.com/photo.jpg"}
// or: {"image":"base64-encoded-data"}
POST/api/v1/image/optimize

Optimize image: resize, compress, convert format. Max 10MB. Returns base64.

{"url":"https://example.com/photo.jpg","width":800,"format":"webp","quality":80}

Parameters: image (base64) or url, width, height, format (jpeg/png/webp/avif/tiff), quality (1-100), fit (cover/contain/fill/inside/outside).

POST/api/v1/image/resize

Resize only (preserves format).

{"url":"https://example.com/photo.jpg","width":400,"height":300}
POST/api/v1/image/convert

Convert between formats.

{"url":"https://example.com/photo.png","format":"webp","quality":85}

QR Code

POST/api/v1/qr/generate

Generate a QR code from text or URL. Returns base64 PNG or SVG string.

{"text":"https://example.com","format":"png","size":300,"dark":"#000000","light":"#ffffff"}

Parameters: text (required), format (png/svg), size (100-2000px), margin, dark/light (hex colors), errorLevel (L/M/Q/H).

POST/api/v1/qr/bulk

Generate up to 20 QR codes at once.

{"items":["https://example.com","Hello World"],"format":"png","size":300}

Screenshot API

POST/api/v1/screenshot/capture

Capture a screenshot of any URL or HTML. Returns base64-encoded image.

{"url":"https://example.com","width":1280,"height":800,"format":"png","fullPage":false}

Parameters: url or html (required), width (320-3840), height (200-2160), format (png/jpeg/webp), quality (1-100, jpeg/webp), fullPage (true/false), waitFor (ms, max 10000), selector (CSS selector to capture specific element).

PDF Generation

POST/api/v1/pdf/generate

Generate PDF from HTML, Markdown, or URL. Returns base64-encoded PDF.

{"html":"<h1>Invoice</h1><p>Total: $100</p>","format":"A4","orientation":"portrait"}

Parameters: html, url, or markdown (one required), format (A4/A3/Letter/Legal/Tabloid), orientation (portrait/landscape), marginTop/Right/Bottom/Left (e.g. "10mm"), scale (0.1-2.0), printBackground, width (viewport), waitFor (ms).

Link Preview / URL Metadata

POST/api/v1/meta/preview

Fetch Open Graph, Twitter Card, and meta tags from any URL.

{"url":"https://github.com"}

Returns: title, description, image, favicon, siteName, type, canonical, lang, author, twitter (card, title, image), domain.

IP Geolocation

GET/api/v1/geo/lookup?ip=8.8.8.8
POST/api/v1/geo/lookup

Look up geolocation for an IP address. Uses local MaxMind database (zero-latency, no external API calls).

{"ip":"8.8.8.8"}

Returns: country, region, city, timezone, ll (lat/long), eu (EU member), area.

POST/api/v1/geo/batch

Batch lookup up to 100 IPs at once.

{"ips":["8.8.8.8","1.1.1.1","208.67.222.222"]}

Error Codes

CodeMeaning
401Missing or invalid API key
403API key revoked
429Rate/daily limit exceeded
400Invalid request body
500Internal server error