The problem here is that iCloud is the proprietary crap. They don't offer an appropriate API to get photos out. It'd be easier if you were starting with pictures in something more accessible.
That said, I think Aura frames will sync from iCloud via their phone app. Not sure how well it works.
My MIL has one and loves it. It even plays Live Photos.
There are multiple apps that will keep your iCloud Photos synced to various blob storage services. If you just want to maintain a copy or have direct access to photos, that will be a lot easier than a webservice API anyway.
We kinda got something like this working for a relative. They have an "Aura" frame, and in their app you can set a watch folder/album. So we have a shared iCloud album set as the source and it automatically updates based on the images in that shared album.
Yeah, we use an Aura hooked up to Google Photos rather than iCloud, but I think it's similar from the Aura UX perspective. It's super easy to use, and the photos just show up in the frame rotation whenever we add a photo to the corresponding album in Google Photos (which we already use for backing up and organizing photos).
That said, I think Aura frames will sync from iCloud via their phone app. Not sure how well it works.