The API help shown by Special:ApiHelp and action=help includes example API requests. For example Special:ApiHelp/query has this example
api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user%7Ccomment&continue=
which you can click to see the API response.
This is great but if you want to modify parameters it is fiddly to modify the browser URL. If the wiki has Extension:ApiSandbox it would be nice to provide an extra link "[try in ApiSandbox]".
ApiSandbox supports this \o/ , its doHash() function applies anything in the URL fragment (after the hash mark) to its UI. So take the example URL query string, and append it to Special:ApiSandbox# and we get the desired behavior:
https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user%7Ccomment&continue=
I've added [try in ApiSandbox] to mw.org's Template:ApiEx (T89680).