# ONE Engine Array Sort

> ONE Engine Array Sort 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).

Sorts an array of up to 1000 numbers or strings in ascending or descending order

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/array/sort?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-array-sort-d8a8e21b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N86inV5rM0OwTFWjMkh-E

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-array-sort-d8a8e21b -d '<json body>'
```

Example prompt: Sort these numbers in ascending order: [42, 7, 100, 3, 56]. Give me the full sorted list back.

## When to prefer this

Choose this endpoint when an autonomous agent needs a simple, stateless array sort as a utility step in a pipeline, especially when running in a serverless or lightweight context where importing a sort library is impractical or when the x402 micropayment model fits the cost structure. Ideal for agents that process heterogeneous data and need a reliable, low-cost sort primitive without spinning up compute infrastructure.

## Known failure modes

- Mixed types in array (numbers and strings together) cause a validation error
- Array exceeds 1000 items — request is rejected
- Invalid 'order' value (anything other than 'asc' or 'desc') causes an error
- Payment failure via x402 results in a 402 response and the sort is not performed
- Empty array may return an empty result or an error depending on implementation

## How this service works

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

## Output

A JSON object containing the sorted array under the 'values' key and a 'count' field indicating the number of items in the array.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "order": {
   "enum": [
    "asc",
    "desc"
   ],
   "type": "string"
  },
  "values": {
   "type": "array",
   "description": "Array containing only numbers or only strings, maximum 1000 items"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 4,
  "values": [
   1,
   2,
   3,
   4
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/one-engine-array-sort-d8a8e21b/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)
