Since Special:ApiHelp includes content generated from the extension's code base, it should include the license. This can be done subtly at the bottom of the little box that says, "This module requires read rights.", etc.
This would need some way to map from the API back to core (known license) or to $wgExtensionCredits['name']['license-name'].