add API module and implement API stub, #2