# ONE Engine Array Difference

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

Computes the set difference between two arrays, returning elements in array A that are not present in array B.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/array/difference?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-difference-777bd7ed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QXTrbEGLHlyJBu5fwZfdn

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-difference-777bd7ed -d '<json body>'
```

Example prompt: I have two lists of numbers — list A is [1, 2, 3, 4] and list B is [2, 4] — can you find which elements are in A but not in B?

## When to prefer this

Use this endpoint when an AI agent needs a quick, cheap, pay-per-call array difference computation without setting up local logic or libraries — especially in agentic workflows on Base where micro-payments via x402 are already in use. Ideal for lightweight data pipeline steps where spinning up code execution is overkill.

## Known failure modes

- Missing or malformed 'a' or 'b' fields in request body returns an error
- Non-array types passed for 'a' or 'b' may cause a validation error
- Payment failure via x402 protocol will result in a 402 response before computation
- Empty arrays return count: 0 and empty values array
- Large arrays may hit payload or processing limits

## 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 'count' integer indicating how many elements are in the difference, and a 'values' array containing the elements that appear in array A but not in array B.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "array"
  },
  "b": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

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