The license of the API documentation is the license of the code base it is generated on, not the license of the wiki. So e.g. the license of https://en.wikipedia.org/w/api.php?action=help&modules=query is core's license.
However, the source code of it has:
<link rel="copyright" href="//creativecommons.org/licenses/by-sa/3.0/" />
It should either be the correct license for the API help (see T93994: Special:ApiHelp should include licensing information) or omitted.