Today, in order to have two machines talking to each other, one need to use a lot of human effort. Engineers are required to discover services and APIs, read their docs, write the integration code and maintain the integration as software evolves. These are the most boring engineering tasks that are delegated to cohorts of support engineers.
And that’s just about the engineering, whereas people also required to sign contracts and terms of service and pay bills. Common situation is that the upfront labour costs to integrate surpass the running costs of using the API for a couple of years.
Moreover, for many cases, such as AI services like machine translation, you need frequently swap service providers to have a cutting edge of technology. With the manual peer-to-peer API integration that’s just economically infeasible.