← Back to context

Comment by MillionOClock

11 hours ago

I really hope someone from any of those companies (if possible all of them) would publish a very clear statement regarding the following question: If I build a commercial app that allows my users to connect using their OAuth token coming from their ChatGPT/Claude etc. account, do they allow me (and their users) to do this or not?

I totally understand that I should not reuse my own account to provide services to others, as direct API usage is the obvious choice here, but this is a different case.

I am currently developing something that would be the perfect fit for this OAuth based flow and I find it quite frustrating that in most cases I cannot find a clear answer to this question. I don't even know who I would be supposed to contact to get an answer or discuss this as an independent dev.

EDIT: Some answers to my comment have pointed out that the ToS of Anthropic were clear, I'm not saying they aren't if taken in a vacuum, yet in practice even after this being published some confusion remained online, in particular regarding wether OAuth token usage was still ok with the Agent SDK for personal usage. If it happens to be, that would lead to other questions I personally cannot find a clear answer to, hence my original statement. Also, I am very interested about the stance of other companies on this subject.

Maybe I am being overly cautious here but I want to be clear that this is just my personal opinion and me trying to understand what exactly is allowed or not. This is not some business or legal advice.

I don't see how they can get more clear about this, considering they have repeatedly answered it the exact same way.

Subscriptions are for first-party products (claude.com, mobile and desktop apps, Claude Code, editor extensions, Cowork).

Everything else must use API billing.

  • The biggest reason why this is confusing is the Claude Agent SDK[0] will use subscription/oauth credentials if present. The terms update implies that there's some use cases where that's ok and other use cases (commercial?) where using their SDK on a user's device violates terms.

    [0] https://platform.claude.com/docs/en/agent-sdk/overview

    • The SDK is Claude Code in a harnesss, so it works with your credentials the same way CC does.

      But they're stating you can only use your subscription for your personal usage, not someone else's for their usage in your product.

      I honestly think they're being short sighted not just giving a "3rd party quota" since they already show users like 4 quotas.

      If the fear is 3rd party agents screwing up the math, just make it low enough for entry level usage. I suspect 3rd party token usage is bi-modal where some users just need enough to kick tires, but others are min-maxing for how mamy tokens they can burn as if that's its own reward

      3 replies →

  • And at that point, you might as well use OpenRouter's PKCE and give users the option to use other models..

    These kinds of business decisions show how these $200.00 subscriptions for their slot/infinite jest machines basically light that $200.00 on fire, and in general how unsustainable these business models are.

    Can't wait for it all to fail, they'll eventually try to get as many people to pay per token as possible, while somehow getting people to use their verbose antigentic tools that are able to inflate revenue through inefficient context/ouput shenanigans.

    • I think the subscription pricing exists because it’s a far more palatable way to bill people for day to day personal use.

      I used Claude back when API per token pricing was the only option and it was bad for all the usual reasons pay-per-use sucks compared to flat billing: you’re constantly thinking about cost. Like trying to watch a Netflix video with a ticker in the corner counting up the cents you owe them.

      I don’t understand your claim that they want people paying per token - the subscription is the opposite of that, and it also has upsides for them as a business since most people don’t saturate the usage limits, and the business gets to stuff a bunch of value-adds on a bundle offering which is generally a more lucrative and enticing consumer pricing model.

      10 replies →

    • It’s been obvious from the start that the $200 point is the free tier

  • You are talking about Anthropic and indeed compared to OpenAI or GitHub Copilot they have seemed to be the ones with what I would personally describe as a more restrictive approach.

    On the other hand OpenAI and GitHub Copilot have, as far as I know, explicitly allowed their users to connect to at least some third party tools and use their quotas from there, notably to OpenCode.

    What is unclear to me is whether they are considering also allowing commercial apps to do that. For instance if I publish a subscription based app and my users pay for the app itself rather than for LLM inference, would that be allowed?

    • Same question here. A while ago I read rumors OpenAI might build a "Login with OpenAI" (comparable to login with Apple, Facebook, Google) so people can also use their existing sub in commercial apps. Hope it's true.

  • Then why does the SDK support subscription usage? Can I at least use my subscription for my own use of the SDK?

  • What if you wrap the service using their Agent SDK?

    • That should be fine, because it's still using their tooling. And this seems like the better way to go. I have a couple of tools that work like this. I think the issue is mostly 3rd party harnesses that seek to do the same as Claude Code. And it seems reasonable that Anthropic decides how you can use the subscription, because it's heavily subsidized. Get a Claude $200 sub and max out the usage limits, then compare that usage to the cost of using their API. The difference is significant, which is why people are getting multiple $200 subs rather than paying for API usage (and I have seen reports where they are cracking down on this as well.)

      3 replies →

  • Quick question but what if I use claude code itself for the purpose?

    https://news.ycombinator.com/item?id=46912682)

    This can make Opencode work with Claude code and the added benefit of this is that Opencode has a Typescript SDK to automate and the back of this is still running claude code so technically should work even with the new TOS?

    So in the case of the OP. Maybe Opencode TS SDK <-> claude code (using this tool or any other like this) <-> It uses the oauth sign in option of Claude code users?

    Also, zed can use the ACP protocol itself as well to make claude code work iirc. So is using zed with CC still allowed?

    > I don't see how they can get more clear about this, considering they have repeatedly answered it the exact same way.

    This is confusing quite frankly, there's also the claude agent sdk thing which firloop and others talked about too. Some say its allowed or not. Its all confusing quite frankly.

