{"uid":"cap_WmyTq1cfvsccE7V9DW1Vq","slug":"one-engine-text-token-line-counter-cd6c9c98","name":"ONE Engine Text Token Line Counter","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/text-token/lines/t3?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text up to 50000 characters"}}},"responseSchema":{"type":"object","additionalProperties":true},"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_HJe33Wgc0a04A-5sTpd_U","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":"Counts the number of lines in a given text string, returning a token-level line breakdown via a pay-per-call API on Base using x402.","exampleAgentPrompt":"Count the number of lines in this block of text for me: 'Line one\\nLine two\\nLine three\\nLine four' — I need to know how many lines it contains.","exampleUseCases":[{"title":"Log file line count check","prompt":"I have a snippet of server log output and I need to know exactly how many lines it contains — here it is: 'INFO starting server\\nWARN low memory\\nERROR disk full\\nINFO shutdown'. Can you count the lines?"},{"title":"Document structure analysis","prompt":"Can you tell me how many lines are in this draft paragraph I wrote? 'Dear Team,\\nPlease review the attached report.\\nLet me know your feedback by Friday.\\nThanks.' I want to know the line count before formatting it."},{"title":"Code snippet line count","prompt":"I pasted a chunk of Python code below and I need to know how many lines it has so I can estimate review time — can you count the lines for me?"}],"resultDescription":"Returns a JSON object containing the line-level token breakdown of the submitted text, including the number of lines and their individual content or token representations.","failureModes":["Text exceeds 50,000 character limit — request rejected","Empty text field — may return zero lines or error","Malformed JSON body — 400 bad request","x402 payment failure — 402 Payment Required if USDC not sent correctly","Network timeout on Cloudflare Worker edge"],"whenToPreferThis":"Choose this endpoint when you need a cheap, fast, pay-per-call line-counting or line-tokenization operation on arbitrary text up to 50,000 characters, especially in an autonomous agent pipeline on Base that already handles x402 micropayments. Ideal for high-volume text processing workflows where per-call cost control matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:41:32.675Z","isFirstParty":false,"canonicalSlug":"one-engine-text-token-line-counter-cd6c9c98"}