Sending a text message with an ID before each image seems to be working fine:
Main text message:
Analyze the attached images and select the best one for a finance site.
Return the results in JSON format using the following interface:
{
images: {
// The id of the analyzed image.
"id": number;
// Set this to true if it's the best image.
"best_image": boolean;
// One sentence feedback on why you chose the image.
"feedback": string;
}[];
}
Here is how i build the rest of the content
in PHP:
foreach ($images as $id => $url) {
$content[] = ['type' => 'text', 'text' => "ID for the next image: $id"];
$content[] = ['type' => 'image_url', 'image_url' => ['url' => $url]];
}