# OpenAPI Request Audit

> OpenAPI Request Audit is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.14/call, status unknown (last checked 2026-10-11).

Validates a real HTTP request against its matching OpenAPI operation, checking path/query/header parameters, request body, and security credentials against the declared schema.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/openapi-parameter-contract-audit?utm_source=zero.xyz
- Price: $0.14/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openapi-request-audit-53a7fc1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1OJDHnlVEIVDQOidj0YSj

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 openapi-request-audit-53a7fc1f -d '<json body>'
```

Example prompt: Can you audit this POST request to /orders with a JSON body and Bearer token against our OpenAPI spec to check whether the parameters, body, and security credentials all satisfy the contract?

## When to prefer this

Choose this endpoint when you need to validate a real, fully-formed HTTP request — including headers, body, and credentials — against an OpenAPI document, especially for internal or private APIs that cannot be reached externally. It is ideal for pre-flight contract checks, debugging integration failures, or CI pipeline validation where you supply the request and spec directly rather than hitting a live endpoint.

## Known failure modes

- No matching operation found for the given method and path — returns a routing failure
- Request body does not match declared media type — schema violations reported per field
- Missing or malformed security credential — flagged in audit result
- Invalid or incomplete OpenAPI specification object supplied — parsing error returned
- Path parameters not extractable from supplied path string — parameter audit skipped or errored

## How this service works

Audit a real request against the OpenAPI document it should satisfy. Matches the operation the way a router would, checks every path, query and header parameter against its declared schema, validates the body against the declared media type, and reports whether the credential the declared security scheme expects is present. You supply the request, so this works against an API nothing external can reach.

## Output

A structured audit report indicating whether the request matched a declared OpenAPI operation, the result of validating each path, query, and header parameter against its declared schema, whether the request body satisfies the declared media type and schema, and whether the required security credential is present in the request.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request": {
   "type": "object",
   "required": [
    "method",
    "path"
   ],
   "properties": {
    "body": {},
    "path": {
     "type": "string",
     "maxLength": 2048
    },
    "query": {
     "type": "object"
    },
    "method": {
     "enum": [
      "get",
      "put",
      "post",
      "delete",
      "options",
      "head",
      "patch",
      "trace",
      "GET",
      "PUT",
      "POST",
      "DELETE",
      "OPTIONS",
      "HEAD",
      "PATCH",
      "TRACE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object"
    },
    "media_type": {
     "type": "string",
     "maxLength": 128
    }
   },
   "additionalProperties": false
  },
  "specification": {
   "type": "object"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openapi-request-audit-53a7fc1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
