There is a famous quote for this situation which is “if all you have is a hammer every problem is going to look like a nail”
Selenium is basically a web automation tool so in this case it's basically the hammer, a word of advice do not use selenium for API testing
There are far better tools depending on the programming language of your choice which you can use.
if you are coding in python then you can use the simple http library called as requests and basically create a custom Framework as per your need
For some simple API exploration you can even use postman
if you are from the Java world and you can use rest assured as a Framework or even use the basic http library and build a custom Framework as per your need
Hopefully this helps and while evaluating a particular tool for a use case in future you will be more inclined to use a tool which solves your problem instead of the one that you know off. Best of luck.