Openapi Payload-validate
Validate one caller-supplied JSON request or response payload against the documented JSON schema for one exact OpenAPI or Swagger operation. Forest fetches only the supplied public specification, never invokes the described API operation, resolves only bounded local references, and reuses the same deterministic schema subset as json.validate.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- validate an API request body against OpenAPI before sending it
- check whether JSON matches the documented schema for an API operation
- validate a tool call payload from an OpenAPI contract before execution
- check an API response body against its documented OpenAPI schema
- verify JSON payload structure before making a state changing API call
What Forest guarantees
- exact method and OpenAPI path selection only; no fuzzy operation routing
- one bounded public specification request with redirects disabled and no described API operation execution
- caller payload is bounded to 96 KiB before specification processing
- local JSON Pointer references only with hard reference, depth and schema-node limits; external references are never fetched
- validation reuses the same deterministic Forest bounded JSON Schema subset as json.validate
- response validation requires an explicit status and reports exact/default response matching
Boundaries
- full OpenAPI JSON Schema dialect support, remote references, formats, combinators or nullable unions
- API authentication, endpoint reachability or whether the described operation will succeed at runtime
- request execution, response retrieval, coercion, repair or default insertion
- rich schema extraction from the intentionally shallow YAML fallback parser
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
Canonical paid endpoint
Related capabilities
- Openapi Breaking-change — Compare two public OpenAPI or Swagger contracts and determine whether the API update contains directly observable breaking compatibility changes. Detects removed operations, newly required request inputs, narrowed inline enums, removed content types or successful responses and tightened authentication; unsupported compatibility questions remain unknown. No API operation is executed.
- Openapi Operation-contract — Inspect the declared request and response contract for one exact OpenAPI or Swagger operation before integration. Returns parameters, request-body content types, response statuses/content types and declared security scheme names without executing the endpoint or resolving external references.
- Openapi Operation-resolve — Look up one exact HTTP method and path in a public OpenAPI or Swagger contract and report whether that documented API endpoint exists. This is a contract/endpoint existence check only; Forest reads the specification and never invokes the API operation.
- Openapi Preflight — Validate a public OpenAPI or Swagger document before integration: verify reachability and parseability, summarize declared API operations, servers and authentication metadata, and report whether the specification is usable for machine integration. It does not call any documented API operation.
- Openapi Schema-state — Fingerprint the structural machine contract of a public OpenAPI or Swagger specification and compare it with an optional previous SHA-256 fingerprint to detect API contract drift. Paths, operations, parameters, security and component schema structure are tracked while documentation-only text and examples are ignored. No API operation is executed.
- Json Validate — Validate caller-supplied JSON against Forest bounded JSON Schema subset v1 before an agent trusts or forwards structured output. Returns deterministic machine-readable violations with stable paths; performs no network request, remote $ref resolution, regex evaluation, model inference or mutation.