That's contestable afaik.
> through the programming language interface
i.e. dynamically linking which is usually understood to be prohibited unless linking code has a compatible license.
> either CLI
Here's the problem - you can take any GPL library, make small CLI or REST adapter for it and license it GPL as well, then use that adapter from your proprietary application - is that still allowed? Because if it is then GPL can't ever be enforced and if it isn't you can't call CLI APIs even if original libraries themselves provide it.