I don't know of any settled law about this question; IANAL and I haven't really looked. But I think the distinction that would make the most sense would not be based on anything technical, but on how an API is used in practice, and in particular on whether it's used by multiple unrelated parties. Ie, the same set of function calls can be either an irrelevant division within a single work, or a partition which separates independent works, depending on whether there're several different vendors/programs who call and implement them, or only one, and on whether the author of a new program who wanted to use that interface could reasonably do so.