How k-anonymity protects you
Your browser hashes the password with SHA-1 and sends only the first 5 hex characters of that hash to the API. The service returns every breached hash that shares those 5 characters — hundreds of candidates — and your browser checks the rest of the hash against that list. The server never learns which password, or even which full hash, you were testing.