All endpoints require authentication via an API key. Pass it as a Bearer token in the Authorization header or as an api_key query parameter.
Want to try before signing up? Use the interactive Playground →
Include your API key in every request using one of these methods:
# Option 1: Authorization header (recommended) curl -H "Authorization: Bearer snp_your_api_key" ... # Option 2: Query parameter curl "https://api-snap.com/api/qr?data=test&api_key=snp_your_api_key"
Every response includes X-RateLimit-Limit and X-RateLimit-Remaining headers so you can track usage.
/api/qrQR Code GenerationGET/api/hashHash GenerationGET/api/uuidUUID / ID GenerationPOST/api/base64Base64 Encode/DecodePOST/api/jwt-decodeJWT DecodeGET/api/colorColor ConversionGET/api/loremLorem Ipsum GeneratorGET/api/placeholderPlaceholder ImagesGET/api/metaURL Metadata / OG TagsPOST/api/resizeImage Resize & ConvertPOST/api/markdownMarkdown to HTMLGET/api/screenshotScreenshot CapturePOST/api/pdfHTML to PDF/api/qrGenerate QR codes in PNG or SVG format with customizable colors and sizes.
| Name | Required | Description |
|---|---|---|
data | Required | The text or URL to encode |
size | Optional | Image width in pixels (max 1000, default 300) |
format | Optional | "png" or "svg" (default "png") |
dark | Optional | Dark color hex (default #000000) |
light | Optional | Light color hex (default #ffffff) |
curl "https://api-snap.com/api/qr?data=https://example.com&size=400&format=svg" \ -H "Authorization: Bearer snp_your_api_key"
Returns image/png or image/svg+xml
/api/hashGenerate cryptographic hashes using SHA-256, SHA-512, MD5, and more.
| Name | Required | Description |
|---|---|---|
text | Required | The text to hash (query param for GET, body field for POST) |
algorithm | Optional | Algorithm: md5, sha1, sha256, sha512, sha384, sha3-256, sha3-512 (default sha256) |
encoding | Optional | Output encoding: hex, base64, base64url (default hex) |
curl "https://api-snap.com/api/hash?text=Hello+World&algorithm=sha256" \ -H "Authorization: Bearer snp_your_api_key"
Returns JSON: {"hash": "...", "algorithm": "sha256", "encoding": "hex"}
/api/uuidGenerate unique identifiers in various formats. Great for database IDs, tokens, and more.
| Name | Required | Description |
|---|---|---|
format | Optional | Format: uuid, v4, nanoid, nanoid-short, hex, base64, numeric, timestamp (default uuid) |
count | Optional | Number of IDs to generate, 1-100 (default 1) |
prefix | Optional | Prefix to prepend to each ID (e.g., 'usr_', 'txn_') |
curl "https://api-snap.com/api/uuid?format=nanoid&count=5&prefix=usr_" \ -H "Authorization: Bearer snp_your_api_key"
Returns JSON: {"id": "..."} for count=1, {"ids": [...]} for count>1
/api/base64Encode or decode strings using Base64 or Base64URL encoding.
| Name | Required | Description |
|---|---|---|
input | Required | The string to encode or decode |
action | Optional | "encode" or "decode" (default "encode") |
urlSafe | Optional | Use base64url variant (default false) |
curl -X POST "https://api-snap.com/api/base64" \
-H "Authorization: Bearer snp_your_api_key" \
-H "Content-Type: application/json" \
-d '{"input": "Hello, World!", "action": "encode"}'Returns JSON: {"result": "SGVsbG8sIFdvcmxkIQ==", "action": "encode"}
/api/jwt-decodeDecode and inspect JWT tokens without verification. See header, payload, and expiry information.
| Name | Required | Description |
|---|---|---|
token | Required | The JWT token to decode |
curl -X POST "https://api-snap.com/api/jwt-decode" \
-H "Authorization: Bearer snp_your_api_key" \
-H "Content-Type: application/json" \
-d '{"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}'Returns JSON: {"header": {...}, "payload": {...}, "expired": false, "expiresAt": "..."}
/api/colorConvert colors between hex, RGB, and HSL. Includes brightness and dark/light detection.
| Name | Required | Description |
|---|---|---|
color | Required | Color in hex (#ff0000 or ff0000), rgb(255,0,0), or hsl(0,100%,50%) |
curl "https://api-snap.com/api/color?color=6366f1" \ -H "Authorization: Bearer snp_your_api_key"
Returns JSON with hex, rgb, hsl, brightness, isDark fields
/api/loremGenerate placeholder text in paragraphs. Output as plain text or HTML.
| Name | Required | Description |
|---|---|---|
paragraphs | Optional | Number of paragraphs, 1-20 (default 3) |
sentences | Optional | Sentences per paragraph, 1-20 (default 5) |
format | Optional | "text" (JSON response) or "html" (HTML paragraphs) (default "text") |
curl "https://api-snap.com/api/lorem?paragraphs=3&sentences=4" \ -H "Authorization: Bearer snp_your_api_key"
Returns JSON: {"text": "...", "paragraphs": [...]}
/api/placeholderGenerate SVG placeholder images with custom dimensions, colors, and text.
| Name | Required | Description |
|---|---|---|
w | Optional | Width in pixels (1-2000, default 300) |
h | Optional | Height in pixels (1-2000, default 200) |
bg | Optional | Background color hex without # (default cccccc) |
fg | Optional | Text color hex without # (default 666666) |
text | Optional | Custom text (default "WxH") |
curl "https://api-snap.com/api/placeholder?w=600&h=400&bg=4f46e5&fg=ffffff&text=Hero+Image" \ -H "Authorization: Bearer snp_your_api_key"
Returns image/svg+xml with immutable cache headers
/api/metaExtract Open Graph metadata, title, description, favicon, and more from any URL.
| Name | Required | Description |
|---|---|---|
url | Required | The URL to extract metadata from |
curl "https://api-snap.com/api/meta?url=https://github.com" \ -H "Authorization: Bearer snp_your_api_key"
Returns JSON with title, description, image, siteName, favicon, author, etc.
/api/resizeResize, crop, and convert images between formats. Supports multipart upload or JSON with base64/URL.
| Name | Required | Description |
|---|---|---|
image | Required | Image file (multipart) or base64 string, or use 'url' field |
url | Optional | URL of image to resize (alternative to image upload) |
width | Optional | Target width in pixels (max 4096) |
height | Optional | Target height in pixels (max 4096) |
format | Optional | Output format: png, jpeg, webp, avif (default png) |
quality | Optional | Output quality 1-100 (default 80, for jpeg/webp/avif) |
fit | Optional | Resize fit: cover, contain, fill, inside, outside (default cover) |
curl -X POST "https://api-snap.com/api/resize" \
-H "Authorization: Bearer snp_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/photo.jpg","width":400,"format":"webp"}'Returns the resized image in the requested format
/api/markdownConvert Markdown to HTML. Returns either styled full HTML page or raw HTML fragment.
| Name | Required | Description |
|---|---|---|
markdown | Required | Markdown content to convert |
styled | Optional | Return full styled HTML page (default true). Set false for raw HTML fragment. |
curl -X POST "https://api-snap.com/api/markdown" \
-H "Authorization: Bearer snp_your_api_key" \
-H "Content-Type: application/json" \
-d '{"markdown": "# Hello World\n\nThis is **bold** text."}'Returns text/html (styled) or JSON with html field (unstyled)
/api/screenshotCapture a visual preview of any URL. Returns an SVG representation.
| Name | Required | Description |
|---|---|---|
url | Required | The URL to capture (must be valid) |
width | Optional | Viewport width (default 1280) |
height | Optional | Viewport height (default 720) |
curl "https://api-snap.com/api/screenshot?url=https://example.com&width=1280" \ -H "Authorization: Bearer snp_your_api_key"
Returns image/svg+xml
/api/pdfConvert HTML content to a downloadable PDF document.
| Name | Required | Description |
|---|---|---|
html | Required | HTML content to convert to PDF |
title | Optional | Document title and filename (default "document") |
curl -X POST "https://api-snap.com/api/pdf" \
-H "Authorization: Bearer snp_your_api_key" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Invoice #123</h1><p>Amount: $99.00</p>", "title": "Invoice"}' \
-o invoice.pdfReturns application/pdf
| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing or invalid API key |
429 | Rate limit exceeded — upgrade your plan for more requests |
502 | Bad gateway — upstream URL could not be fetched |
500 | Internal server error |