Split the API into two files, one for the REST API and one for the XenForo PHP API.