The Claude Code endpoint is a private API. They’re free to control usage of their private API.
The Claude subscription used for Claude Code is to all appearances being sold substantially below the cost to run it, and it certainly seems that this is being done to maintain Claude Code's market dominance and force out competitors who cannot afford to subsidize LLM inference in the same way such as OpenCode.
It's not a matter of there being a public API, I don't believe they are obligated to offer one at all, it's a matter of the Claude Subscription being priced fairly so that OpenCode (on top of, say, gemini) can be competitive.
Yet they have to acquire market dominance in a meaningful market first if you want to prosecute, otherwise it's just a failed business strategy. Like that company selling movie tickets bellow cost.
I’m surprised they didn’t go with the option of offering opus 4.6 to Claude code only.
The Claude Code plans may not be operating at a loss either. Most people don’t use up 100% of their plan. Few people do. A lot of it goes idle.
Training models cost tens of millions, their revenues from sub + api are well above hundreds of millions.
If you look at minimax IPO data, you can see that they spent 3x their revenue on "cloud bills".
So yes, it's probable that they do subsidize inference through subscriptions in order to capture market.
No inferrence provider is profitable, and most run on VC money to serve customers.