added keygen endpoint