A big problem for this would be the transfer of data to and from the API. Imagine an algo to analyze gigabytes or terabytes of data.
Also, protection of the data as it is being transfered, stored, and analyzed is an issue. This is both data integrity and also protection for privacy or confidentiality reasons.