# fastapi.online — Expand Text

> fastapi.online — Expand Text is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Expands a short piece of text to a target word count using AI-powered writing assistance

## Facts

- Endpoint: POST https://api.fastapi.online/expand-text
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-expand-text-aa6deb80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UA3FaImjeI4l6e_wDmQuL

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-expand-text-aa6deb80 -d '<json body>'
```

Example prompt: Can you expand this product description to about 400 words? Here's what I have: 'Handcrafted leather wallet, slim design, holds 6 cards, available in brown and black.'

## When to prefer this

Choose this endpoint when you need to programmatically expand short text to a specific word count without requiring a full chat-based LLM call. It's useful for content pipelines where drafts need to meet minimum length requirements, or for agents automating content generation at scale. At $0.001 per call with no signup required (pay with crypto), it's cost-effective for high-volume text elaboration tasks. Prefer this over a general chat endpoint when the task is purely text expansion with a defined target length.

## Known failure modes

- Input text missing or empty — returns validation error
- target_words below minimum of 10 or above maximum of 5000 — returns validation error
- text exceeds 8000 character limit — request rejected
- Payment not provided or insufficient — 402 Payment Required
- AI model temporarily unavailable — 503 error
- Generated text may not precisely hit the target word count
- Output quality may degrade for very large expansion ratios (e.g. 10-word input → 5000-word output)

## 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 an AI-generated longer version of the input text that attempts to preserve the original meaning and tone while expanding it toward the requested target word count. The output is plain prose that elaborates on the original content with additional detail, explanation, or supporting sentences.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1
  },
  "target_words": {
   "type": "integer",
   "maximum": 5000,
   "minimum": 10
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-expand-text-aa6deb80/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)
