# fastapi.online — Regex Pattern Generator

> fastapi.online — Regex Pattern Generator is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0015/call, status unknown (last checked 2026-09-14).

Generates a regular expression pattern from a natural language description, with optional flavor/dialect selection

## Facts

- Endpoint: POST https://api.fastapi.online/regex-generate
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-regex-pattern-generator-da0d125c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z83csMHcxGonfsMjOs4t2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastapi-online-regex-pattern-generator-da0d125c -d '<json body>'
```

Example prompt: Can you generate a regex pattern that matches valid email addresses, using Python flavor?

## When to prefer this

Use this endpoint when you need to quickly generate a regular expression from a plain-English description without writing it manually — especially useful for developers who know what they want to match but not the exact regex syntax, or for agents automating code generation tasks. Choose this over generic LLM chat when you want a pay-per-call, no-signup solution with flavor-specific output.

## Known failure modes

- Description too vague to produce a meaningful pattern
- Unsupported or unrecognized flavor value returns error
- Description exceeds 2000 character limit
- Empty or missing description field returns validation error
- Generated regex may not perfectly match all edge cases of the described pattern

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

A generated regular expression pattern matching the provided description, optionally tailored to the specified regex flavor or dialect (e.g. Python, PCRE, JavaScript).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "flavor": {
   "type": "string",
   "maxLength": 40
  },
  "description": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-regex-pattern-generator-da0d125c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
