# ONE Engine Stable Sort (Array)

> ONE Engine Stable Sort (Array) 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 a JSON array of up to 1000 items using a stable sort algorithm, with optional offset and comparison array support.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v3/array/stable-sort/t3?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-stable-sort-array-571a9644
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fHzptkAtUzPVckAqFOVML

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-stable-sort-array-571a9644 -d '<json body>'
```

Example prompt: Sort this array of values [42, 7, 3, 19, 5, 100, 2] into ascending order using a stable sort — keep equal elements in their original relative positions.

## When to prefer this

Choose this endpoint when you need a guaranteed stable sort (preserving relative order of equal elements) on a JSON array of up to 1000 items via a pay-per-call model. Ideal for autonomous agent pipelines that need lightweight, on-demand sorting without spinning up local compute, especially when already integrated with the x402 Base payment protocol.

## Known failure modes

- Array exceeds 1000 items — request rejected
- Missing required 'values' field — validation error
- Malformed JSON in values array — parse error
- Payment failure via x402 — 402 response, call not executed
- Network timeout on Cloudflare Worker — 5xx response

## How this service works

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

## Output

Returns a JSON object containing the stably sorted array, preserving the relative order of equal elements, based on the provided input values and optional comparison parameters.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "values"
 ],
 "properties": {
  "size": {
   "type": "integer"
  },
  "other": {
   "type": "array",
   "description": "Optional comparison array"
  },
  "offset": {
   "type": "integer"
  },
  "values": {
   "type": "array",
   "description": "JSON array with at most 1000 items"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

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