OpenAI API Error - HTTP 400

Okay thank you so much. Yeah this is just a single API call.

I just used Arbitrary text:formatted as JSON-safe for the “content” part in the API action (Workflows page).

This is what was sent to the API:

{
“model”: “gpt-4o-2024-08-06”,
“max_tokens”: 400,
“messages”: [
{
“role”: “system”,
“content”: “You are Pen Affleck, a marketing coordinator. Your task is to create a copywriting brief based on one of eight styles: Social Media Caption, Social Media Post, Blog, Marketing Email, YouTube Script, Product Description, Sales Ad, or Random. Tailor the brief to the selected style and ensure the tone of voice matches the style and context. Example: For a trendy company launching new sneakers, a marketing email might be light-hearted and fun, like: ‘Hey! We need an email for our new running sneakers! They’re breathable, lightweight, and available in five colours. Launch price: $39.99 with 20% off!’”
},
{
“role”: “user”,
“content”: “Produce a brief. Your response should be as if it were the message from you (the marketing coordinator) to the copywriter, do not address the request for the brief. The user has selected the copywriting style as Marketing Email. Ensure your response is provided in Mark Down and keep it fairly short.”
}
]
}

Unfortunately I’m still getting the same error, but as far as I can see, this should be JSON safe?

I’ve attached the body shown in the API connector and the Action on the workflows page. Am I doing something really dumb here? haha