we have the DISCOURSE_VISIBLE header for XHR requests, we could certainly make that work on API requests as well.