Skip to content
Error parsing JSON ...
 
Notifications
Clear all

Error parsing JSON body of POST in HTTP - callin.io API Key Auth Request

5 Posts
3 Users
0 Reactions
4 Views
JC_bg
(@jc_bg)
Posts: 2
New Member
Topic starter
 

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

 
Posted : 17/04/2025 9:05 am
Jacob_Roper
(@jacob_roper)
Posts: 2
New Member
 

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

 
Posted : 17/04/2025 10:45 am
JC_bg
(@jc_bg)
Posts: 2
New Member
Topic starter
 

Thank you so much. It's functioning correctly now.

 
Posted : 17/04/2025 2:56 pm
Jacob_Roper
(@jacob_roper)
Posts: 2
New Member
 

Hi JC,

No problem at all, happy to hear it's functioning correctly!

:smiling_face:

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

 
Posted : 17/04/2025 3:35 pm
samliew
(@samliew)
Posts: 293
Reputable Member
 

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.

 
Posted : 22/04/2025 6:53 am
Share: