{"uid":"cap_xdu3n3DGM3vQsqH_XPoVj","slug":"one-engine-text-token-character-counter-t4-b31d01e6","name":"ONE Engine Text Token Character Counter (t4)","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/characters/t4?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.0015","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.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hhW4YJff6Zhtta8OdXLE6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts or tokenizes characters in a text string up to 50,000 characters long, returning token/character metrics.","exampleAgentPrompt":"Count the number of characters and tokens in this text for me: 'The quick brown fox jumps over the lazy dog. This sentence is used to test character and token counting utilities.'","exampleUseCases":[{"title":"Pre-flight LLM context check","prompt":"Before I send this 10,000-word document to an AI model, can you count the characters and tokens so I know if it fits within the context window?"},{"title":"Content length validation for CMS","prompt":"I need to verify that this article draft doesn't exceed 5,000 characters — can you count the exact character length of the text I'm pasting?"},{"title":"Billing estimation for text API usage","prompt":"How many characters and tokens are in this batch of customer support replies? I want to estimate how much it'll cost to process them through a pay-per-token API."}],"resultDescription":"Returns a JSON object containing character and/or token count metrics for the submitted text, likely including total character count and token count breakdown.","failureModes":["Text exceeds 50,000 character limit — returns an error or truncation notice","Empty text field — may return zero counts or a validation error","Malformed JSON body — returns a 400 bad request","Payment not included or insufficient USDC balance — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, pay-per-call character or token count for a text string up to 50,000 characters, especially in autonomous agent workflows on Base where x402 micropayments are already in use. At $0.0015 per call it is cost-effective for high-frequency validation tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:08.251Z","isFirstParty":false,"canonicalSlug":"one-engine-text-token-character-counter-t4-b31d01e6"}