# OpenAPI Contract Audit + Safe Pytest Scaffold

> OpenAPI Contract Audit + Safe Pytest Scaffold is a paid API for AI agents from codex-rapid-patch-evidence.vercel.app, paid per call via x402, $15/call, status unknown (last checked 2026-10-21).

Audits a public OpenAPI 3.x JSON or YAML document and returns prioritized contract findings, a quality score, a Markdown handoff, and a read-only pytest scaffold.

## Facts

- Endpoint: GET https://codex-rapid-patch-evidence.vercel.app/api/rapid-patch-pack?utm_source=zero.xyz
- Price: $15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openapi-contract-audit-safe-pytest-scaffold-c67f658d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FLwtF0hlAZE4bcEZAikGA

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-contract-audit-safe-pytest-scaffold-c67f658d
```

Example prompt: Can you audit this public OpenAPI spec at https://petstore3.swagger.io/api/v3/openapi.json and give me prioritized contract findings, a quality score, a Markdown handoff, and a safe pytest scaffold I can run without any credentials?

## When to prefer this

Choose this endpoint when you need a comprehensive, automated audit of a public OpenAPI 3.x spec that produces not just findings but also actionable developer artifacts: a ready-to-run pytest scaffold, a Markdown handoff for code review, and a quality score. It is ideal when the spec is publicly accessible without credentials and you need a complete evidence pack for engineering handoff or PR review, rather than just a lint report.

## Known failure modes

- Missing or invalid OpenAPI URL — returns error if the spec cannot be fetched or parsed
- Non-public or credential-gated spec URL — endpoint cannot retrieve protected documents
- Invalid OpenAPI version — only 3.x specs are supported; 2.x Swagger docs may fail
- Malformed YAML/JSON — unparseable documents return a parse error
- Payment failure — x402 payment of $15 USDC not completed results in 402 response
- Unsupported HTTP method — only GET, HEAD, DELETE are accepted

## How this service works

Audit one public OpenAPI 3.x JSON or YAML document and receive prioritized contract findings, a quality score, a Markdown handoff, and a safe read-only pytest scaffold.

## Output

Returns a JSON object containing a named evidence pack with download links to: a bugfix triage CLI script, a product manifest JSON, and an API contract evidence CLI script. Also includes a list of what's in the pack: deterministic bugfix triage, API contract evidence, and a reviewer-ready patch handoff, along with prioritized contract findings, a quality score, and a Markdown handoff document.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "need": {
       "type": "string",
       "description": "Short description of the public, credential-free engineering task."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string"
      },
      "download": {
       "type": "object",
       "properties": {
        "bugfixTriageCli": {
         "type": "string"
        },
        "productManifest": {
         "type": "string"
        },
        "apiContractEvidenceCli": {
         "type": "string"
        }
       }
      },
      "includes": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "Rapid Patch Evidence Pack",
  "download": {
   "bugfixTriageCli": "/downloads/bugfix-triage.mjs",
   "productManifest": "/downloads/product-manifest.json",
   "apiContractEvidenceCli": "/downloads/api-contract-evidence.mjs"
  },
  "includes": [
   "deterministic bugfix triage",
   "API contract evidence",
   "reviewer-ready patch handoff"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openapi-contract-audit-safe-pytest-scaffold-c67f658d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codex-rapid-patch-evidence.vercel.app](https://www.zero.xyz/host/codex-rapid-patch-evidence.vercel.app/llms.txt)
