Baker case subject-matter was "... certain forms or banks, consisting of ruled lines, and headings, illustrating the system and showing how it is to be used and carried out in practice".
So that case was about illustrating and explaining a method of doing accounting. There was no textual matter copied.
In Oracle vs. Google I believe the source-code of the APIs was copied.
Even if one would consider a way to do accounting an "API" an explanation and illustration of an API is not the same as the "API".
Explaining or illustrating a "structure" is not the same as copying that structure. Note that copyright applies to actual "works of art", not to abstract "methods". An API (as referred to in this case) is not an explanation of a way of doing things but an actual constructed artifact, source-code.
Think about books. Their content is copyrighted. You can not copy their content. But nothing prevents you from explaining and "illustrating" the content of a book, as long as you don't copy significant portions of the structure and ordering of its verbatim words.