# Permutations Calculator (nPr)

> Permutations Calculator (nPr) is a paid API for AI agents from combinatorics.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Computes the number of ordered arrangements of r items chosen from n distinct items using nPr = n!/(n-r)!

## Facts

- Endpoint: POST https://combinatorics.openverbs.com/v1/permutations
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/permutations-calculator-npr-e98ab9d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D4H1rItTfYxKZ1NYqVyj5

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 permutations-calculator-npr-e98ab9d1 -d '<json body>'
```

Example prompt: How many ordered arrangements can be made by picking 4 items from a set of 10? Calculate nPr where n is 10 and r is 4.

## When to prefer this

Choose this endpoint when you need the count of ordered selections (permutations) rather than unordered subsets (combinations/nCr). Use it when order matters — e.g., ranking, scheduling, sequencing, or constructing ordered codes. Prefer this over the nCr sibling endpoint when the arrangement sequence is significant. Use the factorial endpoint instead if you need n! directly rather than n!/(n-r)!.

## Known failure modes

- r > n: invalid input since you cannot arrange more items than exist in the set
- r > 10000: exceeds the maximum allowed r value
- n > 1000000: exceeds the maximum allowed n value
- Non-integer or negative values for n or r: schema requires non-negative integer strings
- Missing required fields n or r: returns validation error

## How this service works

Number of ordered arrangements of r items from n, nPr = n!/(n-r)!. Requires r ≤ n and r ≤ 10000.

## Output

Returns an exact integer (as a large decimal string) representing the number of ordered arrangements of r items selected from n, i.e., nPr = n!/(n-r)!. The result may be a very large number for large inputs.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "n",
      "r"
     ],
     "properties": {
      "n": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer ≤ 1000000."
      },
      "r": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer, r ≤ n."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/permutations-calculator-npr-e98ab9d1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from combinatorics.openverbs.com](https://www.zero.xyz/host/combinatorics.openverbs.com/llms.txt)
