While you could in theory, *no such (public) API exists*
Apple uses an internal framework called MaterialKit and it’s really cool, offering full control about the material properties including grain, diffusion, color, transparency and even gradients.
Not public tho