expose api and setHost