{"openapi":"3.1.0","info":{"title":"Regex Explainer","version":"1.0.0","summary":"Explain any regular expression, and catch the ones that can hang.","description":"Break a regular expression down into plain English, piece by piece, and flag the patterns that are dangerous rather than merely wrong: nested quantifiers that backtrack catastrophically, missing anchors that let a match float anywhere in the input, unescaped dots that match more than intended, and character classes whose ranges do not cover what their author assumed.\n\n**Not for:** Does not execute or test the expression against sample input, and does not translate between regex dialects. Recognises JavaScript regex syntax; Perl, PCRE, and .NET constructs that JavaScript lacks are reported as unsupported rather than guessed at.\n\nFree tier: 250 calls per UTC day per caller. Past that, endpoints return 402 with x402 payment requirements. An MCP server exposing the same capabilities is available at https://regex-explainer.gumballtools.com/api/mcp.","contact":{"url":"https://github.com/bwalvoord/gumball"}},"servers":[{"url":"https://regex-explainer.gumballtools.com","description":"Production"}],"externalDocs":{"url":"https://regex-explainer.gumballtools.com/llms-full.txt","description":"Full documentation for agents"},"paths":{"/api/v1/explain":{"get":{"operationId":"explainRegex","summary":"Explain any regular expression, and catch the ones that can hang.","description":"Returns a plain-English explanation, an ordered walkthrough, and warnings — including catastrophic backtracking risk. Check hasBlockingIssue first.","parameters":[{"name":"pattern","in":"query","required":true,"description":"A JavaScript regular expression, bare or as a /pattern/flags literal.","schema":{"type":"string"}}],"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input. The body names the field and how to fix it.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","fix_hint","docs"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string"},"fix_hint":{"type":"string","description":"What to change before retrying."},"field":{"type":"string"},"token":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}},"docs":{"type":"string","format":"uri"}}}}}}}},"402":{"description":"Free quota of 250 calls per UTC day exhausted. Body is an x402 v1 payment requirement ($0.001 per call). While settlement is disabled the body carries payment_enabled: false and the call cannot be unblocked by paying — wait for quota.resetsAt.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}