DIOPTIC interview question

How to create API in project nad method used. what are difference in that.