I’m getting an OpenAI error

Hi,

I’m getting an OpenAI error in SEO Content Machine and I’m not sure whether this is a bug in the current integration or a settings issue.

This does not happen 100% of the time, but it happens very often. I would estimate it affects around 80%–100% of my generations, and I see it roughly every 5–15 minutes during normal use.

Error message:

Finished Error:
{“status”:400,“data”:{“error”:{“message”:“We could not parse the JSON body of your request. (HINT: This likely means you aren’t using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center->help.openai.com.)”,“type”:“invalid_request_error”,“param”:null,“code”:null}}}

Stack trace shown by the app:
->Object.uploadJsonAsync
->process.processTicksAndRejections
->async openAiGenerate
->async Object.generateFromAiService
->async doPrompt

I do not have access to the internal code, so I can only report what the app shows.

What I noticed:

  • The error is a 400 invalid_request_error
  • OpenAI says the JSON body of the request is not valid JSON
  • This suggests SCM may be sending a malformed JSON payload to the OpenAI API
  • The issue is frequent, not just occasional

Questions:

  1. Is this a known issue with the current OpenAI integration in SEO Content Machine?
  2. Does SCM need an update for the latest OpenAI API format/endpoints?
  3. Could certain prompts/templates/characters break the JSON request?
  4. Is there a recommended model/setting that currently works correctly?

Thanks.

Not a known issue.

The line before error shows the prompt being sent.

Does this happen regularly or a once off error?

Its possible that when converting your prompt to json it’s breaking and thus nothing is set to open ai.

If you can replicate this error consistently, export the task.

I might need a copy of any ai templates as well.

This has been happening regularly for about three weeks now, and it’s not just me.
Can I message you privately? So we don’t have to share all the details here.

Yes pm or email me.

What email address should I use to contact you?