Cloud computing seems cheap, until it’s suddenly not. Here’s how one AI startup cut its data processing costs.