I want to upload multiple image to an externa APi

i want to upload multiple image to an externa APi
i have an Api which uploads one image at a time then response with its details stored in the server
i want to call that api for an array of image till all the image is upload to that api
from that array
and i want to store the response in page state how to do it