Grok can understand images passed as base64-encoded content within messages. Use the vision endpoint to send an image along with a text prompt and receive a description or analysis.
Send a base64-encoded image to Grok for analysis.
Grok := TsgcHTTP_API_Grok.Create(nil);
Grok.GrokOptions.ApiKey := 'API_KEY';
WriteLn(Grok._CreateVisionMessage('grok-2-vision',
'Describe this image.', vBase64, 'image/jpeg'));