The API has a very clear ToS prohibiting third-party client usage with the heavily subsidized Claude.ai subscription plans. Anthropic's right to reject or block that traffic, as well as to ban users who attempt this, is well-protected by the ToS those users neglected to read.
Regarding the legal demands here, anyone can issue anyone else a cease and desist order at any time, for anything, in the USA. The demands do not need to have merit.
"Illegal" generally refers to criminal law, not civil suits, this was essentially Anthropic threatening to file a lawsuit. Opencode was under no legal obligation to comply and was not breaking any laws, they simply decided it was easier and cheaper to comply than to fight.
> The API has a very clear ToS prohibiting ...
What is the relevance?
If I understand correctly, OpenCode, i.e. the creator of the tool, does not use Anthropic's API. Their users do.
I am unsure where the connection can be made between the users violating some terms of service and a maker of a tool.
but plan is linked to api key which the user provides…
I thought TOS grants Anthropic the right to stop providing the service to a user, not go after them legally.