{"uid":"cap_ugQFdSU0qg7jNfdO1Iair","slug":"pennyrail-llm-token-counter-1faafee1","name":"PennyRail LLM Token Counter","description":"Machine-readable settlement service","url":"https://pennyrail.vercel.app/api/p/nano/text.token-count--llm-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_-3opzNHvDUBUj2K3QciCh","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 LLM tokens in a given text input using a machine-readable settlement service","exampleAgentPrompt":"How many LLM tokens are in this text: 'The quick brown fox jumps over the lazy dog and then runs back again to see what happened'?","exampleUseCases":[{"title":"Prompt length guard before LLM call","prompt":"Before I send this system prompt to GPT-4, count how many tokens it uses so I know if it fits within the 8k context window."},{"title":"Estimate API cost for a document","prompt":"I have this 3-page contract text I want to send to an LLM — can you count the tokens first so I can estimate how much it'll cost?"},{"title":"Validate chatbot message size","prompt":"My chatbot just received a user message — count the tokens in it before I append it to the conversation history to make sure we don't exceed the limit."}],"resultDescription":"Returns a token count (and possibly additional token metrics) for the provided text input, computed according to LLM tokenization rules.","failureModes":["Missing or malformed 'input' object returns a validation error","Empty text input may return zero or an error","Payment failure (402) if USDC microtransaction is not completed","Oversized input may be rejected or time out","Ambiguous tokenizer not specified may return counts for a default model only"],"whenToPreferThis":"Choose this endpoint when you need a quick, paid-per-call token count without hosting your own tokenizer library, especially in serverless or agent contexts where installing tiktoken or similar is impractical. Best for low-volume spot checks or when you need a neutral third-party token count billed via USDC microtransaction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:59:45.354Z","isFirstParty":false}