# Delx Choice Index

> Delx Choice Index is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Deterministically maps a seed string into an integer index within [0, length) for stable, stateless A/B or bucket assignment

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/choice-index
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-choice-index-b0be0108
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7jYdoL_TIcnDbeQw6mMyK

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-choice-index-b0be0108 -d '<json body>'
```

Example prompt: Using the choice index, deterministically assign seed 'user-42-session-9' to one of 4 buckets and tell me which index it maps to.

## When to prefer this

Choose this endpoint when you need stable, reproducible bucket or variant assignment from a string key without any shared random number generator state, database lookups, or external dependencies. It is ideal for distributed agent systems where multiple nodes must agree on the same assignment for a given seed, for A/B testing without a central experiment service, or for any deterministic routing/sharding use case where idempotency and zero side effects are required.

## Known failure modes

- Missing or empty seed string returns an error or ok:false
- Length of 0 or negative integer causes invalid range error
- Non-integer length value causes a schema validation failure
- Network timeout on the paid x402 endpoint results in no response
- Payment failure via x402 protocol blocks the request before computation

## How this service works

Deterministic index from seed into [0,length). Call when you need stable A/B assignment without shared RNG state. Returns index, length, ok for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object with an integer `index` in [0, length), the `length` that was passed in, and an `ok` boolean confirming success. The index is fully deterministic for any given seed and length pair, with no retained state or randomness.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "string",
   "description": "Input field: seed."
  },
  "length": {
   "type": "integer",
   "description": "Input field: length."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "index": 3,
  "length": 5,
  "schema": "delx/util-choice-index/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-choice-index-b0be0108/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
