$ man regex-from-prompt
/regex-from-prompt
NAME
regex-from-prompt — builds a regular expression from a plain-english description, targeting pcre, javascript, python, go, or re2
SYNOPSIS
POST https://x402.agentutility.ai/regex-from-prompt
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Builds a regular expression from a plain-English description, targeting PCRE, JavaScript, Python, Go, or RE2. Returns pattern, flags, explanation, and 3-6 test examples, and live-runs the JS regex on sample_text. Use it as a regex generator, NL to regex converter, or pattern builder.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| prompt | string | — | required |
| flavor | string | — enum: pcre · javascript · python · go · re2 | optional |
| sample_text | string | — | optional |
| flags | string | — | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| pattern | string | Generated regex pattern body, without delimiters, ready to drop into the chosen flavor. |
| flags | string | Flag string applied to the pattern, e.g. 'gi', 'm', or empty if none. |
| flavor | string | Regex flavor the pattern targets: pcre, javascript, python, or go. |
| explanation | string | Plain-English breakdown of what each part of the pattern matches. |
| test_examples | array | 3-6 sample strings labeled match or no-match showing intended behavior. |
| caveats | array | Known edge cases, flavor-specific gotchas, or inputs the pattern won't handle. |
| live_matches | array | Actual matches found when the JS pattern is run against sample_text, with indices and captures. |
| live_error | string | Error message if the JS regex failed to compile or execute against sample_text. |
| model | string | Identifier of the LLM used to generate the pattern, e.g. claude-haiku-4-5. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/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 the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the regex-from-prompt tool from your MCP-aware agent.
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
ADJACENT — other endpoints in wordmint
| endpoint | description | price |
|---|---|---|
| ai-to-human-text | AI text humanizer / GPT detector bypass. | $0.01 |
| app-review-sentiment | Scores app-store reviews by onboarding, stability, pricing, performance, and feature requests. | $0.01 |
| brand-bootstrap | Bootstraps a brand kit for a new business or product in one call. | $0.01 |
| brand-launch-brief | Generates a structured brand launch brief for a new company or product from name, concept, audience, and tone. | $0.01 |
| brand-positioning-brief | Generates a brand positioning brief covering messaging pillars, taglines, launch channels, and a logo prompt. | $0.01 |
| brand-sentiment-analysis | Scores comments, mentions, survey verbatims, and campaign feedback for sentiment. | $0.01 |
| candidate-feedback-sentiment | Summarizes candidate experience, recruiter feedback, and hiring-process comments by sentiment. | $0.01 |
| churn-risk-sentiment | Analyzes support tickets, chats, and emails for negative sentiment, urgency, and at-risk churn themes. | $0.01 |
SEE ALSO