{"uid":"cap_hoOjpqRcuiB4K8Bi6mTZh","slug":"arabic-pipeline-text-metrics-60e61aa8","name":"Arabic Pipeline Text Metrics","description":"Nine micro-capabilities for Arabic-language work, sold per call over x402 in USDC on Base. No API key, no account, no subscription for the buyer: the first request returns a 402 payment challenge, the client pays it and retries. Text utilities are pure computation and cost nothing to serve.","url":"https://arabic-pipeline.arabic-pipeline.workers.dev/text/metrics?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text to measure."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"metrics":{"words":2,"sentences":1,"characters":12,"latin_characters":0,"arabic_characters":12},"cost_usd":0.002,"endpoint":"POST /text/metrics"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rBKROpaXLwB6rCK6hai01","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes character, word, and token metrics for a given Arabic text string","exampleAgentPrompt":"Can you count the words, characters, and tokens in this Arabic text: 'مرحباً بكم في المملكة العربية السعودية'?","exampleUseCases":[{"title":"Token budget check before LLM call","prompt":"Before I send this Arabic news article to GPT, can you measure its word and token count so I know if it fits within the context window? Here's the text: 'في إطار مساعي المملكة العربية السعودية لتعزيز مكانتها الدولية...'"},{"title":"Arabic content length validation","prompt":"I need to verify that this Arabic social media post is under 280 characters — can you get me the exact character and word metrics for 'نحن نؤمن بقوة التغيير والابتكار في عالمنا العربي'?"},{"title":"Arabic corpus statistics for research","prompt":"I'm building a dataset of Arabic texts and need to log the character, word, and token counts for each sample. Can you run the metrics on this passage: 'اللغة العربية من أغنى لغات العالم وأعرقها تاريخاً'?"}],"resultDescription":"Returns a JSON object containing text metrics for the submitted Arabic string, typically including character count, word count, and token-level statistics useful for estimating processing costs or validating content length constraints.","failureModes":["Missing 'text' field in request body returns a 400 error","Payment challenge (HTTP 402) returned on first call before USDC payment is made via x402 protocol","Empty string input may return zero-value metrics or a validation error","Non-Arabic or mixed-language text may yield inaccurate word/token counts if tokenization is Arabic-specific"],"whenToPreferThis":"Choose this endpoint when you need fast, pay-per-call Arabic text measurement with no account setup — ideal for agents that process Arabic content occasionally and want to avoid subscription overhead. Prefer it over general-purpose NLP APIs when Arabic-specific tokenization accuracy matters and you want micropayment billing via USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T00:34:19.859Z","isFirstParty":false,"canonicalSlug":"arabic-pipeline-text-metrics-60e61aa8"}