# ONE Engine Text Truncate

> ONE Engine Text Truncate is a paid API for AI agents from one-search.one-engine.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Truncates a text string to a specified maximum character length, returning the shortened text and a flag indicating if truncation occurred.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/text/truncate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/one-engine-text-truncate-ebff9601
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XPHgud7jNuoVZgcriQ2WW

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 one-engine-text-truncate-ebff9601 -d '<json body>'
```

Example prompt: Can you truncate this article summary to a maximum of 280 characters: 'Researchers at the University of California have announced a breakthrough in fusion energy that could revolutionize how the world generates electricity, promising virtually limitless clean power within the next two decades if funding continues at its current pace.'

## When to prefer this

Choose this endpoint when you need a lightweight, deterministic string truncation with a clear boolean signal indicating whether truncation happened — especially in agentic pipelines where you want to enforce character limits programmatically without writing local code. At $0.001 USDC per call via x402, it's suitable for high-frequency use in autonomous workflows on Base. Prefer it over local truncation logic when your agent runtime lacks string manipulation utilities or you need a consistent, hosted utility callable across different agent environments.

## Known failure modes

- Text exceeds server-side limits (maxLength capped at 50000 characters)
- Invalid or missing 'text' field returns an error
- maxLength below 0 or above 50000 rejected by schema validation
- Payment failure via x402 protocol blocks the call
- Non-string input for 'text' field causes validation error

## How this service works

Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.

## Output

A JSON object containing the (possibly truncated) text string under the 'text' key, and a boolean 'truncated' field indicating whether the original text was shortened. If the original text was within the limit, 'truncated' is false and 'text' is unchanged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  },
  "maxLength": {
   "type": "integer",
   "maximum": 50000,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "ONE En",
  "truncated": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/one-engine-text-truncate-ebff9601/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from one-search.one-engine.workers.dev](https://www.zero.xyz/host/one-search.one-engine.workers.dev/llms.txt)
