# Delx Commerce — Array Take (First N Elements)

> Delx Commerce — Array Take (First N Elements) is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Returns the first N elements from an input array, paid per-call via USDC on Base or Solana using x402.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/arr-take?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-array-take-first-n-elements-073b8cc5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xub-hORRgefIzGzGnpogc

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 delx-commerce-array-take-first-n-elements-073b8cc5 -d '<json body>'
```

Example prompt: Take the first 3 items from this array: [10, 20, 30, 40, 50].

## When to prefer this

Choose this endpoint when you need a simple, stateless, pay-per-call array head-slice with verifiable on-chain payment via x402 (USDC on Base or Solana), and no signup or API key overhead. Prefer it in agent workflows where billing transparency and micro-payment settlement per operation are required. It is best for lightweight utility operations rather than complex data processing.

## Known failure modes

- n exceeds array length — may return all items or an error
- missing required fields (n or items) — likely a 400 bad request
- payment not accepted or insufficient USDC balance — 402 Payment Required
- n is zero or negative — returns empty array or validation error
- non-integer value for n — schema validation failure

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the count of returned items, the sliced sub-array of the first N elements, and a schema identifier string ('delx/util-arr-take/v1') confirming the response format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "n": {
   "type": "integer",
   "description": "Input field: n."
  },
  "items": {
   "type": "array",
   "description": "Input field: items."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "items": [
   1,
   2
  ],
  "schema": "delx/util-arr-take/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-array-take-first-n-elements-073b8cc5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
