Fetching images doesn't respect the selected color mode

I have light and dark icons in Figma.

The dark icons container has the Dark UI colors mode selected, which is designed to switch between color palettes.

In Figma it looks fine, dark icons use correct dark colors. But when I use API to fetch them, the mode is not respected and I get light colors. I use GET /v1/images/:key .

The colors will be correct if I fetch the icon container, but I need individual icons. This used to work fine, but stopped working a couple of weeks ago I think.

Has anyone else encountered this issue?

Thank you for your help!