Does Sharing Your OpenAI API Key Break the Terms? Where the Line Is

Blog / Service updates

Does Sharing Your OpenAI API Key Break the Terms? Where the Line Is

The short answer: handing your OpenAI API key itself to someone else is usually not how OpenAI expects it to be used, and it carries the most risk. There are two compliant approaches. Inside a team, each member joins the project under their own identity and creates their own key. When you offer a service to outside users, the key lives only on your own backend, and users call your endpoint, not your key. Below, we explain where those lines fall and how to put them into practice.

For the exact wording, rely on OpenAI's official terms of service and usage policies. The terms get updated, and this article only explains the reasoning; it does not replace the originals.

Why is sharing an API key a problem?

An OpenAI API key is a form of account credential. Platform terms commonly place two kinds of requirements on credentials: you are responsible for keeping them safe and not leaking them, and the account holder is responsible for the usage and behavior under the account. Giving a key to someone else hands both of those over.

The trouble you can actually run into:

  • You are accountable for whatever the other person does. If they trigger a usage-policy problem, your organization is the one affected.
  • Usage and charges land on you, and you cannot split them by person.
  • Once a key is forwarded, you lose track of how many places it lives. After a leak, the only option is to revoke it, and everyone who uses it goes down together.

If your goal is to sell the key or trade it for money, the problem is more direct: reselling or transferring account credentials is something platform terms typically restrict explicitly. Check the official terms for the precise wording.

Does using a key within a team count as sharing?

Separate "everyone using one key" from "each member using a key within their own permissions."

Colleagues in the same organization who join through an organization invite, get permissions assigned per project, and create keys of their own are using the platform as designed. Pasting one key into a group chat for everyone to use, on the other hand, is shared credentials, and it is hard to audit and hard to take back.

Two related articles on this site: How to use OpenAI Project API keys: per-project permissions and limits covers projects and limits, and How teams should manage API keys: one key per person, budget splits, and rotation covers day-to-day management.

I built a product. Can my users indirectly use my key?

Yes, as long as the architecture is right. The common compliant structure looks like this:

  1. Users visit your app or your own API.
  2. Your backend verifies the user's identity, applies rate limits, and runs content checks.
  3. The backend calls OpenAI with your own key and returns the result to the user.

The key only ever exists on the server, and users never get it. That is fundamentally different from giving the key to users. Note that when you serve end users, OpenAI may impose additional requirements on you; see the official usage policies, and for a walkthrough, OpenAI usage policies explained in plain language: which uses can get an account restricted.

Things to avoid:

  • Putting the key in front-end code, a mini-program bundle, or a mobile app package.
  • Building a "relay" where users enter a key you give them, or selling them quota under your account.
  • Exposing a proxy endpoint that forwards arbitrary requests with no authentication.

Self-check list for compliant practice

Run through this before you start:

CheckCompliant direction
Is the key only in server environment variables or a secrets manager?Yes
Does each colleague have their own account and their own key?Yes
Are permissions and usage caps set per project?Yes
Does outside-facing service go through your own backend with authentication and rate limiting?Yes
Has anyone seen the full key in chat history, a repo, or a screenshot?No; if yes, revoke it
Are you charging third parties and offering "your account's quota"?Don't do this

If a key has already gone out, revoke it immediately and generate a new one, then check the usage logs. The steps are in Your OpenAI API key leaked: revoke it, check usage, and prevent a repeat.

Does the same apply to sharing an account?

Accounts and keys are different things, but the same logic applies. Several people sharing one ChatGPT account, or buying an account of unknown origin, leaves similar problems in terms, privacy, and security. See The risks of sharing a ChatGPT account: terms, privacy, and ban fallout and Why bought ChatGPT accounts go wrong: terms and security risks.

If you have already received an official restriction notice, contact support and appeal through the official process rather than trying again with another account.

Is there another way to let several people and several tools use one subscription?

The urge to share a key often comes from wanting the team to have access without an overseas payment method. In that case, you can look at AGI Plan. Its keys are also personal credentials, so each team member should register and create their own. AGI Plan is a commercial partner of cdnping, and the points below only state facts it has published:

  • Monthly subscription; one quota can be switched among multiple capability groups; billed in RMB, so no overseas credit card is needed.
  • Tools such as Claude Code and Codex connect by changing a single endpoint address.
  • Some models are available only outside China; see the models page for specifics.
  • The site states plainly that it is not an officially authorized channel, so it cannot replace your direct relationship with OpenAI. It is simply another way to get model access. For available models and regions, rely on the official pages.

To see the setup steps, start with the AGI Plan beginner guide. Even if you use it, treat the key you receive as a personal credential and don't forward it to anyone.

What to do next

  1. Open the OpenAI console, list the existing keys, and revoke any that nobody claims.
  2. Replace shared keys with per-project, per-person keys and set usage caps.
  3. If you serve outside users, confirm the key lives only on the backend, and add authentication and rate limiting there.
  4. When you see unusual calls, check /en/status/openai first to see whether it is an official outage, then investigate your own key.
  5. For anything about the terms you are unsure of, go by the official documentation and what support tells you.

Related articles

Keep reading