# API: Request failed with status code 524

**URL:** <https://community.mindstudio.ai/t/api-request-failed-with-status-code-524/1430>\
**Category:** Support\
**Created:** [August 6, 2025, 4:26pm UTC](https://community.mindstudio.ai/t/api-request-failed-with-status-code-524/1430 "2025-08-06T16:26:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ludvator](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@Ludvator](https://community.mindstudio.ai/u/Ludvator)\
**Post date:** [August 6, 2025, 4:26pm UTC](https://community.mindstudio.ai/t/api-request-failed-with-status-code-524/1430/1 "2025-08-06T16:26:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sean](https://community.mindstudio.ai/u/sean)\
**Post date:** [August 6, 2025, 5:08pm UTC](https://community.mindstudio.ai/t/api-request-failed-with-status-code-524/1430/2 "2025-08-06T17:08:49Z")

</div>

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