# Prime Number Checker

> Prime Number Checker is a paid API for AI agents from sovereign-x402-zeta.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Checks whether a given number is prime via a paid HTTP API endpoint.

## Facts

- Endpoint: POST https://sovereign-x402-zeta.vercel.app/api/v1/prime/check?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/prime-number-checker-3c188418
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ioX_9xTvQg6VkciMW2gAN

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 prime-number-checker-3c188418 -d '<json body>'
```

Example prompt: Can you check whether 1000003 is a prime number?

## When to prefer this

Use this endpoint when you need a quick, on-demand primality check for a single integer and are operating in an agentic or automated context that already handles x402 micropayments. Ideal for workflows where math validation is a step in a larger pipeline (e.g., cryptography, number theory tasks, educational tools) and you need a reliable hosted check without running local code.

## Known failure modes

- Missing or malformed 'number' field in request body returns a 400 error
- Non-integer or negative number input may result in a validation error
- Payment not provided or invalid USDC transaction leads to 402 Payment Required
- Network timeout on the Vercel serverless function results in a 504 error
- Very large integers may exceed computation limits or timeout

## How this service works

Check if a number is prime.

## Output

Returns a boolean or structured result indicating whether the submitted number is prime, along with the number itself. The response confirms primality (true/false) for the given integer input.

## 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",
     "properties": {},
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/prime-number-checker-3c188418/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sovereign-x402-zeta.vercel.app](https://www.zero.xyz/host/sovereign-x402-zeta.vercel.app/llms.txt)
