{"uid":"cap_afdXcgvUeYsbfP3HeXeFZ","slug":"pennyrail-token-count-proven-1f79663b","name":"PennyRail Token Count (Proven)","description":"Machine-readable settlement service","url":"https://pennyrail.vercel.app/api/p/nano/text.token-count--proven-token-count","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"object"}}},"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_2SMu7e1g-MBtt-8vEX2FY","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 tokens in a given text input using a verified, settlement-ready method accessible via micropayment","exampleAgentPrompt":"Can you count how many tokens are in this text: 'The quick brown fox jumps over the lazy dog, and the lazy dog didn't seem to mind at all.'","exampleUseCases":[{"title":"Pre-flight LLM context check","prompt":"Before I send this document to GPT-4, can you count how many tokens it contains so I know if it fits within the 8k context window? Here's the text: [document content]"},{"title":"Prompt cost estimation","prompt":"I'm building a chatbot and need to know exactly how many tokens this system prompt uses so I can estimate API costs accurately — can you count the tokens in this prompt text for me?"},{"title":"Batch text size auditing","prompt":"I have this article draft and need to verify its token count before publishing it as training data — can you give me a proven token count for the text?"}],"resultDescription":"Returns an object containing the verified token count for the submitted text input, indicating how many tokens the text resolves to under the tokenization scheme used by the service.","failureModes":["Missing or malformed 'input' object returns a validation error","Empty text input may return a zero count or an error","Payment failure or insufficient USDC balance blocks the request","Malformed JSON body results in a 400-level error","Oversized input beyond service limits may be rejected"],"whenToPreferThis":"Choose this endpoint when you need a trustworthy, settlement-backed token count — particularly in contexts where verifiability or micropayment-gated auditability matters, such as billing verification, LLM pre-flight checks, or agentic pipelines where token usage needs to be independently confirmed rather than estimated client-side.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:43:46.424Z","isFirstParty":false}