I have been trying to call a single API , which will provide me with some information , but it’s taking more than 25 sec for the API to return response.
Is there a way i can implement this in the backend , I tried using Async events API but it seems like it’s not quite the right fit for it
I’ve been stuck at this for long time and I absolutely need my API to happen from backend and there is no way i can optimize the API to make it respond in less than 25 sec
The only way I know of is to run the api request as a task on your own server. You would then have to set up some kind of asynchronous pattern where you have an initial request that starts the task then you would either call a webhook in your forge app with the result or poll your server for the result. Not a trivial task.
The 25 second limit pretty much rules out api calls to OpenAI and possibly other AI services. Their endpoints usually take quite a while.
4 Likes