add api and core