{"uid":"cap_2DisVQCu0BV0M1q3uwTys","slug":"x-pay-word-count-api-7cd7bf17","name":"X Pay Word Count API","description":"Pay-per-request utility APIs powered by x402 using USDC on Base.","url":"https://www.api-xpay.com/x402/wordcount?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"asset":"USDC","lines":1,"words":2,"network":"base","success":true,"characters":11,"charactersNoSpaces":10}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_b7S-6cvrdG0O_mFa5XFsd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts words, lines, and characters in submitted text, billed per-request via USDC on Base using x402.","exampleAgentPrompt":"Count the words, lines, and characters in this text for me: 'The quick brown fox jumps over the lazy dog. It was a bright cold day.'","exampleUseCases":[{"title":"Essay word count verification","prompt":"Can you count the words and characters in this essay draft for me? Here it is: 'Artificial intelligence is transforming industries at an unprecedented pace, reshaping how we work, communicate, and make decisions every day.'"},{"title":"Social media post length check","prompt":"I need to know how many words and characters are in this tweet draft before I post it: 'Excited to announce our new product launch happening this Friday — stay tuned for details!'"},{"title":"Contract clause word audit","prompt":"Count the words, lines, and characters in this contract clause: 'The licensee agrees to use the software solely for internal business purposes and shall not sublicense, sell, or redistribute the software to any third party without prior written consent.'"}],"resultDescription":"Returns a JSON object with word count, line count, total character count, character count excluding spaces, the payment asset (USDC), the network (Base), and a success boolean.","failureModes":["Missing or malformed 'input' body returns a validation error","Payment not provided or insufficient USDC balance results in a 402 Payment Required response","Invalid bodyType enum value causes request rejection","Empty body may return zero counts or an error depending on server handling","Network issues with Base blockchain may delay payment confirmation"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-use word/character/line count without managing any API keys or subscriptions — ideal for agents that only occasionally need text statistics and want micropayment-based access via USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:19:46.598Z","isFirstParty":false,"canonicalSlug":"x-pay-word-count-api-7cd7bf17"}