# Delx Commerce — Array Last Element

> Delx Commerce — Array Last Element 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 last element of an input array, with empty-state handling, via a pay-per-call API using USDC micropayments.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/arr-last?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-last-element-f19b6f07
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_orK86V4SGo92MxPcwcex8

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-last-element-f19b6f07 -d '<json body>'
```

Example prompt: Get me the last element from this array: ['alpha', 'beta', 'gamma'] — I need to know what the final value is and whether the list was empty.

## When to prefer this

Choose this endpoint when you need a lightweight, no-signup, pay-per-call utility to extract the last element of an array within an agent workflow, especially when you want verifiable delivery and USDC micropayment billing on Base or Solana. Ideal for agents that already use x402 payment infrastructure and need stateless array utility functions without managing API keys or subscriptions.

## Known failure modes

- Missing or malformed 'items' field returns an error response
- Empty array returns {empty: true} with no value field
- Payment failure via x402 (insufficient USDC balance) results in 402 Payment Required
- Non-array input type may cause a validation error

## 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: 'empty' (boolean indicating whether the input array was empty), 'value' (the last element of the array if non-empty), and 'schema' (a schema identifier string 'delx/util-arr-last/v1').

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "empty": false,
  "value": "gamma",
  "schema": "delx/util-arr-last/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-array-last-element-f19b6f07/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)
