To set the quality of your Cycles preview or render adjust the numbers in the integrator section of the Render properties. (The Render properties icon looks like a camera.) I’ve used a render samples of 8,000 and even then there were tiny portions of the image that had speckles or “fireflies”. And that was after 8 hours of rendering. But I still loved the results.
Edit: I incorrectly stated that the quality settings were in the Camera properties. This has been corrected to read “the Render properties”.