# Arabic Pipeline Text Metrics

> Arabic Pipeline Text Metrics is a paid API for AI agents from arabic-pipeline.arabic-pipeline.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-02).

Computes character, word, and token metrics for a given Arabic text string

## Facts

- Endpoint: GET https://arabic-pipeline.arabic-pipeline.workers.dev/text/metrics?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arabic-pipeline-text-metrics-60e61aa8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hoOjpqRcuiB4K8Bi6mTZh

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability arabic-pipeline-text-metrics-60e61aa8
```

Example prompt: Can you count the words, characters, and tokens in this Arabic text: 'مرحباً بكم في المملكة العربية السعودية'?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "metrics": {
   "words": 2,
   "sentences": 1,
   "characters": 12,
   "latin_characters": 0,
   "arabic_characters": 12
  },
  "cost_usd": 0.002,
  "endpoint": "POST /text/metrics"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/arabic-pipeline-text-metrics-60e61aa8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from arabic-pipeline.arabic-pipeline.workers.dev](https://www.zero.xyz/host/arabic-pipeline.arabic-pipeline.workers.dev/llms.txt)
