api layer of game