receive Api instance or a fund which return an Api instance