I'm looking to utilize the output from Gemini AI to generate an image using FLUX by invoking the callin.io API.
Within the HTTP request's input section, I can access the ‘Result’ generated by the preceding “Gemini AI” connector. This ‘result’ appears to be free of special characters.
I've also attempted to store the ‘Result’ in a variable and then use that variable in the request content, but this resulted in an error parsing the JSON body of the POST request.
When I bypass the variable from the previous connector and use plain text instead, the process works correctly.
Could you please assist with this issue?
FLOW
INPUT SECTION In HTTP
OUTPUT SECTION In HTTP
HTTP config
Hi JC,
I believe I've identified a potential issue within the API Call concerning how the Prompt is being transmitted.
Observe the line break present at the conclusion of the prompt. Consider incorporating IML functions, similar to the attached screenshot, and substituting 'var' with your actual prompt. The newline character is likely causing a parsing anomaly. Alternatively, to confirm, you could paste the JSON into a text editor like VS Code, which might highlight any JSON discrepancies.
Hope this suggestion proves helpful!
Best regards,
Jacob
Thank you so much. It's functioning correctly now.
Hi JC,
No problem at all, happy to hear it's functioning correctly!
If you could, please mark this as the solution. This will help others encountering similar issues in the future to find this information.
Best regards,
Jacob
Welcome to the callin.io community!
If you have a more complex input string, you can also use the Transform to JSON module.
Hope this helps! Let me know if there are any further questions or issues.
P.S.: Investing some effort into the callin.io Academy will save you lots of time and frustration using callin.io.