How to write API code in arduino

Thanks for replay,

I didn't work with API functions in arduino it's totally different to write code in API function so please any one share example code for API function call in arduino using I2C.