# ONE Engine Array Flatten

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

Flattens a nested array to a specified depth, returning a single-level or partially-flattened array.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/array/flatten?utm_source=zero.xyz
- Price: $0.0011/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-flatten-ff67b975
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P1AzC2EcRF2tw3sTkfvFP

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-flatten-ff67b975 -d '<json body>'
```

Example prompt: Flatten this nested array [[1,[2,3]],[4,[5,[6]]]] to a depth of 2 so I can process it as a simple list.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call array flattening operation inside an agent workflow without spinning up a compute environment. Ideal for small-to-medium arrays in automated pipelines where cost-per-call matters and depth control (1–10) is needed. Prefer it over in-process flattening when the agent runtime lacks code execution capability.

## Known failure modes

- Depth outside 1–10 range returns a validation error
- Non-array 'values' input returns a schema error
- Extremely large arrays may hit payload size limits
- Missing 'values' field returns a 400 bad request
- Network timeout on very large array processing

## How this service works

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

## Output

Returns a JSON object with a 'values' key containing the flattened array, e.g. {"values":[1,2,3,4,5]}. Elements are unwrapped to the specified depth, with deeper nesting preserved beyond that depth.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "depth": {
   "type": "integer",
   "maximum": 10,
   "minimum": 1
  },
  "values": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

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