# Delx Commerce — Average of N Values

> Delx Commerce — Average of N Values 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).

Computes the arithmetic mean of an array of numeric values and returns the count and result, paid per-call via USDC on Base or Solana.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/avg-n?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-average-of-n-values-9a510c87
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TQS1GtAr1exc_uAfJvqpv

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-average-of-n-values-9a510c87 -d '<json body>'
```

Example prompt: Can you calculate the average of these numbers for me: 3, 5, 7, 2, 1? Just give me the mean and how many values were included.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use arithmetic mean calculation with no signup or account management, especially in agentic workflows where verifiable, metered computation is required and USDC micropayments on Base or Solana are already supported.

## Known failure modes

- Empty or missing 'values' array returns an error or undefined result
- Non-numeric values in the array may cause computation failure or be ignored
- Payment failure via x402 (insufficient USDC balance) blocks the request
- Malformed JSON input body returns a 400-level error
- Very large arrays may hit payload size limits

## How this service works

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

## Output

Returns a JSON object containing the count of input values, the computed arithmetic mean as 'value', and a schema identifier string ('delx/util-avg-n/v1') for verifiable delivery confirmation.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 3,
  "value": 4,
  "schema": "delx/util-avg-n/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-average-of-n-values-9a510c87/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)
