# FastX402 Prime Factorization

> FastX402 Prime Factorization is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Returns the complete prime factorization of a positive integer up to 10^15, including all prime factors and their exponents.

## Facts

- Endpoint: GET https://fastx402.tools/prime-factorize?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-prime-factorization-c5c6f507
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d2YJr2iTqnu6wFa7LiwIf

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 fastx402-prime-factorization-c5c6f507
```

Example prompt: What's the prime factorization of 831600? Give me the full list of prime factors and their exponents.

## When to prefer this

Choose this endpoint when you need fast, accurate prime factorization of integers up to 10^15 without setting up an account or API key. It is ideal for agents that occasionally need number-theory computations on demand and want pay-per-call pricing in USDC rather than a subscription. Prefer over local computation when the agent environment lacks a math library or when factorization of large numbers (close to 10^15) is needed reliably.

## Known failure modes

- n is not a positive integer or is out of range (1 to 10^15) — likely returns a 400 or error message
- n is 0 or negative — invalid input, likely rejected
- n is too large (> 10^15) — exceeds supported range
- Payment failure or insufficient USDC balance — 402 response before computation
- Non-numeric string passed as n — schema validation error

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing the original integer n, a flat list of all prime factors (with repetition), and an array of prime-power objects each showing a distinct prime and its exponent in the factorization.

## 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": [
      "n"
     ],
     "properties": {
      "n": {
       "type": "string",
       "description": "Positive integer to factorize (1 to 10^15)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "n": {
       "type": "integer"
      },
      "factors": {
       "type": "array",
       "items": {
        "type": "integer"
       }
      },
      "prime_powers": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "prime": {
          "type": "integer"
         },
         "exponent": {
          "type": "integer"
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "n": 360,
  "factors": [
   2,
   2,
   2,
   3,
   3,
   5
  ],
  "prime_powers": [
   {
    "prime": 2,
    "exponent": 3
   },
   {
    "prime": 3,
    "exponent": 2
   },
   {
    "prime": 5,
    "exponent": 1
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-prime-factorization-c5c6f507/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
