{"uid":"cap_2bV8MSzxKKq0HUX4jeAoe","slug":"24k-labs-regex-from-text-b8c3b6f8","name":"24K Labs Regex From Text","description":"Generate a regular expression from a plain-English description, with a short explanation.","url":"https://api.24klabs.ai/api/regex-from-text","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"description":{"type":"string"}}},"responseSchema":{"type":"json","example":{"regex":"..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WTCRRUUInYapTUT9Itqhk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a regular expression from a plain-English description, along with a short explanation of how it works.","exampleAgentPrompt":"Can you generate a regex that matches US phone numbers in the format (123) 456-7890 or 123-456-7890, and explain what each part does?","exampleUseCases":[{"title":"Form input validation regex","prompt":"I need a regex that validates a strong password — at least 8 characters, one uppercase, one lowercase, one digit, and one special character. Give me the pattern and a quick explanation."},{"title":"Log file pattern matching","prompt":"Write me a regex that matches ISO 8601 timestamps like 2024-01-15T08:30:00Z from log lines, and explain how it works."},{"title":"URL extraction from text","prompt":"Can you give me a regex that matches HTTP and HTTPS URLs including query strings and fragments, and tell me what each part of the pattern means?"}],"resultDescription":"Returns a regular expression pattern (as a string) derived from the plain-English description, plus a short human-readable explanation of what the regex does and how its components work.","failureModes":["Description is too vague or ambiguous — may produce a regex that partially matches or over-matches","Description references a language-specific regex flavor that differs from the one generated","Extremely complex patterns may be incomplete or incorrect — should be validated before production use","Non-English or very technical input may reduce generation quality"],"whenToPreferThis":"Use this endpoint when you need to quickly generate a regex from a natural language description without writing it by hand. Ideal for developers, automation agents, or non-technical users who know what they want to match but don't know regex syntax. Prefer this over asking a general-purpose LLM when you want a structured, consistent API response with both the pattern and an explanation bundled together at a fixed low cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:01:46.172Z","isFirstParty":false}