...
To allow API users to try out your API,
A CORS Restriction policy must be defined.
If the CORS Setting » Enable Try Me setting is selected in the Developer Portal settings, the default CORS Restriction policy is applied to all APIs in the Developer Portal.
Learn how to select the setting. You must be an Org Admin to modify the Developer Portal settings.If the CORS Setting » Enable Try Me setting is not selected or if you want to override the default CORS Restriction policy, you can add your own CORS Restriction policy to your API or API version.
Learn how to add and configure the CORS Restriction policy for "Try It Out".
The API must be published.
Learn how to publish your API.
...