{
  "openapi": "3.1.0",
  "info": {
    "title": "Vindex API",
    "version": "0.2.1",
    "x-guidance": "Pay-per-call vehicle-data API (x402, USDC on Base eip155:8453). Four paid endpoints: GET /v1/decode?vin={vin} ($0.01, normalized NHTSA vPIC decode + original factory-warranty terms keyed off make/model-year), GET /v1/recalls?vin={vin} ($0.01, merged US+Canada recalls + full decoded vehicle), GET /v1/known-issues?vin={vin} ($0.05, LLM-clustered failure modes + reliability-aggregates block + full decode), GET /v1/purchase-costs?country=CA|US ($0.02, itemized US + Canada used-vehicle closing costs) — call without payment to receive the 402 challenge, sign the exact-scheme authorization for accepts[].amount atomic units, retry with the PAYMENT-SIGNATURE (x402 V2) or X-PAYMENT (legacy) header. Four free previews under /v1/sample/* (decode, recalls, known-issues, purchase-costs) show each response shape. History: reliability merged into known-issues; purchase-costs unified under /v1/purchase-costs (2026-07-07).",
    "summary": "Canada-aware vehicle intelligence for AI agents — per-call, no signup.",
    "description": "Vehicle Intelligence for AI agents. Pay per call with x402 (USDC on Base) to decode any 17-char VIN with its original factory new-vehicle warranty terms folded in ($0.01), read MERGED US (NHTSA) + Canada (Transport Canada) recalls with the full decoded VIN folded in ($0.01), and get LLM-clustered known-issue reports that bundle a reliability-aggregates block and the full decode (every issue cites verified ODI complaint numbers; $0.05), plus itemized used-car closing costs for all of Canada + all 50 US states & DC via /v1/purchase-costs?country=CA|US ($0.02). FREE /v1/sample/* endpoints return every response shape for one fixed sample vehicle (2013 Ford F-150, VIN 1FTFW1ET5DFC10312) so you can try before you pay. Every JSON object response carries a legal `disclaimer` field. Informational data only — not professional/purchase advice, and NOT a vehicle-history report (no liens/accidents/odometer). Contains information licensed under the Open Government Licence – Canada.",
    "termsOfService": "https://api.vindexapi.dev/terms.txt",
    "contact": {
      "name": "Vindex API",
      "url": "https://api.vindexapi.dev",
      "email": "jcislo918@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://api.vindexapi.dev",
      "description": "Vindex API public edge"
    }
  ],
  "externalDocs": {
    "description": "Agent-facing reference (llms.txt)",
    "url": "https://api.vindexapi.dev/llms.txt"
  },
  "tags": [
    {
      "name": "free",
      "description": "No auth, no payment."
    },
    {
      "name": "paid",
      "description": "x402 V2 per-call pricing (USDC on eip155:8453)."
    }
  ],
  "paths": {
    "/v1/decode": {
      "get": {
        "tags": [
          "paid"
        ],
        "operationId": "decode",
        "summary": "Normalized NHTSA vPIC VIN decode ($0.01)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "description": "Paid ($0.01 USDC via x402). Decodes a 17-char VIN through NHTSA vPIC and returns the normalized decoded vehicle (make/model/year/engine/body/…) with fetch provenance, PLUS a `warranty` block giving the ORIGINAL factory new-vehicle warranty terms (basic/powertrain/corrosion/roadside/EV-battery) keyed off the decoded make + model-year. Warranty terms are the manufacturer's original coverage as sold — NOT warranty-remaining, and NOT extended-warranty campaigns, recalls, or emissions warranties. The cheapest call when you only need the decode — the same `vehicle` object is also folded into /v1/recalls and /v1/known-issues. Compute-first / settle-after. Free fixed-sample preview of this exact shape: GET /v1/sample/decode.",
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "17-character VIN (no I/O/Q)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "vin": "1FA6P8TH5J5100000",
                    "vehicle": {
                      "year": 2018,
                      "make": "FORD",
                      "model": "Mustang",
                      "bodyClass": "Coupe"
                    },
                    "provenance": {
                      "source": "nhtsa-vpic",
                      "cache": "hit"
                    },
                    "charged": true
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/v1/recalls": {
      "get": {
        "tags": [
          "paid"
        ],
        "operationId": "recalls",
        "summary": "Merged US (NHTSA) + Canada (Transport Canada) recalls + full decoded vehicle ($0.01)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "description": "Paid ($0.01 USDC via x402). Decodes the VIN and returns the FULL decoded vehicle (the same payload as /v1/decode is folded in here), then merges NHTSA (US) and Transport Canada (CA) recalls into one response — the only API combining both. 24h cache per source; stale served on failure. Canadian detail capped at the 25 most-recent recalls. OGL–Canada attribution. Compute-first / settle-after. Free fixed-sample preview of this exact shape: GET /v1/sample/recalls.",
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "17-character VIN (no I/O/Q)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "vin": "1FA6P8TH5J5100000",
                    "vehicle": {
                      "year": 2018,
                      "make": "FORD",
                      "model": "Mustang"
                    },
                    "counts": {
                      "us": 3,
                      "canada": 1
                    },
                    "charged": true
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/v1/known-issues": {
      "get": {
        "tags": [
          "paid"
        ],
        "operationId": "known-issues",
        "summary": "LLM-clustered named failure modes with verified ODI citations + reliability block + full decode ($0.05)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "description": "Paid ($0.05 USDC via x402). Clusters NHTSA owner complaints into named failure modes; EVERY cited ODI number is programmatically validated against the input complaint set (hallucination-gated) and every issue carries ≥2 verified citations. Severity signals per issue are summed from the CITED complaints only. The response also bundles a `reliability` aggregates block (top components, severity signals, US/Canada recall counts incl. Canadian units affected — reliability was merged into known-issues on 2026-07-07), the full decoded `vehicle` (same payload as /v1/decode), and `complaintsAnalyzed`, the size of the recent-weighted stratified sample the LLM actually saw (vs `complaintCount`, the total). Refuses UNCHARGED below 15 complaints (returns 200 status:insufficient_data) — but still returns the decode + reliability block for free. 90-day cache. Compute-first / settle-after. Free fixed-sample preview of this exact shape: GET /v1/sample/known-issues.",
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "17-character VIN (no I/O/Q)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "status": "ok",
                    "vehicle": {
                      "year": 2018,
                      "make": "FORD",
                      "model": "Mustang"
                    },
                    "complaintCount": 312,
                    "complaintsAnalyzed": 150,
                    "knownIssues": [
                      {
                        "count": 2,
                        "title": "Electric power steering assist failure",
                        "trend": "rising",
                        "confidence": 0.9,
                        "odiNumbers": [
                          11234567,
                          11245678
                        ],
                        "componentTags": [
                          "STEERING",
                          "ELECTRICAL SYSTEM"
                        ],
                        "severitySignals": {
                          "fires": 0,
                          "crashes": 0,
                          "injuries": 0
                        }
                      }
                    ],
                    "charged": true
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/v1/purchase-costs": {
      "get": {
        "tags": [
          "paid"
        ],
        "operationId": "purchase-costs",
        "summary": "Itemized US + Canada used-vehicle closing costs (country=CA|US) ($0.02)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "description": "Paid ($0.02 USDC via x402). Government-imposed closing costs of buying a used passenger vehicle, unified across both countries via `country=CA|US`. CA: any of Canada's 10 provinces + 3 territories (BC, AB, SK, MB, ON, QC, NB, NS, PE, NL, YT, NT, NU) — provincial/territorial sales tax (PST/RST/QST/HST or GST-only) plus transfer/registration/plate fees and inspection; tax is flat on the whole price at the highest bracket whose threshold the price meets (BC private 12% → 15% ≥ $125,000 → 20% ≥ $150,000); Alberta + the three territories levy no private-sale tax; dealer sales add 5% GST except in HST provinces (ON/NB/NS/PE/NL). US: any of the 50 states or DC — sales/use/excise tax, title, first-year registration, inspection, and (for dealer sales) a dealer documentation fee; special regimes handled automatically (DC tiered title-excise range, IL flat RUT-50 private-party table, SC 5% IMF capped at $500, and AK/AZ/HI/MT/NV/NH/OR no private-party sales tax). Each line carries a source URL and confidence. Figures verified 2026-07-04. Compute-first / settle-after. Free fixed-sample preview of this exact shape: GET /v1/sample/purchase-costs.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CA",
                "US"
              ]
            },
            "description": "Country selector (case-insensitive): CA routes to the Canadian per-jurisdiction rules, US to the per-state rules."
          },
          {
            "name": "price",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": 0.01,
              "maximum": 5000000
            },
            "description": "Agreed sale price in the country's currency (> 0, ≤ 5,000,000)."
          },
          {
            "name": "sale_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "dealer"
              ]
            },
            "description": "Private sale or dealer sale."
          },
          {
            "name": "province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "BC",
                "AB",
                "SK",
                "MB",
                "ON",
                "QC",
                "NB",
                "NS",
                "PE",
                "NL",
                "YT",
                "NT",
                "NU"
              ]
            },
            "description": "CANADA ONLY (required when country=CA): two-letter province/territory code (case-insensitive)."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "US ONLY (required when country=US): two-letter state code (case-insensitive), one of the 50 states or DC."
          },
          {
            "name": "family_gift",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "CANADA ONLY, private sales only — applies the jurisdiction's family/related-individual gift exemption ($0 tax) where one exists."
          },
          {
            "name": "buyer_has_plates",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "CANADA ONLY — selects plate-dependent fee lines where the jurisdiction distinguishes them (e.g. Ontario: true → vehicle permit only $32; false → permit + new plate $59)."
          },
          {
            "name": "trade_in",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "US ONLY — trade-in value in USD (≥ 0, < price). Deducted from the tax base only for a dealer sale in a state granting a FULL trade-in credit."
          },
          {
            "name": "local_rate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 15
            },
            "description": "US ONLY — exact county/city surtax percentage (0–15). When omitted, the sales-tax line carries a range up to the state's maximum local rate."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "country": "CA",
                    "province": "ON",
                    "provinceName": "Ontario",
                    "totalKnownCad": 3287.5,
                    "charged": true
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/v1/prepurchase": {
      "get": {
        "tags": [
          "paid"
        ],
        "operationId": "prepurchase",
        "summary": "Pre-purchase report: decode + recalls + known issues + ownership costs in one call ($0.25)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.250000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "description": "Whole-job bundle for agents advising a vehicle purchase. One payment returns the normalized VIN decode, safety recalls, known-issue/reliability summary, and CA/US purchase+ownership cost estimate for the decoded vehicle. Equivalent to 4 separate paid calls. Composed in-process from the same data as /v1/decode, /v1/recalls, /v1/known-issues and /v1/purchase-costs (no extra upstream fan-out beyond those). The decode is computed FIRST — an invalid VIN or decode failure returns UNCHARGED (no settle). The response then settles only if the decode succeeded AND at least 2 of the 3 secondary sections (recalls, known-issues, purchase-costs) are available; otherwise it returns UNCHARGED { error: 'insufficient_sections', sections: {…} }. A section that failed but was still charged appears as sections.<name>:'unavailable' with the rest of the report intact. The cost section is a jurisdiction-level estimate (the bundle takes no price/province/state) — call GET /v1/purchase-costs for an exact itemized figure. Compute-first / settle-after. Each section carries its own fetch provenance.",
        "parameters": [
          {
            "name": "vin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "17-char VIN."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CA",
                "US"
              ]
            },
            "description": "CA (default) or US — cost section jurisdiction."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "vin": "1FTFW1ET5DFC10312",
                    "vehicle": {
                      "make": "FORD",
                      "model": "F-150",
                      "modelYear": 2013,
                      "trim": "XLT",
                      "bodyClass": "Pickup",
                      "engine": {
                        "model": "V8",
                        "cylinders": 8,
                        "displacementL": 5,
                        "fuelType": "Gasoline"
                      }
                    },
                    "recalls": {
                      "count": 6,
                      "items": [
                        {
                          "campaign": "18V123000",
                          "component": "ELECTRICAL SYSTEM",
                          "summary": "Wiring may short and cause a fire."
                        }
                      ]
                    },
                    "knownIssues": {
                      "reliabilitySummary": "842 NHTSA complaints; 3 named failure mode(s) clustered from 150 analyzed.",
                      "topIssues": [
                        {
                          "title": "Cam phaser failure (5.0L)",
                          "componentTags": [
                            "ENGINE"
                          ],
                          "odiNumbers": [
                            11234567,
                            11245678
                          ],
                          "count": 2
                        }
                      ]
                    },
                    "purchaseCosts": {
                      "country": "CA",
                      "estimatedFees": {
                        "totalKnownCad": 3287.5,
                        "estimatedTotalRangeCad": {
                          "low": 3287.5,
                          "high": 3402.5
                        }
                      },
                      "notes": "Representative jurisdiction-level estimate; call /v1/purchase-costs for exact per-jurisdiction figures."
                    },
                    "sections": {
                      "decode": "ok",
                      "recalls": "ok",
                      "knownIssues": "ok",
                      "purchaseCosts": "ok"
                    },
                    "charged": true
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/.well-known/hexanon": {
      "get": {
        "tags": [
          "free"
        ],
        "operationId": "hexanon-family",
        "summary": "Hexanon family catalog",
        "description": "Catalog of all products in the Hexanon family (x402 data & intelligence APIs for AI agents) — names, taglines, API base URLs, docs, MCP packages. Same catalog on every Hexanon product; canonical copy at https://api.moltalyzer.xyz/.well-known/hexanon.",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "family": "Hexanon",
                    "products": [
                      {
                        "slug": "vindex",
                        "name": "Vindex",
                        "api": "https://api.vindexapi.dev",
                        "mcp": "vindex-mcp"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/sample/decode": {
      "get": {
        "tags": [
          "free"
        ],
        "operationId": "sample-decode",
        "summary": "FREE sample VIN decode (fixed sample vehicle)",
        "description": "Free, no payment. Normalized NHTSA vPIC decode for the fixed sample vehicle. Same shape as paid GET /v1/decode plus `sample: true` and `note`.",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "sample": true,
                    "vin": "1FTFW1ET5DFC10312",
                    "vehicle": {
                      "year": 2013,
                      "make": "FORD",
                      "model": "F-150"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/sample/recalls": {
      "get": {
        "tags": [
          "free"
        ],
        "operationId": "sample-recalls",
        "summary": "FREE sample merged US + Canada recalls (fixed sample vehicle)",
        "description": "Free, no payment. Merged NHTSA (US) + Transport Canada (CA) recalls + full decoded vehicle for the fixed sample vehicle. Same shape as paid GET /v1/recalls plus `sample: true` and `note`.",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "sample": true,
                    "vin": "1FTFW1ET5DFC10312",
                    "counts": {
                      "us": 3,
                      "canada": 3
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/sample/known-issues": {
      "get": {
        "tags": [
          "free"
        ],
        "operationId": "sample-known-issues",
        "summary": "FREE sample known-issues (fixed sample vehicle)",
        "description": "Free, no payment. LLM-clustered known-issues + reliability-aggregates block + full decoded vehicle for the fixed sample vehicle. Same shape as paid GET /v1/known-issues plus `sample: true` and `note`. A non-'ok' synthesis status is served as-is with 200 (samples never 503), still carrying the decode + reliability block.",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "sample": true,
                    "status": "ok",
                    "vin": "1FTFW1ET5DFC10312",
                    "complaintCount": 287
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/sample/purchase-costs": {
      "get": {
        "tags": [
          "free"
        ],
        "operationId": "sample-purchase-costs",
        "summary": "FREE sample closing costs for both countries (fixed sample inputs)",
        "description": "Free, no payment. Returns `{ sample: true, note, ca, us }`: `ca` is the Ontario $25,000-private result (same shape as paid GET /v1/purchase-costs?country=CA) and `us` is the California $25,000-private result (same shape as paid GET /v1/purchase-costs?country=US).",
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "sample": true,
                    "ca": {
                      "country": "CA",
                      "province": "ON"
                    },
                    "us": {
                      "country": "US",
                      "state": "CA"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-agentcash-provenance": {
    "ownershipProofs": [
      "x402-ownership|origin=https://api.vindexapi.dev|wallet=0x444731Dac7C9CDe478147f41E621a064Fcbe70F2|issued=2026-07-15|sig=0x7984823ef3a2983e83e7607d0c4e46f5361f14d94382c69c7d50ce7984b71e6078c4860af194cefe2fefae983370f0d0a679f63b0b196cc7757530281219f4b11b"
    ]
  },
  "x-discovery": {
    "ownershipProofs": [
      "x402-ownership|origin=https://api.vindexapi.dev|wallet=0x444731Dac7C9CDe478147f41E621a064Fcbe70F2|issued=2026-07-15|sig=0x7984823ef3a2983e83e7607d0c4e46f5361f14d94382c69c7d50ce7984b71e6078c4860af194cefe2fefae983370f0d0a679f63b0b196cc7757530281219f4b11b"
    ]
  },
  "components": {
    "responses": {
      "PaymentRequired": {
        "description": "x402 V2 payment challenge. Sign an `exact` USDC authorization for one accepts[] rail, then retry with the PAYMENT-SIGNATURE (V2) or X-PAYMENT (legacy) header. You are not charged for errors or below-threshold answers.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentRequired"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "x402": {
        "type": "http",
        "scheme": "x402",
        "description": "Custom HTTP 402 payment flow (x402 V2). The server answers an unpaid paid-route request with a 402 whose body is a PaymentRequired envelope (x402Version + accepts[] + terms). Each accepts[] entry is an `exact`-scheme USDC rail. Sign ONE rail and retry the same request with the `PAYMENT-SIGNATURE` header (x402 V2 clients) or the legacy `X-PAYMENT` header. Per-call pricing."
      }
    },
    "schemas": {
      "PaymentRequired": {
        "type": "object",
        "description": "x402 V2 PaymentRequired envelope. accepts[] lists one exact USDC rail per network.",
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 2
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scheme": {
                  "type": "string",
                  "const": "exact"
                },
                "network": {
                  "type": "string",
                  "enum": [
                    "eip155:8453"
                  ]
                },
                "asset": {
                  "type": "string",
                  "const": "USDC"
                },
                "price": {
                  "type": "string",
                  "description": "USD price string."
                },
                "payTo": {
                  "type": "string",
                  "description": "Settlement address for this rail."
                },
                "mimeType": {
                  "type": "string",
                  "const": "application/json"
                }
              }
            }
          },
          "terms": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}
