API masking

Does anyone know how to make masks with API similar to the ones found here on the left side picture of the case studies section?

I’ve found several tutorials and searched the forum, but nothing seems to explain things thouroughly enough for me to understand how to create my own.

I’ll keep looking, but it’s starting to get frustrating.