{"uid":"cap_j5JZbsQMOBGFSYaMRpfuT","slug":"one-engine-text-token-lines-counter-30d9b1d4","name":"ONE Engine Text Token Lines 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/t6?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.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ETKL51BXgvSONsCzk4DaE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts or tokenizes lines within a text string of up to 50,000 characters, returning token/line-level breakdown data.","exampleAgentPrompt":"Count the number of lines and give me the line-by-line token breakdown for this text: 'Line one here\nLine two here\nLine three here' — split it up using the ONE Engine text token lines API.","exampleUseCases":[{"title":"Log file line counting","prompt":"I have a big server log dump here — can you count how many lines it has and give me a token breakdown per line? Here's the text: [log content up to 50000 chars]"},{"title":"Document structure analysis","prompt":"Take this article draft and split it into individual lines so I can see how many lines there are and how the tokens are distributed across them."},{"title":"Code file line tokenization","prompt":"Here's a Python script — can you tokenize it line by line and tell me the total line count and token info for each line?"}],"resultDescription":"Returns a JSON object containing line-level token data derived from the input text, such as line count, individual line segments, and associated token metadata. The exact fields are flexible (additionalProperties: true) but center on line and token breakdowns of the submitted text.","failureModes":["Text exceeds 50,000 character limit — request rejected","Empty text field provided — may return zero lines or error","Payment not included or insufficient USDC via x402 — 402 Payment Required response","Malformed JSON body — 400 Bad Request","Network or worker timeout on very large inputs close to the character limit"],"whenToPreferThis":"Choose this endpoint when you need a cheap, pay-per-call line and token counting/splitting operation on text up to 50,000 characters and are already operating within the x402/Base payment ecosystem. It is ideal for autonomous agents that need lightweight text structure analysis without standing up their own NLP infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:51.243Z","isFirstParty":false,"canonicalSlug":"one-engine-text-token-lines-counter-30d9b1d4"}