Frontend expects /api/chat but backend had /chat. Added APIRouter with prefix=/api to fix route mismatch.