I knew this was coming.
I had this idea myself, basically machine learning as a service about 3 years or more ago. Somehow, I also knew Google would implement something like this. So while I still consider this a viable startup idea, I knew it would be tough to compete against a behemoth that already has tons of data and experience training countless machine learning algorithms.
There are reasons this hasn't been done before. I don't think it's a viable startup idea. Think about the capital you would need to even get something like this off the ground. Doing the AI API 'right' would require a supercomputer, if you take it far enough.
A guy can dream though. Maybe doing high-frequency trading would get you most of the way there.
IMHO, go for the niche: elsewhere in this thread Directed Edge was mentioned, and they are a good example of a business tackling a well-defined problem with exciting tools and techniques.