Build infrastructure to serve internal operations at a scale no rational external buyer would justify. Optimize it to a level that drives marginal cost below the buyer’s internal alternative. When the surplus capacity is too large to write off, open the API and sell it.
Forgot the last part: when you have eliminated all the competition and have all your customers locked in with no other options, raise the price.
We need to get back to preventing (or breaking up) monopolies.