# Forest Web – OpenAPI Payload Validator

> Forest Web – OpenAPI Payload Validator is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Validates a single JSON request or response payload against the documented JSON schema for a specific OpenAPI or Swagger operation path and method.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/openapi/payload-validate?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-web-openapi-payload-validator-ba8fbf69
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0cjihxrAydx943UyjVJ4E

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 forest-web-openapi-payload-validator-ba8fbf69 -d '<json body>'
```

Example prompt: Can you validate this JSON payload as the request body for the POST /users endpoint defined in my OpenAPI spec at https://api.example.com/openapi.json and tell me if it conforms to the schema?

## When to prefer this

Choose this endpoint when you need deterministic, schema-level validation of a single JSON payload against a specific OpenAPI or Swagger operation without actually invoking the described API. It is ideal for pre-flight checks before sending requests, CI/CD regression tests, response conformance audits, and agent pipelines that need to verify payload structure before trusting or forwarding data. Prefer this over general JSON Schema validators when you want automatic schema extraction from a live OpenAPI spec URL rather than supplying a schema manually.

## Known failure modes

- Spec URL is not publicly accessible or returns non-200 — fetch fails
- Spec is not valid OpenAPI or Swagger format — parsing error returned
- Path or method combination not found in the spec — operation not found error
- Status code not documented for the given operation — scope resolution fails
- Payload contains deeply nested or recursive references that exceed bounded resolution — truncated validation
- Invalid JSON payload supplied — parse error before validation begins

## How this service works

Machine-readable contract for active Forest paid capabilities. Unsigned paid calls return HTTP 402 with a PAYMENT-REQUIRED x402 challenge.

## Output

A validation result indicating whether the supplied JSON payload conforms to the JSON schema extracted from the specified OpenAPI/Swagger operation. Includes any validation errors, mismatched fields, missing required properties, or type violations found in the payload relative to the documented schema.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?://",
   "maxLength": 2048,
   "minLength": 1,
   "description": "Public HTTP(S) URL to inspect, resolve, or compare."
  },
  "part": {
   "enum": [
    "request",
    "response"
   ],
   "description": "Public part value used to scope this lookup."
  },
  "path": {
   "type": "string",
   "pattern": "^/",
   "maxLength": 2048,
   "minLength": 1,
   "description": "Repository file path whose public metadata should be checked."
  },
  "method": {
   "enum": [
    "GET",
    "POST",
    "PUT",
    "PATCH",
    "DELETE",
    "HEAD",
    "OPTIONS",
    "TRACE"
   ],
   "type": "string",
   "description": "HTTP method for the bounded public probe."
  },
  "status": {
   "type": "string",
   "pattern": "^[1-5]\\d\\d$",
   "description": "Public status value used to scope this lookup."
  },
  "payload": {
   "description": "Public payload value used to scope this lookup."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "url": "example",
   "found": false,
   "scope": "documented_schema_validation_only_no_api_execution",
   "valid": false,
   "version": "example",
   "requested": {
    "part": "request",
    "path": "example",
    "method": "GET",
    "status": "example"
   },
   "truncated": false,
   "violations": [],
   "parse_valid": false,
   "content_type": "example",
   "schema_scope": "forest_bounded_json_schema_subset_v1",
   "schema_state": "validated",
   "matched_status": "example",
   "schema_present": false,
   "operation_count": 0,
   "violation_count": 0,
   "unsupported_keywords": []
  },
  "meta": {
   "cache": "miss",
   "provider": "openapi-parser",
   "checked_at": "2026-01-01T00:00:00.000Z",
   "duration_ms": 0
  },
  "version": "1",
  "capability": "openapi.payload-validate"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-web-openapi-payload-validator-ba8fbf69/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
