If the supreme court decides for Oracle, congress can absolutely pass a new law that reduces the scope of copyright to exclude APIs. The constitution limits what congress can say is copywritable, but doesn't require that they say anything is.
There's even a good chance that they will in my opinion, given the amount of lobbying dollars on the side of sanity in this case.
Still, I would rather not rely on congress doing anything sensible in a timely manner these days, especially when existing copyright law already sides with Google (IMO). It would also not be retroactive, so everyone under the sun can sue everyone under the sun over previous violations.