I wrote this API for Dify. Now that I'm finished coding it, I think it could be a helpful tool for others.