{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint NHTSA VIN + Recalls JSON",
    "version": "0.1.0",
    "description": "Decode a VIN and return the NHTSA recall campaigns for its make/model/year in one paid call (not a per-VIN open-recall check). USDC on Base via x402. 4xx/5xx responses are not charged.",
    "x-guidance": "Prefer GET /vin/{vin} for the combined decode+recalls response. Optional includeComplaints=true. Unpaid calls get 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"
          }
        }
      }
    },
    "/vin/{vin}": {
      "get": {
        "operationId": "nhtsa_vin_recalls",
        "summary": "VIN decode + recall campaigns for its make/model/year",
        "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": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeComplaints",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}$"
            }
          },
          {
            "name": "recallLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "complaintLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicle + recalls JSON"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    },
    "/lookup": {
      "get": {
        "operationId": "nhtsa_lookup",
        "summary": "VIN decode + recalls via query",
        "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",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeComplaints",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}$"
            }
          },
          {
            "name": "recallLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "complaintLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicle + recalls JSON"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    },
    "/recalls": {
      "get": {
        "operationId": "nhtsa_recalls",
        "summary": "Recalls by make/model/year",
        "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": "make",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recalls JSON"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    },
    "/complaints": {
      "get": {
        "operationId": "nhtsa_complaints",
        "summary": "Complaints by make/model/year",
        "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": "make",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Complaints JSON"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    },
    "/decode": {
      "get": {
        "operationId": "nhtsa_decode",
        "summary": "vPIC VIN decode only",
        "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",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modelYear",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Decoded vehicle JSON"
          },
          "400": {
            "description": "Invalid input (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No NHTSA records (not charged)"
          },
          "422": {
            "description": "VIN could not be decoded (not charged)"
          },
          "502": {
            "description": "Upstream NHTSA error (not charged)"
          }
        }
      }
    }
  }
}