How to upload a local image from gallery/camera to OpenAI API?

Hello,

I am developing an android application using Kotlin.
I was able to send a URL from the internet to the API successfully. However, i am unsure as to what my next step should be to send a local image that the user uploads to the API. Do i have to save the image in a server, then get the URL, or is there an easier way?

Thank you.