Regex Generator API
Turn a description into a working regular expression.
The Regex Generator API lets you turn a description into a working regular expression. programmatically — a single call, structured output, no prompt engineering. It's part of the Larz Tools API and runs on the same Larz API key you use everywhere else.
Endpoint
POST https://api.larzos.com/v1/tools/regex
Example request
curl https://api.larzos.com/v1/tools/regex \
-H "Larz-Api-Key: larz_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"input":"match a US phone number with an optional country code"}'
Example response
{
"id": "larz_run_…",
"object": "tool_result",
"tool": "regex",
"output": "…generated result…",
"usage": { "tokens": 180 }
}
What you can build
- Add a one-click "regex" feature to your own app.
- Automate developer workflows at scale.
- Power internal tools, bots, or batch jobs — turn a description into a working regular expression on demand.
Pricing
Free on the Free tier (200,000 tokens/month, 60 requests/min). Every call returns your remaining quota in the X-Larz-Tokens-Remaining header.