stevenwaterman / musetree

AI Music Generation for the Real World
http://musetree.stevenwaterman.uk/
MIT License
236 stars 33 forks source link

504 Error #88

Closed jonxuxu closed 3 years ago

jonxuxu commented 3 years ago

Loved Musetree! I played around with it a few months ago, but it looks like it has completely stopped working recently. It seems that the request to https://musenet.openai.com/sample returns a 504 error now. Do you know what might be causing this?

stevenwaterman commented 3 years ago

Seems like they're explicitly checking the referrer field in web requests and denying anything that doesn't come from their website. I can work around that, but they clearly don't want musetree using their API so I'd rather not. I'll have to have a think about what the solution is here, but for now you'll have to give up using musetree (or fork it and do the workaround yourself)

stevenwaterman commented 3 years ago

More specifically, seems like they're blocking the https://www.stevenwaterman.uk/musetree/ referrer and nothing else. Not sending the referrer or setting it to https://www.google.com seems to be ok

I should mention that i'm seeing 405 errors on the OPTIONS request - is that different to you?

stevenwaterman commented 3 years ago

Yeah it seems like they refuse any request from a referrer that contains the string stevenwaterman

If there's someone from OpenAI reading this - You could've just asked???

If you want to use MuseTree, you can still clone it and run it locally - that will change the referrer and get it working again. While it would be trivial to remove the referrer from the request (or just host it at a different domain), I'd rather take down the hosted version if OpenAI don't want me using their api.

stevenwaterman commented 3 years ago

OpenAI reached out to me and explained that the blocking was a temporary measure in response to extreme traffic coming from MuseTree which DOS attacked their servers and broke the official tool. I have temporarily disabled the (terrible) retry logic and will re-add a better implementation that won't infinitely spam their servers. They have removed the block so I will close this issue.