EN ▾
Get API key

Last updated

ChatGPT vs an OpenAI API Key: What Each One Is

A ChatGPT account is a chat app. An API key is a credential your code sends to a server. If you searched for a chatgpt open ai api key, this article explains how the two relate and what to do when you want a different endpoint.

Summary

  • ChatGPT is an app you use in a browser; an API key is what a program uses to call a model over HTTP.
  • They are separate products with separate billing, so a chat plan does not hand you a key to use in code.
  • OpenAI-compatible APIs let you keep the same SDK and change only base_url, key and model name.
  • Our key works only with our endpoint at https://api.uncensoredaichatgpt.com/v1, and the model ID is uncensored.
A brass key above three identical sockets wired to different servers, showing one API format, many endpoints

Two things with similar names

Searching for a chatgpt open ai api key usually means one of two situations. Either you have a ChatGPT account and wonder whether it gives you a key, or you have code that expects an OpenAI key and you want to know where to get one. The answer starts with separating the product from the interface.

ChatGPT is a chat application. You sign in, type, and read answers. Whatever plan you use is a plan for that app.

An API key is a secret string that identifies you when a program sends a request to a server. It has no screen. You put it in an Authorization: Bearer header, and the server uses it to decide who is calling and whom to bill. OpenAI sells API access through a separate developer platform, billed per token, apart from ChatGPT plans. Check OpenAI's own pages for current terms, because they change.

The practical consequence is that paying for a chat plan does not by itself give your code a working key, and the other way around: an API key does not give you access to the chat app.

How an API key is used in code

Every OpenAI-style request has the same four ingredients: a base URL, a key, a model name and a list of messages. Here they are in curl, using our endpoint as the example.

curl https://api.uncensoredaichatgpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'

The official SDKs wrap exactly this. The key identifies you, the base URL says which server to talk to, and the model name picks what answers. Keep the key in an environment variable, never in source control or in browser code, because anyone who reads it can spend your credit.

Why changing base_url is enough

The request format that OpenAI popularized has become a common standard. Many services implement the same paths and fields, so a program written for one can talk to another. Local inference servers do this, and so do hosted providers.

That means switching provider is usually a three-line change.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["API_KEY"],
    base_url="https://api.uncensoredaichatgpt.com/v1",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarize what an API key is in one sentence."}],
)
print(resp.choices[0].message.content)

The same works in Node with the openai package: pass apiKey and baseURL to the constructor. Our API supports POST /v1/chat/completions, POST /v1/responses and GET /v1/models, plus streaming, tool calling and JSON mode. The documentation has the full list.

What stays different

Compatibility covers the request shape, not the contents behind it. Be clear about the following.

  • Keys do not travel. A key from one provider works only with that provider's endpoint. An OpenAI key will not authenticate against our server, and ours will not work with OpenAI.
  • Model names differ. Our model ID is uncensored. If your code says a name from another provider, change it, or you will get a model error.
  • The model is different. This service is not an OpenAI product and does not run ChatGPT. It is one open-weight text model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not a router across vendors either.
  • Features vary. This API is text only: no image, audio or video generation, no embeddings, no fine-tuning. If your project needs those, you will use another service for them.

When a third-party endpoint is the practical choice

Staying with the original provider is the simplest path when you need its specific models or its extra services. A different OpenAI-compatible endpoint makes sense in a few cases:

  • You want answers without content refusals for lawful adult work, such as fiction, roleplay or research on sensitive topics.
  • You prefer prepaid credit with no subscription. Here you pay $0.15 per 1M input tokens and $0.50 per 1M output tokens, and credit never expires.
  • You want to test your app against a second provider so one outage or policy change does not stop you.
  • You are building a tool and want an inexpensive endpoint during development.

A single chat message of 1,000 input and 300 output tokens costs $0.00015 + $0.00015 = $0.0003, so $20 of credit, the smallest top-up, covers about 66,000 of them. Top-ups run from $20 to $500 in any whole amount, with +5% from $50, +10% from $100 and +15% from $200; payment is in crypto only (USDT on TRC20 or USDC on Base). See the pricing page.

The same call in Node

Node works the same way. Install the package with npm install openai, set "type": "module" in package.json, and run this file with Node 18 or newer.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.API_KEY,
  baseURL: "https://api.uncensoredaichatgpt.com/v1",
});

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Name three uses of an API key." }],
});

console.log(resp.choices[0].message.content);
console.log(resp.usage);

The usage object tells you how many input and output tokens the call used, which is how you turn the price list into a real bill. At $0.15 per 1M input and $0.50 per 1M output tokens, a call with 200 tokens in and 150 out costs 200 x 0.15 / 1,000,000 + 150 x 0.50 / 1,000,000 = $0.00003 + $0.000075 = $0.000105.

Getting and managing a key here

Sign up on the API key page with Google, or with email and password. You can claim $0.50 of trial credit with one click, one per person, valid for 7 days with no card needed. The trial key allows 2 concurrent requests and 60 per minute; a full key allows 8 and 300.

Key management is self-service. You can regenerate your key at any time on the same page, and the old key stops working at once, so there is no need to contact anyone if one leaks. Accounts that have topped up can hold up to 5 keys, give each a label and revoke any of them. A sensible habit is one key per application or environment, so a revoked key only affects one thing.

Common mistakes when switching

  1. Leaving the old base URL. The key is rejected by the wrong server. Set base_url explicitly in code.
  2. Forgetting /v1. The base URL ends in /v1, and SDKs add the rest of the path.
  3. Keeping the old model name. Use uncensored.
  4. Putting the key in front-end code. Call the API from a server you control.
  5. Retrying instantly on HTTP 429. Wait a few seconds. A response with Retry-After: 5 means a temporary overload; the codes rate_limited and concurrency mean you went over a per-key limit.

For more on how this service works end to end, read the uncensored AI guide for developers.

Common questions

Does a ChatGPT subscription include an API key?

They are separate products with separate billing. Check OpenAI's current pages for the exact terms, because they can change.

Can I use an OpenAI key with your API?

No. A key works only with the provider that issued it. Get a key from our API key page and use it with https://api.uncensoredaichatgpt.com/v1.

Is this API made by OpenAI?

No. It is not an OpenAI product and does not serve ChatGPT. It speaks the same request format, so OpenAI SDKs work once you change the base URL, key and model name.

What if my key leaks?

Regenerate it on the API key page. The old key stops working at once. Accounts that have topped up can also hold several keys and revoke any of them.

Get your API key

Sign up, grab the key, and update your base URL. That is it.