# Vindex API

Vehicle Intelligence for AI agents — Canada-aware, per-call, no signup. Pay per call with x402 (USDC on Base or Solana) to decode any 17-char VIN, read merged US (NHTSA) + Canada (Transport Canada) recalls, and get reliability stats, LLM-clustered known-issue reports (every issue cites verified ODI complaint numbers), and itemized used-car closing costs for all of Canada (10 provinces + 3 territories) + all 50 US states & DC. Free /v1/sample/* endpoints return every response shape for one fixed sample vehicle (2013 Ford F-150) so you can try before you pay.

- **Base URL**: https://api.vindexapi.dev
- **Docs (agent-facing)**: https://api.vindexapi.dev/llms.txt · https://api.vindexapi.dev/llms-full.txt
- **OpenAPI 3.1**: https://api.vindexapi.dev/openapi.json
- **Discovery (JSON)**: https://api.vindexapi.dev/discovery
- **x402 manifest**: https://api.vindexapi.dev/.well-known/x402
- **Agent card (A2A)**: https://api.vindexapi.dev/.well-known/agent-card.json
- **Terms**: https://api.vindexapi.dev/terms.txt

Informational vehicle data only — NOT professional, legal, or purchase advice, and NOT a
vehicle-history report (no liens/accidents/odometer). Contains information licensed under the Open Government Licence – Canada.

## Free (no auth, no payment)

Every /v1/sample/* endpoint always serves the same fixed sample vehicle (2013 Ford F-150,
VIN 1FTFW1ET5DFC10312), computed live — the same response shape as its paid per-VIN twin, with
top-level `sample: true`. Try every shape before you pay.

| Method | Path | What |
|--------|------|------|
| GET | /health | Liveness + payment mode |
| GET | /v1/sample/decode | Sample NHTSA vPIC VIN decode |
| GET | /v1/sample/recalls | Sample merged US (NHTSA) + Canada (Transport Canada) recalls |
| GET | /v1/sample/reliability | Sample reliability stats |
| GET | /v1/sample/known-issues | Sample LLM-clustered known-issues (served as-is, never 503) |
| GET | /v1/sample/purchase-costs | Sample Ontario closing costs ($25,000 private sale) |
| GET | /terms.txt · /terms.json | Terms of Service |

## Paid (x402 V2 — USDC on Base or Solana, per-call)

| Method | Path | Price | What |
|--------|------|-------|------|
| GET | /v1/decode?vin=VIN | $0.01 | NHTSA vPIC normalized VIN decode |
| GET | /v1/recalls?vin=VIN | $0.01 | Merged US (NHTSA) + Canada (Transport Canada) recalls |
| GET | /v1/reliability?vin=VIN | $0.05 | Complaint stats + US/Canada recall counts |
| GET | /v1/known-issues?vin=VIN | $0.25 | LLM-clustered failure modes w/ verified ODI citations |
| GET | /v1/ca/purchase-costs?province=BC&price=25000&sale_type=private | $0.02 | Itemized Canadian closing costs (all 10 provinces + 3 territories) |
| GET | /v1/us/purchase-costs?state=CA&price=25000&sale_type=private | $0.02 | Itemized US per-state closing costs (50 states + DC) |

Prices are USD, settled as USDC (6 decimals). Compute-first / settle-after: you are never
charged for errors or below-threshold answers.

## Quickstart — pay per call (x402, USDC)

```
# 1) Call a paid route with no payment → 402 challenge
curl -s "https://api.vindexapi.dev/v1/known-issues?vin=1FA6P8TH5J5100000"
# → { "x402Version":2, "accepts":[
#       { "scheme":"exact","network":"eip155:8453","asset":"USDC","price":"$0.25","payTo":"0x…" },
#       { "scheme":"exact","network":"solana","asset":"USDC","price":"$0.25","payTo":"…" } ],
#     "terms":"https://api.vindexapi.dev/terms.txt" }

# 2) Sign an x402 'exact' USDC authorization for one accepts[] rail, then retry.
#    Standard @x402 V2 clients send PAYMENT-SIGNATURE; legacy clients send X-PAYMENT.
curl -s "https://api.vindexapi.dev/v1/known-issues?vin=1FA6P8TH5J5100000" -H "PAYMENT-SIGNATURE: <payload>"
# → 200 { "status":"ok","issues":[ … ],"complaintCount":312, … }
```

## Links
- Docs: https://api.vindexapi.dev/llms.txt
- Full: https://api.vindexapi.dev/llms-full.txt
- OpenAPI: https://api.vindexapi.dev/openapi.json
- Discovery: https://api.vindexapi.dev/discovery
- Agent card: https://api.vindexapi.dev/.well-known/agent-card.json
