They used to have an API, which they removed about two years ago or so. Until then, there were a bunch of 3rd-party Grammarly plugins, including a pretty decent one for VSCode.
Mainly because (cloud-hosted, bigger & smarter) LLMs probably offer no added privacy benefit. Self-hosted models are dumber, neutered and unpredictable.