Selenium is a  set of tools that automate web browser.so go API you can use JMeter, Postman or SoapUi.

Selenium does not support API testing.