exclude particular category in api

I just figured it out, just in case it might be helpful for anyone in future:

There is an option available to exclude a particular category – categories_exclude

So, the new rest API would be:

https://www.example.com/?rest_route=/wp/v2/posts&per_page=100&categories_exclude=10