Converting from wav to midi is a very difficult and error prone operation, not often done as far as I know, which will very often give poor results, so having an API to do that would be silly, though libraries may exist for it used in the Open Source software you mention. .wav files have no useful metadata that can help you get back to midi. It s much harder than speech to text to do well! (harmonics and noise matter). Will probably work OK for single instruments playing though, with strong fundamental frequencies that can be picked out with fourier transform.
For OCR of sheet music, I have found a piece of GPL d software called Audiveris. This task isn t as hard as the previous thing, but is still a highly complex operation, probably requiring manual intervention to correct errors, that having a simple API for is pointless.
If you are making some Open Source software yourself, you can of course attempt to adapt swathes of code from these projects for whatever use you have in mind, though I doubt it would be worth the effort.
If any of the software you find has a command line interface to start a conversion, you could execute shell commands from your own software to make them do the required conversions automatically.