Create an api class