Pattern Monster API

An API for repeatable SVG patterns. Fetch pattern metadata as JSON, or ready-to-use SVG with your own colors, scale, angle and stroke. All requests need an API key - create a free account and generate one in settings. API keys are rolling out gradually, so key generation may not be available on your account just yet. CORS is enabled, so you can call it straight from the browser. If you use it in something public, a link back to pattern.monster is appreciated.

Endpoints

Endpoint Description
GET /api/v1/patterns List patterns. Supports tag, q (search), limit (max 100) and offset.
GET /api/v1/patterns/{slug} One pattern: metadata, parameter ranges, rendered SVG, seamless tile and a CSS background-image snippet.
GET /api/v1/patterns/{slug}/svg Raw SVG (image/svg+xml). Add tile=true for a single seamless tile at natural size.
GET /api/v1/tags All tags with pattern counts.

Customization parameters

Both the pattern detail and SVG endpoints accept the same query parameters. Anything you leave out falls back to the pattern's defaults, and out-of-range values are clamped - the response's applied field tells you what was actually used. Each pattern's valid ranges are in its ranges field.

Parameter Description Example
colors Comma-separated hex colors, no #. First color is the background. 8-digit hex sets opacity. colors=1e293b,38bdf8,f472b6
stroke Stroke width, clamped to the pattern range. stroke=2
scale Pattern scale, clamped to the pattern range. scale=3
angle Rotation in degrees, 0 to 360. angle=45
spacingX / spacingY Extra spacing between tiles, clamped to the pattern range. spacingX=5
join 1 for square line caps, 2 for round joins (patterns with join support). join=2
tile SVG endpoint only: true returns one seamless tile instead of a full-bleed document. tile=true

Examples

# List patterns tagged "waves"
curl -H "x-api-key: YOUR_KEY" "https://pro.pattern.monster/api/v1/patterns?tag=waves"

# Pattern with custom colors, as JSON (includes svg, svgTile and css fields)
curl -H "x-api-key: YOUR_KEY" "https://pro.pattern.monster/api/v1/patterns/waves-1?colors=1e293b,38bdf8,f472b6,facc15,4ade80&stroke=2&scale=3&angle=25"

# Raw SVG, ready to save or embed
curl -H "x-api-key: YOUR_KEY" "https://pro.pattern.monster/api/v1/patterns/waves-1/svg?colors=1e293b,38bdf8,f472b6,facc15,4ade80&stroke=2&scale=3&angle=25" -o waves.svg

# Single seamless tile (?key= works where headers are not an option, e.g. <img> tags)
curl "https://pro.pattern.monster/api/v1/patterns/waves-1/svg?key=YOUR_KEY&tile=true&colors=1e293b,38bdf8,f472b6,facc15,4ade80&stroke=2&scale=3&angle=25" -o waves-tile.svg

API keys, rate limits & premium patterns

Every request needs an API key. Generate one for free in your account settings, then send it as an x-api-key header, an Authorization: Bearer header, or a ?key= query parameter. A key from a Pattern Monster Pro account gets a larger monthly quota and unlocks all premium patterns through the API.

Tier Monthly quota Premium patterns
Free account key 500 requests / month -
Pro key 50,000 requests / month Included

Quotas reset at the start of each month (UTC); every response reports usage in X-Quota-Used / X-Quota-Remaining headers, and your settings page shows it too. A burst limit of 60 requests per minute applies to all keys. The API is free for personal and commercial projects - responses are cacheable, so please cache on your side rather than calling per page view.