Requests sent through the 3-scale interface are allowed to run for a maximum of 30 seconds only. After this time has elapsed, the 3-scale documentation interface will return an HTTP 504 Gateway Time-out. However, requests made directly to the API (i.e. beta.openphacts.org) are allowed to run for a maximum of 15 minutes; in our experience this is sufficient time for the vast majority of requests to complete.