I'm having a little trouble understanding the distinction. An API is still defined by code though. It's basically just the publicly facing part of the code, right?
(IMHO, it's an interface, like a power socket or a light switch. You make it fit, and then it works.)
For example, recipes are also not copyrightable.