# PennyRail number.clamp

> PennyRail number.clamp is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Clamps a numeric value between a minimum and maximum bound, returning the constrained result

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/f/number.clamp
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-number-clamp-c41e61c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_o5-jgjooLwZ9zVhZCkE9k

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 pennyrail-number-clamp-c41e61c1 -d '<json body>'
```

Example prompt: Clamp the value 150 so it stays between 0 and 100 using PennyRail's number.clamp.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call hosted math utility to clamp a number without spinning up your own compute. Useful in agent pipelines where arithmetic helpers need to be composable microservices, or when you want auditable on-chain micropayment settlement per computation call via the x402 protocol.

## Known failure modes

- Missing required 'input' object returns a validation error
- Missing value, min, or max fields inside input may cause unexpected behavior or error
- Non-numeric values passed as value/min/max may cause computation failure
- min greater than max may produce undefined or erroneous results
- Network timeout or Vercel cold-start latency on first invocation

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object with an 'operation' string (e.g. 'number.clamp') and a 'result' field containing the clamped numeric value — the input value constrained to the [min, max] range.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "description": "{value,min,max}"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "operation",
  "result"
 ],
 "properties": {
  "result": {},
  "operation": {
   "type": "string"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-number-clamp-c41e61c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