That’s very clearly a no, I don’t understand why so many people think this is unclear.

You can’t use Claude OAuth tokens for anything. Any solution that exists worked because it pretended/spoofed to be Claude Code. Same for Gemini (Gemini CLI, Antigravity)

Codex is the only one that got official blessing to be used in OpenClaw and OpenCode, and even that was against the ToS before they changed their stance on it.

  • Is Codex ok with any other third party applications, or just those?

  • But why does it matter which program consumes the tokens?

    • They'll own entire pipeline interface, conduit, backend. Interface is what people get habitual to. If I am a regular user of Claude Code, I may not shift to competitor for 10-20% gains in cost.

    • Presumably because their flat rate pricing is based off their ability to manage token use via their first-party tools.

      A third-party tool may be less efficient in saving costs (I have heard many of them don't hit Anthropic LLMs' caches as well).

      Would you be willing to pay more for your plan, to subsidize the use of third-party tools by others?

      ---

      Note, afaik, Anthropic hasn't come out and said this is the reason, but it fits.

      Or, it could also just be that the LLM companies view their agent tools as the real moat, since the models themselves aren't.

      5 replies →

It is pretty obviously no. API keys billed by the token, yes, Oauth to the flat rate plans no.

> OAuth authentication (used with Free, Pro, and Max plans) is intended exclusively for Claude Code and Claude.ai. Using OAuth tokens obtained through Claude Free, Pro, or Max accounts in any other product, tool, or service — including the Agent SDK — is not permitted and constitutes a violation of the Consumer Terms of Service.

I think you're just trying to see ambiguity where it doesn't exist because the looser interpretation is beneficial to you. It totally makes sense why you'd want that outcome and I'm not faulting you for it. It's just that, from a POV of someone without stake in the game, the answer seems quite clear.

> OAuth authentication (used with Free, Pro, and Max plans) is intended exclusively for Claude Code and Claude.ai.

I think this is pretty clear - No.

  • So it’s forbidden to use the Claude Mac app. I would say the ToS as it is, can’t be enforced

Does https://happy.engineering/ need to use the API keys or can use oauth? It's basically a frontend for claude-cli.

  • It doesn't even touch auth right?

    """ Usage policy

    Acceptable use Claude Code usage is subject to the Anthropic Usage Policy. Advertised usage limits for Pro and Max plans assume ordinary, individual usage of Claude Code and the Agent SDK """

    That tool clearly falls under ordinary individual use of Claude code. https://yepanywhere.com/ is another such tool. Perfectly ordinary individual usage.

    https://yepanywhere.com/sdk-auth-clarification.html

    The TOS are confusing because just below that section it talks about authentication/credential use. If an app starts reading api keys / credentials, that starts falling into territory where they want a hard line no.

  • If it's a wrapper that invokes the `claude` binary then I believe it's fine.

    • Is there a way to legally or even practically prevent this? `claude` CLI execution in a shell is certainly included in the subscription - it’s the product.

      1 reply →

Usually, it is already stated in their documentation (auth section). If a statement is vague, treat it as a no. It is not worth the risk when they can ban you at any time. For example, ChatGPT allows it, but Claude and Gemini do not.

https://developers.openai.com/codex/auth

  • Maybe I am missing something from the docs of your link, but I unfortunately don't think it actually states anything regarding allowing users to connect and use their Codex quota in third party apps.

    • From TFA: “OAuth authentication (used with Free, Pro, and Max plans) is intended exclusively for Claude Code and Claude.ai. Using OAuth tokens obtained through Claude Free, Pro, or Max accounts in any other product, tool, or service — including the Agent SDK — is not permitted and constitutes a violation of the Consumer Terms of Service.”

      2 replies →

One set of applications to build with subscription is to use the claude-go binary directly. Humanlayer/Codelayer projects on GitHub do this. Granted those are not ideal for building a subscription based business to use oathu tokens from Claude and OpenaAI. But you can build a business by building a development env and gating other features behind paywall or just offering enterprise service for certain features like vertical AI(redpanada) offerings knowledge workers, voice based interaction(there was a YC startup here the other day doing this I think), structured outputs and workflows. There is lots to build on.