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. Requests go to https://api.pattern.monster/v1; that machine-only host has no login page. 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 /v1/patterns List patterns. Supports tag, q (search), limit (max 100) and offset.
GET /v1/patterns/{slug} One pattern: metadata, parameter ranges, rendered SVG, seamless tile and a CSS background-image snippet.
GET /v1/patterns/{slug}/svg Raw SVG (image/svg+xml). Add tile=true for a single seamless tile at natural size.
GET /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://api.pattern.monster/v1/patterns?tag=waves"

# Pattern with custom colors, as JSON (includes svg, svgTile and css fields)
curl -H "x-api-key: YOUR_KEY" "https://api.pattern.monster/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://api.pattern.monster/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://api.pattern.monster/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

Model Context Protocol (MCP)

Connect an AI assistant to Pattern Monster at https://mcp.pattern.monster/mcp. The server provides read-only tools for searching patterns, reading pattern details, rendering customized SVG, and listing tags. Use the same API key and quota as the REST API.

{
  "mcpServers": {
    "pattern-monster": {
      "url": "https://mcp.pattern.monster/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_PATTERN_MONSTER_API_KEY"
      }
    }
  }
}

MCP client configuration formats vary. If your client has separate URL and header fields, enter the endpoint above and send your key as an Authorization: Bearer header. Never place an API key in a tool argument or URL. Each tool call consumes one request from the same monthly quota as REST. Protocol setup and tool discovery do not consume monthly quota, but every MCP request carrying a well-formed key is burst-limited.

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. Limits of 60 requests per minute and 10 requests per 10 seconds apply to every key. The API is free for personal and commercial projects - responses are cacheable, so please cache on your side rather than calling per page view.