Image to Text

Using Image to Text Endpoints

These endpoints are used in a similar way to other AI Server endpoints where you can provide:

  • RefId - provide a unique identifier to track requests
  • Tag - categorize like requests under a common group

In addition Queue requests can provide:

  • ReplyTo - URL to send a POST request to when the request is complete

Image to Text

var response = client.PostFilesWithRequest(new ImageToText(),
    [new UploadFile("image", File.OpenRead("files/test_image.jpg"), "image")]
);

Queue Image to Text

var response = client.PostFilesWithRequest(new QueueImageToText(),
    [new UploadFile("image", File.OpenRead("files/test_image.jpg"), "image")]
);

INFO

Ensure that the ComfyUI Agent has the Florence 2 model downloaded and installed for the Image-To-Text functionality to work. This can be done by setting the DEFAULT_MODELS environment variable in the .env file to include image-to-text