Given that Chromecast devices (both the 1st and the recently launched 2nd gen family) do only properly run when they have a working internet connection is it safe to assume that 1st and 2nd gen devices share the same public API?
Or do I need to do some magic number checking in my custom receiver code to check on which device revision the code is executing?
No magic is needed, they support identical set of APIs so developers don't need to differentiate them.