# Duo Data Utilities – Money Allocation / Split

> Duo Data Utilities – Money Allocation / Split is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Splits a monetary amount into N equal parts or by custom ratios, distributing any remainder cent-by-cent using a deterministic rule so parts always sum exactly to the original.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/num/allocate?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-money-allocation-split-77649818
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3Bp80huA-kjASwx1KRc4K

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 duo-data-utilities-money-allocation-split-77649818
```

Example prompt: Split $100.00 USD equally among 3 people — make sure the parts add up exactly to the total and use the largest-remainder rule for any leftover cents.

## When to prefer this

Choose this endpoint when you need mathematically guaranteed exact allocation of a money amount — where the sum of shares must equal the original to the last minor unit. Ideal for bill splitting, revenue sharing, installment schedules, or any financial distribution where floating-point rounding errors are unacceptable. The deterministic remainder rules (largest-remainder, first, last) make results auditable and reproducible. Prefer over general-purpose division when currency-aware minor-unit handling is required, especially for zero- or three-decimal currencies like JPY or KWD.

## Known failure modes

- Missing required 'amount' or 'currency' parameter returns a validation error
- Neither 'parts' nor 'ratios' supplied causes an error
- 'parts' value outside 1-1000 range rejected
- 'ratios' list exceeding 1000 entries or individual ratio exceeding precision limits rejected
- Amount absolute value ≥ 1e12 rejected
- Invalid ISO 4217 currency code returns an error
- All-zero ratios list is invalid
- Network or server errors may return non-200 HTTP status

## How this service works

Split a money amount into shares without losing or inventing a cent. Divide evenly into N parts, or by a list of ratios, and the remainder is distributed one minor unit at a time by a named, deterministic rule — largest-remainder, first-wins or last-wins — so the parts always sum exactly to the original. Uses the ISO 4217 minor-unit exponent of the currency, so zero- and three-decimal currencies work (JPY 0, KWD 3); metals and XXX are rejected.

## Output

Returns a JSON object with an array of share amounts in decimal and in minor units, the applied remainder rule, total, currency code, minor unit precision, and the number of minor units redistributed. Also includes metadata: request ID, computation timestamp, CLDR data source attribution, and a deterministic flag confirming the result is reproducible.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "amount",
      "currency"
     ],
     "properties": {
      "rule": {
       "enum": [
        "largest-remainder",
        "first",
        "last",
        "round-robin"
       ],
       "type": "string",
       "default": "largest-remainder",
       "maxLength": 64,
       "description": "Remainder rule: largest-remainder (default), first, last or round-robin."
      },
      "parts": {
       "type": "string",
       "pattern": "^[+-]?\\d+$",
       "maxLength": 64,
       "description": "Number of equal parts, 1-1000. One of parts or ratios."
      },
      "amount": {
       "type": "string",
       "maxLength": 24,
       "description": "Decimal amount, absolute value below 1e12."
      },
      "ratios": {
       "type": "string",
       "maxLength": 4096,
       "description": "Comma-separated non-negative ratios, at most 1000, each with at most 15 integer digits and 15 decimal places. One of parts or ratios."
      },
      "currency": {
       "type": "string",
       "maxLength": 16,
       "description": "ISO 4217 alpha-3 code."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "route",
      "version",
      "data",
      "meta"
     ],
     "properties": {
      "ok": {
       "const": true
      },
      "data": {
       "type": "object",
       "required": [
        "shares",
        "shares_minor",
        "total",
        "currency",
        "minor_units",
        "remainder_distributed",
        "rule"
       ],
       "properties": {
        "rule": {
         "type": "string"
        },
        "total": {
         "type": "string"
        },
        "shares": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "currency": {
         "type": "string"
        },
        "minor_units": {
         "type": "integer"
        },
       
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "rule": "largest-remainder",
   "total": "100.00",
   "shares": [
    "33.34",
    "33.33",
    "33.33"
   ],
   "currency": "EUR",
   "minor_units": 2,
   "shares_minor": [
    3334,
    3333,
    3333
   ],
   "remainder_distributed": 1
  },
  "meta": {
   "sources": [
    {
     "id": "iso-4217",
     "licence": "Public data (owner decision 2026-09-29)",
     "version": "SIX list one 2026-09-17, list three 2026-01-01",
     "published": "2026-09-17",
     "attribution": "ISO 4217 currency and funds code lists, published by SIX Group as secretariat of the ISO 4217 Maintenance Agency (public data)"
    }
   ],
   "price_usd": "0.05",
   "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms",
   "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D",
   "computed_at": "2026-09-28T12:00:00.000Z",
   "deterministic": true
  },
  "route": "/v1/num/allocate",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-money-allocation-split-77649818/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
