In my mind an API would be the sort of thing declared in a header, say:
FILE *fopen(const char *path, const char *mode);
You have to more or less copy that word-for-word or your end application won't build. However, the code behind this that actually implements the fopen() behaviour ought to be the point of any copyright dispute. Did I write the code to do exactly the same logic (which may look like a copy if simple, but probably not if complex), or did I lift the glibc or MSDN examples and call it my own. In the former case I should be free to offer my version and not be legally slapped down for the copied name (i.e. "fair use") but if I just copied another's code then fair cop if I get fined for it.