How can i read uploaded file and ask for the answer/ chat about the file?

Hello, i coulnd find answer and i spend many hours to write it by myself and my frined gpt, but i couldnt figure it out.

You can upload file to new chatgpt4 and ask him what is inside, i tried to make it byself over the api, but cant figure it out how ? I uploaded file to openai so i have fileId. But not sure how to setup backend to use the fileId to chat with chatgpt, i spended few hours on it and cant find solution.

I am new at building api and etc with chatgpt.

Thank you for any advice.


Can anyone show me the way where i should look?

Thank you for any tip.