API: Request failed with status code 524

Hi,

I am using agents via API, using node.js express server and NPM mindstudio package. When I use some more complex scenarios and/or reasoning models in an agent, I get this cloudflare timeout error.

Strangely enough, in agent debugger I can see all requests marked as completed and response with data sent, but on server I get error 524. Seems like the threshold is 100s response time.

Anything I can do (or anything I am possibly doing wrong)? Do I have to use callback?

Thanks and sorry if this has been asked before

1 Like

Yes, for anything longer than 60s you need to be using a callback or the request will time out.