Developer Utilities
Tier 2 Ready
POST /v1/regex-safety
Audit regular expressions for O(2^n) ReDoS backtracking, explain patterns, and test matches. Statically audit regular expressions for O(2^n) exponential and O(n^2) polynomial ReDoS catastrophic backtracking, get safe rewrite hints, plain-English explanations, and test matches.
POST /v1/regex-safety){
"ok": true,
"data": {
"valid_syntax": true,
"safe": false,
"verdict": "vulnerable",
"worst_case_complexity": "O(2^n)_exponential",
"risk_score": 90,
"normalized_pattern": "^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"normalized_flags": "i",
"evil_input_hint": "A repeating alphanumeric/character run of 28–35 characters followed by a non-matching terminator (e.g. 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa!') triggers exponential backtracking.",
"safe_rewrite_hint": "^(?:[a-zA-Z0-9_]+)@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"explanation": [
"Anchored at the start of the string (^).",
"Anchored at the end of the string ($).",
"Uses character class bracket expressions ([...]).",
"Active flags: case-insensitive (i)."
],
"findings": [
{
"category": "nested_quantifier_exponential",
"severity": "critical",
"description": "Quantified group '([a-zA-Z0-9_]+)+' contains an inner repeating quantifier, causing O(2^n) catastrophic backtracking on non-matching suffixes",
"fragment": "([a-zA-Z0-9_]+)+",
"remediation": "Flatten nested quantifiers (e.g. replace '(a+)+' with 'a+') or separate repeated tokens with a mandatory delimiter."
}
],
"test_results": [
{
"input": "dev@tinplate.dev",
"matched": true,
"match_text": "dev@tinplate.dev",
"index": 0,
"captures": [
"dev"
]
}
]
},
"meta": {
"request_id": "req_rgx_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/regex-safety" \
-H "Content-Type: application/json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-d '{"pattern":"^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","flags":"i","test_strings":["dev@tinplate.dev"]}'import { TinplateClient } from "@tinplate/sdk"; // npm install @tinplate/sdk
const tinplate = new TinplateClient({
rapidApiKey: process.env.RAPIDAPI_KEY!,
});
const { data, meta } = await tinplate.call("/v1/regex-safety", {
"pattern": "^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"flags": "i",
"test_strings": [
"dev@tinplate.dev"
]
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/regex-safety",
headers={
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
json={
"pattern": "^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"flags": "i",
"test_strings": [
"dev@tinplate.dev"
]
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/regex-safety", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
body: JSON.stringify({
"pattern": "^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"flags": "i",
"test_strings": [
"dev@tinplate.dev"
]
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_regex_safety",
"arguments": {
"pattern": "^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"flags": "i",
"test_strings": [
"dev@tinplate.dev"
]
}
}
}POST /v1/regex-safety)| Parameter | Type & Constraints | Description |
|---|---|---|
patternrequired |
stringminLen: 1, maxLen: 8192 |
Regular expression pattern string (without surrounding /.../ slashes, or in /pattern/flags literal format). |
flagsoptional |
stringmaxLen: 16, default: "" |
Optional ECMAScript RegExp flags (e.g. 'i', 'g', 'm', 's', 'u', 'v'). |
test_stringsoptional |
string[] |
Optional sample strings (max 512 chars each) to test against the pattern when safe to execute. |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
valid_syntax |
boolean |
Field 'valid_syntax' |
safe |
boolean |
Field 'safe' |
verdict |
"safe" | "warn" | "vulnerable" | "invalid" |
Field 'verdict' |
worst_case_complexity |
"O(n)_linear" | "O(n^2)_polynomial" | "O(2^n)_exponential" | "invalid" |
Field 'worst_case_complexity' |
risk_score |
integer |
Field 'risk_score' |
normalized_pattern |
string |
Field 'normalized_pattern' |
normalized_flags |
string |
Field 'normalized_flags' |
evil_input_hint |
string | null |
Field 'evil_input_hint' |
safe_rewrite_hint |
string | null |
Field 'safe_rewrite_hint' |
explanation |
string[] |
Field 'explanation' |
findings |
object[] |
Field 'findings' |
test_results |
object[] |
Field 'test_results' |
Release Version: v1.0.7 ·
Last Verified / Benchmarked: 14 November 2026 ·
Latency Note: Sub-millisecond figures measure in-Worker V8 compute time (typical client HTTPS network RTT to the nearest Cloudflare PoP is 15–65 ms) ·
See Full Portfolio Benchmarks & Corpora →
| Plan | Monthly Price | Included Requests | Rate Limit | Max Request Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / month | 500 / month (hard limit) | 10 req / min | 64 KB | Evaluation, local development & CI smoke tests |
| PRO | $9.99 / month | 15,000 / month | 60 req / min | 128 KB | Solo developers & production apps |
| ULTRA | $29.99 / month | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / month | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
A single vulnerable regex like ^([a-z]+)+$ in a JSON Schema pattern, WAF rule, or search filter lets an attacker freeze a Node.js or Python event loop for minutes with a 32-byte string.
Yes—the ReDoS detector is purely static, and when a pattern is flagged as O(2^n)_exponential, sample test strings are automatically length-capped to 24 characters before execution.
Yes, you can pass either raw pattern + flags fields or a slash-delimited literal like '/^(a+)+$/i'.
Patterns and sample strings are analyzed in memory and discarded immediately.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled in configuration
(observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Payloads are processed strictly in volatile V8 memory and never logged or stored by Tinplate.
Marketplace Proxies vs. Direct Bearer Key: Requests sent via RapidAPI or Zyla API Hub pass through those marketplaces' proxy infrastructure (subject to their respective privacy policies). Security-sensitive workloads requiring end-to-end zero-intermediary processing can connect directly to https://api.tinplate.dev using a Direct Bearer Key (Authorization: Bearer <API_KEY>).
Read our full Privacy Notice and OpenAPI 3.0.3 JSON Schema.
POST /v1/json-heal
Live on Hub
Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms.
POST /v1/tool-call-validator
AI Safety & Agents
Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.
POST /v1/schema-diff
Developer Utilities
Diff two OpenAPI 3.x or JSON Schemas to catch breaking changes and recommend SemVer bumps.