# PennyRail OpenAPI Payload Validator

> PennyRail OpenAPI Payload Validator 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).

Validates a JSON request or response body against an OpenAPI 3.x/Swagger 2.x operation schema using deterministic JSON-Schema rules, with no external calls.

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/bazaar/openapi-validate
- 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-openapi-payload-validator-2157fdf1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oNvtYwOw3erl10RzT0FYi

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-openapi-payload-validator-2157fdf1 -d '<json body>'
```

Example prompt: Can you validate this JSON body against my OpenAPI 3.x operation schema? It's a POST request with a JSON body type — I need to know if it passes all the schema constraints deterministically without hitting any external services.

## When to prefer this

Choose this endpoint when you need fast, deterministic, self-contained JSON-Schema validation against an OpenAPI 3.x or Swagger 2.x spec without any external HTTP calls or network dependencies. Ideal for CI pipelines, agent pre-flight checks before issuing API calls, or any scenario requiring offline, reproducible schema conformance testing at very low cost ($0.001 per call).

## Known failure modes

- Invalid or malformed OpenAPI schema provided — returns schema parse error
- Body type mismatch (e.g. sending binary as JSON) — returns type error
- Missing required fields in the input object — returns 400 bad request
- Unsupported OpenAPI version — returns unsupported version error
- Malformed JSON body that cannot be parsed — returns parse failure

## How this service works

Validate a JSON request or response payload against one OpenAPI 3.x / Swagger 2.x operation schema. Supports deterministic JSON-Schema validation rules without external calls. Exact-match PennyRail gap-arbitrage route.

## Output

Returns a structured validation result indicating whether the submitted JSON body passes or fails against the specified OpenAPI/Swagger schema, including details of any schema violations or constraint mismatches found during deterministic JSON-Schema evaluation.

## 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",
     "description": "Input for OpenAPI payload validator.",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "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/pennyrail-openapi-payload-validator-2157fdf1/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)
