I am using gpt-4o
+ gpt-4o-mini
, with the nodejs openai package, and getting this error…
{
error: {
message: 'Invalid image.',
type: 'invalid_request_error',
param: null,
code: 'invalid_image'
},
code: 'invalid_image',
param: null,
type: 'invalid_request_error'
}
…using this implementation.
await openai.chat.completions.create({
model,
messages: [
{ role: "system", content: systemContent },
{
role: "user",
content: [
{ type: "text", text: prompt },
{ type: "image_url", image_url: { url: base64ImageString } },
],
},
],
});
i know that i am sending a base64 string because I’ve viewed it in the console, and I’m using the same string with Claude and there’s no problems. I have successfully sent a base64 image string to gpt-4o
with the same implementation above but using a different method to make the base64 image string.
the error message looks like it’s not getting the base64 string; param: null
…
What am I doing wrong?
Please help.
Thank you.