Skip to main content
Question

Openrouter API Call Timeout


Redouane Abou S

Hello ,

 

I'm building WhatsApp automation and need to call openrouter API sometimes it ok but sometimes i get réponse is null...i suspect its related to the 10s Time Out 

 

Need Help 

Thanks ! 

3 replies

cata_rendon
Forum|alt.badge.img+5
  • Community Moderator
  • September 24, 2026

Hi ​@Redouane Abou S, that pattern, working sometimes and returning null other times, usually means the model is taking longer than the request waits for. Two ways to handle it:

  1. Make the call faster: use a smaller model, set a low max_tokens, turn off streaming and keep the prompt short. This helps but it's not reliable, since response times vary.
  2. The one that actually fixes it: don't wait for OpenRouter inside the request. Send the call to a middleware (Make, n8n or your own endpoint) that responds to ManyChat right away, and once the model replies, send the text back to the contact using ManyChat's Send Content API. That way it doesn't matter how long the model takes.

If you go with option 2 and need a hand with the setup, let us know.
Cata Rendon


Redouane Abou S

Hello, 

 

Thanks for you reply. 

 

Can you send me a demo or screenshot for the option 2 (step to use/link..;etc) ? 

 

Thanks


cata_rendon
Forum|alt.badge.img+5
  • Community Moderator
  • September 30, 2026

Hi ​@Redouane Abou S , sure. Here's how I'd set it up with Make (in n8n it's the same idea):

In ManyChat

  1. Create a custom field for the answer, for example ai_reply.
  2. In your flow, use the External Request to send the user's message and the Contact Id to a Make webhook. End the flow there, or send a short "give me a sec" message.
  3. Create a second flow that just sends a message with {{ai_reply}}. Copy its flow ID (flow_ns) from the flow URL.

In Make

  1. Custom Webhook as the trigger. Don't add a "Webhook response" module, so Make answers ManyChat right away.
  2. HTTP module calling OpenRouter with the user's message.
  3. HTTP module to the ManyChat API /fb/subscriber/setCustomField with the subscriber_id and the AI text in ai_reply.
  4. HTTP module to /fb/sending/sendFlow with the subscriber_id and the flow_ns of the second flow.

You'll need your ManyChat API key (Settings → API). The endpoints are documented here: https://api.manychat.com/swagger

This way ManyChat never waits for the model, and the answer is sent as soon as OpenRouter replies, no matter if it takes 3 or 30 seconds.

Hope this helps!