I'm too lazy to write this as official documentation so I'm transcribing my experiences here for reference.
This is high level and does not cover how to setup your peer, only how to use the API itself.
This is not a tutorial.
If you are just getting started, this tutorial by DevLogLogan is worth watching.