# agent402.tools OpenAPI Required Params Extractor

> agent402.tools OpenAPI Required Params Extractor is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Given an OpenAPI spec and an operation identifier, returns the minimum set of required input parameters an agent must supply to make a valid call.

## Facts

- Endpoint: POST https://agent402.tools/api/openapi-required-params
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-openapi-required-params-extractor-83822cb4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GJlPg2bknXh6Z6LSnOFTx

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 agent402-tools-openapi-required-params-extractor-83822cb4 -d '<json body>'
```

Example prompt: I have this OpenAPI spec as a JSON object — can you tell me the minimum required parameters I need to provide to call the operation with operationId 'createUser', tagged by whether they go in the path or query?

## When to prefer this

Use this endpoint when an agent needs to programmatically determine the minimum required inputs for any operation in an OpenAPI spec, especially before attempting to call an unknown API. Ideal for dynamic API orchestration, agent tooling pipelines, or when building adapters that need to introspect API contracts without manual inspection.

## Known failure modes

- operationId not found in spec — returns error or empty result
- invalid or malformed OpenAPI/Swagger document — parsing failure
- neither operationId nor method+path provided — ambiguous lookup
- method+path combination does not match any operation — not found
- spec passed as invalid JSON string — parse error

## How this service works

For one operation, return the minimum set of inputs an agent must provide to make a successful call. Locate the op by `operationId` (preferred) or by `method`+`path`. Output is a single flat array tagged by `in`: `path` (always required), `query` / `header` / `cookie` (only when `required: true`), and `body.field` entries naming the top-level required fields of a required JSON request body.

## Output

A flat array of required parameter objects, each tagged with their location (e.g. 'path', 'query', 'header', 'body'), representing only the minimum inputs needed to make a successful call to the specified operation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "path": {
   "description": "If no operationId, exact path (e.g. /users/{id})"
  },
  "spec": {
   "description": "OpenAPI/Swagger document (object or JSON string)"
  },
  "method": {
   "description": "If no operationId, HTTP method (e.g. GET)"
  },
  "operationId": {
   "description": "Locate by operationId (preferred)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/users",
  "method": "POST",
  "hasBody": true,
  "required": [
   {
    "in": "body.field",
    "name": "email",
    "type": "string"
   },
   {
    "in": "body.field",
    "name": "password",
    "type": "string"
   }
  ],
  "operationId": "createUser",
  "bodyContentType": "application/json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-openapi-required-params-extractor-83822cb4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
