How to send image as an input from custom GPT to an external API?

I have been trying to build a custom GPT that can take image inputs from users, send them to an external API (something like an API endpoint hosted on Amazon EC2 server), receive the response and then display it to the user.

I am not able to figure out how to send images to the API here.

Can you please help me out on this? I am stuck on this for so long and haven’t been able to figure out a way please.

It will really help our team.

Thank you,

I’m also curious, do you now know how to do it?

You can take an image url as input or suggest the user a webpage to upload an image and share the link as input to your action

@ihzaaulya From what I read across all the posts in this forum, it seems there’s no directly way of using image input and directly sending this to an external API for further processing yet.

The only way to accomplish this, and is used by various plugins as well, is

  1. We give the user the link on which he/she can upload the file. Once the user uploads the file on our provided link, we can then use that image as an input to the API, get the response and send it back to the custom GPT which can be used to generate response for the user.

  2. Or we directly ask the user for the image link, and send it as an input to the external API. Then on the backend we need to extract the image from this link, do the processing, and send it back to the custom GPT that can be used to generate response for the user.

These are the only two ways that I have figured out so far.

1 Like