The risk there is that it can take a lot of effort to productize an internal tool. You need to polish it so people think it's worthwhile paying for (good design, integrations, etc.), harden it against security concerns, and so on.
No doubt. Before taking that complicated step, throw the idea out there that you are willing to license it. Get a few developers to do that as single transactions, where you walk them through code integration. If it proves too popular for you to manage, you now know you have a market, and a reason to build out a full API and battle test it.