Remove useless setApi method, take in constructor instead.

@edenman @dnkoutso