{"uid":"cap_R36C3qQULgKoIiCouvppP","slug":"character-word-count-for-agents-b05bd743","name":"Character & Word Count for Agents","description":"Count characters, words, and lines. Call before truncating prompts, validating SMS length, or estimating token budget from raw text. Returns character, word, line, and byte-oriented counts in one JSON object. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/char-count","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":100000,"description":"Primary text input (max 100k chars). Processed first-party; not retained as a dataset."}}},"responseSchema":{"type":"json","example":{"chars":17,"lines":1,"words":3,"schema":"delx/char-count/v1","bytes_utf8":17}},"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_ldEs9ABxHVANZk6EHhLWu","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 characters, words, lines, and bytes in a given text string, returning all metrics in a single JSON object.","exampleAgentPrompt":"How many characters and words are in this text: 'The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.'?","exampleUseCases":[{"title":"SMS length validation before send","prompt":"Before I send this SMS message, check how many characters it has so I know if it fits in a single 160-character SMS: 'Hi! Your order #4821 has shipped and will arrive by Thursday. Reply STOP to unsubscribe.'"},{"title":"Prompt budget check before LLM call","prompt":"Count the characters and words in this draft prompt so I can estimate whether it'll fit in my token budget: 'You are a helpful assistant. The user wants a detailed breakdown of their quarterly sales data including regional comparisons, trend analysis, and actionable recommendations for next quarter.'"},{"title":"Content length audit for a blog post","prompt":"Can you tell me the word count, character count, and line count of this paragraph I wrote for my blog? 'Artificial intelligence is reshaping industries at an unprecedented pace. From healthcare diagnostics to autonomous vehicles, the implications are profound and far-reaching.'"}],"resultDescription":"A JSON object containing numeric counts for characters, words, lines, and bytes derived from the submitted text. All metrics are returned in a single response with no data retained.","failureModes":["Text exceeds 100,000 character limit — structured validation error returned, no charge","Empty or missing text field — validation error","Malformed JSON request body — 400-level error","Payment not included or insufficient — x402 payment required response"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, first-party count of characters, words, lines, and bytes without relying on client-side logic or LLM estimation. Ideal for pre-flight checks before SMS sending, prompt truncation, token budget estimation, or content length validation. No API key or subscription required — pay $0.001 USDC per call via x402 on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:37.428Z","isFirstParty":false}