Skip to content
API Call with GOAPI...
 
Notifications
Clear all

API Call with GOAPI module fails in scenario but works individually

2 Posts
2 Users
0 Reactions
4 Views
Miles_Clark
(@miles_clark)
Posts: 1
New Member
Topic starter
 

I'm encountering a perplexing issue with the “Make an API Call” module within my callin.io scenario. The module is set up to perform a POST request to the GoAPI Midjourney endpoint ( https://api.goapi.ai/api/v1/task ) for image generation.

Here's the problem:

  • Individual Execution: When I manually execute the “Make an API Call” module in isolation using the “Run once” option, it functions flawlessly. The API request is dispatched successfully, and I receive a valid response from GoAPI, including a task ID for the image generation job.
  • Scenario Execution: However, when this module runs as part of a larger callin.io scenario, it consistently fails. The GoAPI dashboard shows no record of the request being received, indicating that the request isn't even reaching GoAPI.
  • Request Content: I've meticulously confirmed that the request content (URL, headers, body) remains identical in both scenarios. I've also eliminated potential causes such as:

    • Rate limits: I am operating well within GoAPI's specified rate limits.
    • Network connectivity: My internet connection is stable, and other API calls within my scenario are functioning correctly.
    • GoAPI service status: The GoAPI status page indicates no ongoing 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 callin.io scenario. This module analyzes an image and other data to craft a descriptive and creative prompt for Midjourney.

Prompt Length as a Potential Factor

While I've experimented with prompts of varying lengths, it appears there might be a connection between the length of the generated prompt and the success of the API call. Shorter prompts (approximately 14 words) tend to work, whereas longer prompts (50+ words) consistently result in failure.

GoAPI Playground

Notably, even the longer prompts that fail within the callin.io scenario execute successfully when tested directly in the GoAPI playground. This suggests a potential limitation or a difference in how GoAPI processes requests originating from callin.io compared to its playground environment.

Troubleshooting Steps Taken:

  • Simplified Scenario: I constructed a simplified version of my scenario, including only the essential modules leading up to the “Make an API Call” module. The issue persists even in this streamlined setup.

  • Request Inspection: I utilized Postman to capture and examine the HTTP request sent by the module during individual execution. The request appears to be formatted correctly, featuring the accurate URL, headers (including my GoAPI key), and a valid JSON payload in the body.

  • Hardcoded Prompt: I substituted the dynamically generated prompt with a hardcoded, shorter prompt. This change allowed the API call to function correctly within the scenario, further pointing towards a potential prompt length limitation.

Module Settings:

I've thoroughly reviewed the settings of the “Make an API Call” module, including timeout configurations and character encoding, but have not identified any settings that would account for the discrepancy between individual and scenario execution.

I am perplexed by this behavior, as the module appears to be configured correctly, and the request content is valid. I am unable to determine why it fails exclusively when integrated into the larger scenario, especially considering the potential prompt length limitation and the difference observed between callin.io and the GoAPI playground.

Could you please assist me in investigating this issue further? I would greatly appreciate any insights on how to troubleshoot this discrepancy or any known limitations or workarounds that might be applicable.

 
Posted : 01/12/2024 7:58 pm
Hank_Fuselier
(@hank_fuselier)
Posts: 1
New Member
 

Hey Miles, I'm encountering a similar issue and wanted to see if you've discovered any updates. While processing numerous image generations within a callin.io automation last night, my workflow halted, and I'm currently investigating. Here are a few observations:

  1. It appears I "ran out" of Fast processing time on MJ, and I'm questioning if this is the primary cause of the interruption.
  2. I attempted to switch the flag from "Fast" to "Relaxed," but the GET request isn't even being accepted.
  3. I tried using V2 in the request URL, which resulted in a 404 error, so I reverted to V1.
  4. I should have mentioned this earlier, but I'm receiving a 500 error from the server. Could my account have been flagged or banned?

I'm urgently seeking a cost-effective method to generate thousands of AI-generated images and store them on Google Drive. I was previously using Dall-E 3, which integrates smoothly with callin.io, but it becomes quite expensive. I thought I had found a solution with MJ, but I'm not satisfied with the automation limitations...

 
Posted : 28/01/2025 4:14 pm
Share: