Implement minimum supported API version

Fixes previous behavior, which was to always use the latest version