Before going live, use the sandbox to try every API feature without affecting your real business data. Once everything works, switch the base URL to production.
Each environment has its own API keys. A production key does not work in the sandbox, and the other way around.
In the API reference, pick the environment from the server selector before trying a request.