Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint
$ man regex-from-prompt

/regex-from-prompt(1)

agentutility / wordmint / regex-from-prompt
PRICE / CALL
$0.01
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
wordmint
CATEGORY
ai
STATUS
live
NAME
regex-from-prompt regex generator / nl to regex / pattern builder
SYNOPSIS
POST https://x402.org/v1/regex-from-prompt
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

Regex generator / NL to regex / pattern builder. PCRE / JavaScript / Python / Go / RE2. Returns pattern + flags + explanation + 3-6 test examples. Live-runs JS regex on sample_text.

INPUTrequest schema
propertytypedescriptionreq?
promptstringNatural-language description of the pattern to generate, e.g. 'match US phone numbers with optional country code'.required
flavorstringTarget regex flavor: pcre, javascript, python, or go (RE2).
enum: pcre · javascript · python · go · re2
optional
sample_textstringIf provided, regex is run live (JS only).optional
flagsstringOptional flags to apply, e.g. 'gi' or 'ims'; defaults inferred from prompt if omitted.optional
OUTPUTresponse shape
fieldtypedescription
patternstringGenerated regex pattern body, without delimiters, ready to drop into the chosen flavor.
flagsstringFlag string applied to the pattern, e.g. 'gi', 'm', or empty if none.
flavorstringRegex flavor the pattern targets: pcre, javascript, python, or go.
explanationstringPlain-English breakdown of what each part of the pattern matches.
test_examplesarray3-6 sample strings labeled match or no-match showing intended behavior.
caveatsarrayKnown edge cases, flavor-specific gotchas, or inputs the pattern won't handle.
live_matchesarrayActual matches found when the JS pattern is run against sample_text, with indices and captures.
live_errorstringError message if the JS regex failed to compile or execute against sample_text.
modelstringIdentifier of the LLM used to generate the pattern, e.g. claude-haiku-4-5.
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/regex-from-prompt \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# install once
claude mcp add x402 --command "npx x402-deployer-mcp"

# then ask Claude Code:
# "use the regex-from-prompt tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
regexdeveloperaipattern
env
VENICE_API_KEY
methods
POST
cluster
wordmint
price
$0.01 USDC per call
ADJACENTother endpoints in wordmint
endpointdescriptionprice
ai-to-human-textAI text humanizer / GPT detector bypass.$0.01
citation-verifyCitation verifier / fact-check against URL / does-this-source-support-this-claim / hallucination detector.$0.01
commit-message-from-diffGit commit message generator / Conventional Commits / AI commit-msg.$0.01
humanizeAI text humanizer / GPT detector bypass.$0.01
sentimentSentiment + emotion analyzer.$0.01
sentiment-analysisSentiment analyzer / emotion classifier / aspect-based sentiment.$0.01
structured-extractStructured-data extractor / JSON-from-text / schema-guided extraction / key-value pull / form-filler.$0.01
summarizeAI summarizer / TLDR generator.$0.01
SEE ALSO
agentutility(7) · wordmint(7) · x402(7) · mcp(7) · llms.txt · registry.json · bazaar.x402.org