{"uid":"cap_4327EohuFxLT2Zfl0W7Ix","slug":"delx-commerce-character-count-api-a5894dab","name":"Delx Commerce — Character Count API","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/char-count?utm_source=zero.xyz","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_ANpJq5JYMlBtlFEcmR7O0","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 UTF-8 bytes in a given text string, returning precise metrics for pay-per-result via x402.","exampleAgentPrompt":"How many characters, words, and lines are in this text: 'Hello from the Delx char-count API'?","exampleUseCases":[{"title":"Validate tweet length before posting","prompt":"Can you count the characters in this tweet draft so I know if it's under 280 characters? Here's the text: 'Excited to announce our new product launch — join us live this Thursday at 3pm ET for the big reveal!'"},{"title":"Check article word count for editor","prompt":"My editor needs the exact word and line count for this article intro before I submit it — can you run it through the character counter? The text is: 'Artificial intelligence is reshaping how we work, communicate, and create. From chatbots to autonomous agents, the pace of change has never been faster.'"},{"title":"Measure API payload size in bytes","prompt":"Before I send this string as a payload, can you tell me exactly how many UTF-8 bytes and characters it is? The string is: 'user_id=42&action=purchase&item=deluxe_plan&timestamp=1716230400'"}],"resultDescription":"A JSON object with four fields: chars (total character count), words (total word count), lines (total line count), bytes_utf8 (total UTF-8 byte size), plus a schema identifier string 'delx/char-count/v1'.","failureModes":["Text exceeding 100,000 characters returns a validation error","Missing or empty 'text' field in request body returns an error","Payment failure via x402 results in 402 Payment Required before processing","Malformed JSON body returns a parsing error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-use, no-signup text metric computation with exact character, word, line, and UTF-8 byte counts returned together in a single call. Ideal for agents that need quick text measurement without integrating a heavier NLP or content platform, and for workflows where verifiable per-call micropayment billing via USDC/x402 is preferred over subscription APIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:58.416Z","isFirstParty":false,"canonicalSlug":"delx-commerce-character-count-api-a5894dab"}