My current go-to resource for gradients is https://uigradients.com. One feature I'd personally appreciate is a programmatic interface for getting a list of gradients, it's handy for generating dynamic backgrounds.
As far as an API goes, how would you organize the input/output for dynamic backgrounds? Maybe send a style and colors, and get a random gradient of that color?