{"apiVersion":"1.0.0","schemaVersion":1,"generatedAt":"2026-07-10T16:36:52.948Z","resource":{"id":"c40b4631209253904431112e","key":"POST https://utilsforagents.com/v1/utilities/count-tokens","method":"POST","resourceUrl":"https://utilsforagents.com/v1/utilities/count-tokens","alternateResourceUrls":["https://utilsforagents.com/v1/utilities/count-tokens"],"canonicalUrl":"https://utilsforagents.com/v1/utilities/count-tokens","origin":"https://utilsforagents.com","hostname":"utilsforagents.com","groupId":"utilsforagents-com-7d3584c2","providerName":"utilsforagents","title":"https://utilsforagents.com/v1/utilities/count-tokens","description":"Count the number of tokens in a text string using the specified tokenizer encoding. Supports cl100k_base (GPT-4/GPT-3.5, exact BPE), o200k_base (GPT-4o, exact BPE), claude (Claude models, estimated), and gemini (Gemini models, estimated). Use before sending text to an LLM to estimate cost, check context window fit, or enforce token budgets. For base64-encoded images, set content_type='image' for tile-based token estimation. Send {\"text\": \"...\", \"encoding\": \"cl100k_base\"}. Max 50 MB text.","tags":["uncategorized"],"type":"http","x402Version":2,"routeTemplate":null,"input":{"type":"http","method":"POST","bodyType":"json","bodyFieldNames":["encoding","text"],"pathParamNames":[],"queryParamNames":[]},"iconUrl":null,"payment":{"networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"schemes":["exact"],"assets":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","USD Coin"],"options":[{"network":"eip155:8453","scheme":"exact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amountAtomic":"3000","payTo":"0x7e67204eea076e8803b5753e5441ba0e62be13a4","maxTimeoutSeconds":60,"tokenName":"USD Coin","tokenVersion":"2"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amountAtomic":"3000","payTo":"GXTcDuC5mPnmbWSza92FcX9zSmp8QuPpFh6n1ad9c9zM","maxTimeoutSeconds":60,"tokenName":null,"tokenVersion":null}],"acceptedPaymentCount":2,"priceUsd":null},"quality":{"l30DaysTotalCalls":2,"l30DaysUniquePayers":1,"lastCalledAt":"2026-06-22T04:23:57.701Z"},"registry":{"health":"healthy","reliabilityScore":95,"paymentValid":true,"domainVerified":false,"lastChecked":"2026-07-08 02:25:25"},"sources":[{"id":"cdp-bazaar","sourceUrl":"https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources","observedAt":"2026-07-10T13:31:47.300Z","lastUpdated":"2026-06-22T04:23:58.06Z","recordKey":"POST https://utilsforagents.com/v1/utilities/count-tokens"},{"id":"402-index","sourceUrl":"https://402index.io/api/v1/services","observedAt":"2026-07-10T13:31:47.300Z","lastChecked":"2026-07-08 02:25:25","registrySource":"bazaar","recordKey":"POST https://utilsforagents.com/v1/utilities/count-tokens"}],"verification":{"level":"origin-and-cross-source","checkedAt":"2026-07-10T15:06:27.972Z","structural":{"ok":true,"normalized":true,"publicHttpUrl":true},"sourceConfirmed":true,"crossSource":true,"registryPaymentValid":true,"originCheck":{"scope":"origin","reachable":true,"statusCode":200,"method":"HEAD","checkedAt":"2026-07-10T15:04:29.724Z","latencyMs":883,"error":null},"quoteCheck":{"scope":"exact-route","outcome":"not-safely-testable","attempted":false,"requestedMethod":null,"statusCode":null,"finalUrl":"https://utilsforagents.com/v1/utilities/count-tokens","redirectCount":0,"checkedAt":"2026-07-10T15:06:27.972Z","latencyMs":null,"reason":"potentially-mutating-method:POST","requirementCount":0},"quote":null,"paidCall":{"verified":false,"checkedAt":null,"network":null,"receiptReference":null,"outputReviewed":false}},"curation":{"status":"qualified","basis":"qualified-signals","matchScope":null,"listingSlug":null,"providerListingSlug":null,"listingName":null,"kind":null,"categories":[],"editorialDescription":null,"docsUrl":null,"sourceUrl":null}}}