The district court found APIs to not be copyrightable. The Federal Circuit disagreed, and ordered the district court to hold a trial under the assumption that APIs are copyrightable—that's when Google's fair use defense became necessary.
That Federal Circuit decision has not been reviewed by the Supreme Court, does not establish binding precedent outside the context of this case, and is widely seen by outsiders as being in error for not matching what the Ninth Circuit would have ruled.
It is incorrect to make any categorical statement that APIs are copyrightable. That question is still pending. All that's been settled is that this one case is being conducted under the assumption that APIs are copyrightable, until such time as the Supreme Court decides to review this issue.