beginning of photo api endpoint