Midjourney "Make an API Call" with GOAPI module fails in scenario but works individually

I’m experiencing a frustrating issue with the “Make an API Call” module in my Make.com scenario. The module is configured to make a POST request to the GoAPI Midjourney endpoint (https://api.goapi.ai/api/v1/task) to generate images.

Here’s the problem:

  • Individual Execution: When I manually run the “Make an API Call” module by itself using the “Run once” option, it works perfectly fine. The API request is sent successfully, and I get a valid response from GoAPI, including a task ID for the image generation job.
  • Scenario Execution: However, when I run the module as part of a larger Make.com scenario, it consistently fails. The GoAPI dashboard shows no record of the request being received, indicating that the request is not even reaching GoAPI.
  • Request Content: I’ve carefully verified that the request content (URL, headers, body) is exactly the same in both cases. I’ve also ruled out potential issues like:
    • Rate limits: I’m well within GoAPI’s rate limits.
    • Network connectivity: I have a stable internet connection, and other API calls in my scenario are working correctly.
    • GoAPI service status: The GoAPI status page shows no outages or issues.

Prompt Generation with Vertex AI

The Midjourney prompt used in the API call is generated by a Google Vertex AI module earlier in the Make.com scenario. This module analyzes an image and other data to create a descriptive and creative prompt for Midjourney.

Prompt Length as a Potential Factor

While I’ve tested with various prompt lengths, it seems like there might be a correlation between the length of the generated prompt and the success of the API call. Shorter prompts (around 14 words) tend to work, while longer prompts (50+ words) consistently fail.

GoAPI Playground

Interestingly, even the longer prompts that fail in the Make.com scenario work correctly when I test them directly in the GoAPI playground. This suggests that there might be a limitation or difference in how GoAPI handles requests from Make.com compared to its playground.

Troubleshooting Steps Taken:

  • Simplified Scenario: I created a simplified version of my scenario with only the essential modules leading up to the “Make an API Call” module. The issue persists even in the simplified scenario.

  • Request Inspection: I used Postman to capture and inspect the HTTP request being sent by the module when run individually. The request appears to be correctly formatted, with the correct URL, headers (including my GoAPI key), and a valid JSON payload in the body.

  • Hardcoded Prompt: I replaced the dynamically generated prompt with a hardcoded, short prompt. This resulted in the API call working correctly within the scenario, further suggesting a potential prompt length limitation.

Module Settings:

I’ve reviewed the settings of the “Make an API Call” module, including timeout settings and character encoding, but I haven’t found any configurations that would explain the discrepancy between individual and scenario execution.

I’m puzzled by this behavior, as the module seems to be configured correctly and the request content is valid. I’m unable to pinpoint why it fails only when it’s part of the larger scenario, especially given the potential prompt length limitation and the discrepancy between Make.com and the GoAPI playground.

Could you please help me investigate this issue further? I’d appreciate any guidance on how to troubleshoot this discrepancy or any known limitations or workarounds that might be relevant.

Hey Miles, I’m having a similar problem and wanted to check and see if you learned anything new yet. While processing hundreds of image generations in a Make automation last night, my process stopped and I am now digging into it. A few things I found…

  1. I “ran out” of Fast processing time on MJ and am wondering if that is the main problem that stopped my process.
  2. I switched the flag from “Fast” to “Relaxed” and it wont even accept the GET request.
  3. I tried V2 in the request URL and I get a 404 error, so switched it back to V1
  4. I should have put this first…I am receiving a 500 error from the server. Did my account get flagged and banned maybe?

I am desperately trying to find a coast-effective way to generate 1000’s of AI generated images and store them on a google drive. I was using Dall-E 3, it is seamlessly integrated into Make, but it gets pricey. I thought I found the answer with MJ, but not happy with limitations on automation…