# String Statistics

> String Statistics is a paid API for AI agents from compute-api-production-245d.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-28).

Computes statistical metrics (length, word count, character frequencies, etc.) for a given input string

## Facts

- Endpoint: POST https://compute-api-production-245d.up.railway.app/string-stats?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/string-statistics-8238275f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GoCoz7h8c-lm85xBTEOTQ

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 string-statistics-8238275f -d '<json body>'
```

Example prompt: Can you give me detailed statistics on this string — word count, character count, and character frequency — for the text: 'The quick brown fox jumps over the lazy dog'?

## When to prefer this

Choose this endpoint when you need fast, cheap ($0.001 USDC), deterministic string-level statistics without setting up a local computation environment. It's ideal for agents that need to measure or profile text at runtime — e.g. checking content length, word density, or character composition — without relying on local code execution. Prefer this over NLP-based endpoints when you need raw structural metrics rather than semantic analysis.

## Known failure modes

- Missing 'input' field in request body returns a validation error
- Empty string body may return zero-value statistics or an error
- Extremely large strings may time out or exceed payload limits
- Malformed JSON body returns a 400 Bad Request
- Missing required 'type', 'method', or 'bodyType' fields in the input object causes schema validation failure
- Payment not provided or insufficient USDC balance returns a 402 Payment Required

## How this service works

String statistics

## Output

Returns computed statistics for the submitted string, including metrics such as total character count, word count, unique character count, character frequency distribution, whitespace count, and other string-level measurements.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/string-statistics-8238275f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from compute-api-production-245d.up.railway.app](https://www.zero.xyz/host/compute-api-production-245d.up.railway.app/llms.txt)
