The summary 2.0 endpoint [[ https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#Responses | spec ]] dictates that the server must return an empty 204 response to requests for summaries for pages outside the content namespace(s); "content namespace" is undefined. The service is currently hardcoded to return a 204 for any namespace other than the main namespace (namespace 0).
In principle, a wiki may configure any number of its namespaces as "content namespaces" via [[ https://www.mediawiki.org/wiki/Manual:$wgContentNamespaces | $wgContentNamespaces ]], and this designation will be client-retrievable via ApiSiteInfo.
In practice, after a casual check on a few production Wikipedias (en, de, he, zh), it seems that most if not all currently consider mainspace to be their only content namespace.
Meanwhile, our intention appears to be to consider a broader range of namespaces (such as File) to constitute "content namespaces" for the purposes of the summary API.
=== Options:
# Keep the current logic in place (i.e., return a 204 for all requests outside namespace 0);
# Determine the wiki's content namespace(s) from siteinfo, and return summaries for any page in those namespaces (mostly if not always 0 in practice);
# Hard-code a specific set of namespaces as "content namespaces" for purposes of the summary API.