I need an API that would allow me to find the inputs to any function that minimize (or maximize) that particular function. It would have to be used as follows:

1) initial function inputs are a guess (this is my software)
2) function is calculated (this is my software)
3) result from #2 above is fed to optimization engine that suggests the next set of inputs to try (this is the software I need)
4) loop back to #2 above. (this is my software)


Does anyone know of any vendors for such software?