# x402fix by AgentGate – x402 Endpoint Doctor (Lite)

> x402fix by AgentGate – x402 Endpoint Doctor (Lite) is a paid API for AI agents from api.youraitools.co, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-23).

Probes a paid x402 URL without paying and returns a compliance grade, score, and prioritized fix list covering headers, EIP-712 domains, CORS, multichain pricing, and Bazaar schema validation.

## Facts

- Endpoint: GET https://api.youraitools.co/x402fix/v1/lite?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402fix-by-agentgate-x402-endpoint-doctor-lite-49986d27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_czevBR6SPC-XrI33oRotl

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 x402fix-by-agentgate-x402-endpoint-doctor-lite-49986d27
```

Example prompt: Can you run my paid API endpoint https://api.example.com/v1/data through the x402fix doctor and tell me what's broken, what grade it gets, and what I need to fix first?

## When to prefer this

Use this endpoint when you are a seller or developer who has built an x402-gated API and wants to verify correct implementation before listing or after receiving payment-rejection reports. It is the right choice when you need a structured, machine-readable compliance report with severity-ranked fixes rather than raw HTTP debugging. Prefer it over manual curl testing when you need EIP-712 domain validation, Bazaar schema conformance, multichain price consistency checks, and CORS header auditing in one call.

## Known failure modes

- URL is unreachable or returns non-402 status — endpoint may be misconfigured or offline
- Target URL does not implement x402 at all — grade will be F with no valid payment header found
- Rate limiting or firewall on target URL blocks the probe — timeout or connection error returned
- Invalid URL format supplied — query parameter validation error
- Target URL requires a specific User-Agent or IP not used by the probe — may yield false negatives

## How this service works

x402 endpoint tester API (payment-required validator). x402 endpoint doctor for sellers: probes your paid URL unpaid (GET, HEAD, empty POST, CORS preflight; never pays) and returns a grade and a fix list. Checks the v2 PAYMENT-REQUIRED header and v1 body, every accepts entry (USDC asset, EIP-712 domain, Solana feePayer, atomic amount, payTo), multichain price consistency and the Bazaar declaration against its own JSON Schema.

## Output

A JSON object containing the probed URL, tier, x402 version flags (v1/v2/bazaar), detected networks, price in USD, an ordered fix list with severity (error/warn/info), problem description and code-level fix for each issue, an overall letter grade (A–F), a numeric score out of 100, the HTTP method used, a status string, and a human-readable summary sentence.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Full https URL of the paid x402 route (site tier: the origin or API base URL)"
      },
      "method": {
       "enum": [
        "GET",
        "POST"
       ],
       "type": "string",
       "description": "Method your paid route uses (default: from its Bazaar declaration, else GET)"
      },
      "framework": {
       "enum": [
        "hono",
        "express",
        "next"
       ],
       "type": "string",
       "description": "Server framework for the generated snippet (check tier, default hono)"
      }
     },
     "description": "Search intents: x402 validator, test x402 endpoint, 402 payment required checker, x402 debug, x402 seller tools, payment header check"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "tier": {
       "type": "string"
      },
      "x402": {
       "type": "object"
      },
      "fixes": {
       "type": "array"
      },
      "grade": {
       "type": "string"
      },
      "score": {
       "type": "number"
      },
      "method": {
       "type": "string"
      },
      "status": {
       "type": "string"
      },
      "summary": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://api.example.com/v1/data",
  "tier": "lite",
  "x402": {
   "v1": false,
   "v2": true,
   "bazaar": true,
   "networks": [
    "Base"
   ],
   "price_usd": 0.01
  },
  "fixes": [
   {
    "n": 1,
    "id": "v2_accept_0",
    "fix": "Set extra: { name: \"USD Coin\", version: \"2\" }. Signatures over the wrong domain fail verification, so every payment is rejected.",
    "problem": "v2 accepts[0] (Base): EIP-712 domain \"USDC\" v2 does not match USDC on Base (\"USD Coin\" v2)",
    "severity": "error"
   },
   {
    "n": 2,
    "id": "head_402",
    "fix": "Answer HEAD like GET without a body (402 + PAYMENT-REQUIRED header). 402index and other directory health checks probe with HEAD and mark the endpoint down otherwise.",
    "problem": "HEAD answers 405, not 402",
    "severity": "warn"
   },
   {
    "n": 3,
    "id": "cors_expose",
    "fix": "Send Access-Control-Allow-Origin: * and Access-Control-Expose-Headers: PAYMENT-REQUIRED, PAYMENT-RESPONSE, X-PAYMENT-RESPONSE on 402 and 200 responses.",
    "problem": "Browsers cannot read the PAYMENT-REQUIRED header (not in Access-Control-Expose-Headers)",
    "severity": "warn"
   }
  ],
  "grade": "C",
  "score": 70,
  "method": "GET",
  "status": "fix_needed",
  "summary": "C (70/100): x402 v2, Base. 1 error(s), 3 warning(s); first fix: v2 accepts[0] (Base): EIP-712 domain \"USDC\" v2 does not match USDC on Base (\"USD Coin\" v2)."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402fix-by-agentgate-x402-endpoint-doctor-lite-49986d27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.youraitools.co](https://www.zero.xyz/host/api.youraitools.co/llms.txt)
