{"uid":"cap_AVxOyNVQ5s5r-LiNDZHFM","slug":"24k-labs-regex-from-text-fefbbdb7","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/v1/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_NgeJATAFNKEEXs0OhrPck","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 the pattern works.","exampleAgentPrompt":"Can you generate a regex pattern that matches US phone numbers in the format (123) 456-7890 or 123-456-7890, and explain what each part of the pattern does?","exampleUseCases":[{"title":"Form validation regex for emails","prompt":"I need a regex pattern that validates email addresses — it should allow dots and plus signs in the local part, and require a domain with at least one dot. Include an explanation of each part."},{"title":"Log file timestamp matching","prompt":"Generate a regex that matches timestamps in the format YYYY-MM-DD HH:MM:SS, like what you'd find in server log files, and explain how it works."},{"title":"Password strength pattern generation","prompt":"Can you create a regex that enforces strong passwords — at least 8 characters, must include at least one uppercase letter, one lowercase letter, one digit, and one special character — and explain what each part does?"}],"resultDescription":"Returns a regular expression pattern string ready to use in code, accompanied by a short human-readable explanation of how the pattern is structured and what each component matches.","failureModes":["Ambiguous or underspecified descriptions may produce overly broad or incorrect patterns","Very complex multi-rule patterns may be partially captured","Edge cases in the description may not be reflected in the regex","If the natural language is contradictory, the output may prioritize one interpretation without warning"],"whenToPreferThis":"Use this endpoint when a developer or agent needs to quickly generate a working regex from a human-readable description without manually writing regex syntax. Ideal for automating form validation rules, log parsing, or data extraction pipelines where the pattern requirement is known in plain English. Prefer this over writing regex manually when speed matters or regex expertise is limited.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:55:39.691Z","isFirstParty":false}