# fastapi.online Text Stats

> fastapi.online Text Stats is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0005/call, status down (last checked 2026-11-23).

Computes text statistics (e.g. word count) for a given string of text, billed per call via crypto micropayment.

## Facts

- Endpoint: POST https://api.fastapi.online/text-stats?utm_source=zero.xyz
- Price: $0.0005/call
- Payment: x402
- Status: down
- Last checked: 2026-11-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-text-stats-a6667701
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P2M5pySkOq-dLcrBIDm2x

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 fastapi-online-text-stats-a6667701 -d '<json body>'
```

Example prompt: Can you count the words in this paragraph for me: 'The quick brown fox jumped over the lazy dog. It was a beautiful autumn morning and the leaves were just beginning to turn.'

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call word count or text statistics computation without signup or subscription. It is ideal for agents that only occasionally need text metrics and want to avoid committing to a SaaS plan. If you need richer NLP analytics (sentiment, named entities, etc.), consider the other endpoints on the same platform.

## Known failure modes

- Missing 'text' field in request body returns a validation error
- Empty string may return a word count of zero or an error
- Very long text strings may cause timeouts or rejection
- Payment failure or insufficient USDC balance blocks the call
- Network errors or service downtime return HTTP 5xx

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a JSON object containing at minimum a 'word_count' field (number) indicating how many words are in the submitted text. Additional statistics may be included in the response.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 50000,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-text-stats-a6667701/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
