{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint NHTSA Vehicle JSON",
    "version": "0.1.0",
    "description": "VIN decode + NHTSA recall campaigns + complaint summary for the make/model/year as clean JSON for AI agents (not a per-VIN open-recall check). Pay per call with USDC on Base via x402; 4xx/5xx responses are not charged.",
    "x-guidance": "Use GET /vehicle with vin= (preferred) or make+model+modelYear. Unpaid calls receive HTTP 402. Free: /, /health, /openapi.json, /.well-known/x402.",
    "contact": {
      "email": "toolmint.dev@gmail.com",
      "name": "ToolMint"
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/vehicle": {
      "get": {
        "operationId": "nhtsa_vehicle_lookup",
        "summary": "VIN decode + recalls + complaint summary",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "20000"
        },
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-HJ-NPR-Za-hj-npr-z0-9]{17}$"
            }
          },
          {
            "name": "make",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}$"
            }
          },
          {
            "name": "recallLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicle + recall campaigns + complaint summary with provenance"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records for make/model/year (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    },
    "/vehicle/lookup": {
      "get": {
        "operationId": "nhtsa_vehicle_lookup_alias",
        "summary": "Alias of /vehicle",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "20000"
        },
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-HJ-NPR-Za-hj-npr-z0-9]{17}$"
            }
          },
          {
            "name": "make",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}$"
            }
          },
          {
            "name": "recallLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicle + recall campaigns + complaint summary with provenance"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records for make/model/year (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    }
  }
}