Use API or build the functionality

Should I use an API or build the functionality? Depends :) an architect would say.

Questions to ask before you choose
Is the API functionality core to the business function?
Do you need the API to be highly available?
Are there any compliance issues protecting the data flow in your application?
Is the API functionality available from multiple vendors?
In house expertise available to create the API? (NLP API)
Time to market?

Also a good practice should be to wrap the API into a vendor independent interface before using it in your application. So that you have flexibility to swap vendors or implement your own if you need to.