{"uid":"cap_N2NfYOTyzGHtovoFNyEhR","slug":"text-prefix-classifier-09a22594","name":"Text Prefix Classifier","description":"Trim text and determine whether it starts with a supplied prefix.","url":"https://digitalworkerapi.com/v1/tools/text-prefix-classifier?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"enum":["json"],"type":"string"},"example":{}},"additionalProperties":false}},"additionalProperties":false},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HzRuojqrsdTBK-dH019LH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Trims whitespace from a text string and checks whether it starts with a given prefix, returning a boolean result.","exampleAgentPrompt":"Check whether this string starts with 'ERROR:' after trimming any leading whitespace: '  ERROR: file not found'","exampleUseCases":[{"title":"Command prefix detection in chatbot","prompt":"Check if this user message starts with the slash command prefix '/help': '  /help me with this issue'"},{"title":"URL scheme validation","prompt":"Does this URL start with 'https' after trimming whitespace? The string is '  https://example.com/page'"},{"title":"Log line classification by severity","prompt":"Tell me if this log entry starts with 'WARN' after trimming it: '   WARN: disk space low on node-3'"}],"resultDescription":"Returns a JSON object indicating whether the trimmed input text starts with the supplied prefix (boolean), along with the trimmed version of the text.","failureModes":["Missing required body fields returns a 400-level error","Empty prefix string may produce unexpected always-true results","Very large text bodies may be rejected or truncated","Malformed JSON body returns a parsing error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, reliable, pay-per-call check on whether a string begins with a specific prefix — especially in agent pipelines where you want to route, classify, or gate on text prefixes without spinning up a full NLP model. Ideal for command detection, protocol checking, log classification, or any scenario where trimming whitespace before the prefix check matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:30:48.076Z","isFirstParty":false,"canonicalSlug":"text-prefix-classifier-09a22594"}