EN ▾
Get API key

Unfiltered AI API Key: Create One, Make a First Call

Getting an unfiltered ai api key takes a few minutes: sign up, open the key page, claim the trial, copy the key and send one request. This walkthrough shows each step with copy-paste code.

Updated

A glowing key feeding light into a terminal cube and server, illustrating creating an API key and making a first call
A locked gate beside an open doorway with a cable leading to a server, showing a switch to a different model

Step 1: sign up and create the key

  1. Open the API key page and sign up. You can use Google, or an email and password.
  2. Create a key and copy it right away and save it somewhere safe, such as a password manager.
  3. Press the trial button to claim $0.50 of credit. It is one click, needs no card, lasts 7 days and is limited to one per person.

The key is a secret. Anyone who has it can spend your balance. Do not paste it into chat messages, screenshots or public repositories. If one leaks, delete it and create another. Use a separate key for each project where you can, so that revoking one does not break the others, and never commit a .env file. A quick way to check is to search your repository history for your key string before you make it public.

Step 2: store it safely

Put the key in an environment variable so it never appears in your source code.

# macOS or Linux, current shell session
export UNFILTERED_API_KEY="sk-your-key"

# or save it in a local .env file that is listed in .gitignore
echo 'UNFILTERED_API_KEY=sk-your-key' >> .env
echo '.env' >> .gitignore

Never call the API directly from a browser page or a mobile app, since anyone can read the key from the code. Put a small server between your users and the API and keep the key there. A Telegram bot is a typical example of such a server, and the Telegram bot guide is a good place to start if that is your plan.

Step 3: send the first request with curl

The API is OpenAI-compatible. The base URL is https://api.unfilteredgpt.cc/v1, the auth header is Authorization: Bearer YOUR_KEY, and the model ID is uncensored.

curl https://api.unfilteredgpt.cc/v1/chat/completions \
  -H "Authorization: Bearer $UNFILTERED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "You are a direct, plain-spoken assistant."},
      {"role": "user", "content": "Give me three names for a fantasy tavern."}
    ]
  }'

The reply is JSON, and the whole round trip should take a few seconds for a short prompt. The text is in choices[0].message.content, and usage shows how many tokens the call used. To confirm the key works before anything else, call GET /v1/models with the same header. A list containing uncensored means you are set.

Step 4: the same call in Python and Node

Any OpenAI SDK works. You only change the base URL and the key.

Both examples read the key from the environment, which is the pattern to keep in real projects. If the script fails with a missing variable error, the export in step 2 did not reach your current shell, so open a new terminal or run it again.

Python

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.unfilteredgpt.cc/v1",
    api_key=os.environ["UNFILTERED_API_KEY"],
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Give me three names for a fantasy tavern."}],
)
print(resp.choices[0].message.content)
print(resp.usage)

Node

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.unfilteredgpt.cc/v1",
  apiKey: process.env.UNFILTERED_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Give me three names for a fantasy tavern." }],
});
console.log(resp.choices[0].message.content);

If you use a library that has its own "OpenAI base URL" setting, such as a chat front end or a bot framework, enter the same three values: URL, key and model name.

Step 5: add streaming and a system prompt

Once the plain call works, switch on streaming so text appears as it is generated. Chat apps feel much faster this way, even though total time is the same.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.unfilteredgpt.cc/v1",
    api_key=os.environ["UNFILTERED_API_KEY"],
)

stream = client.chat.completions.create(
    model="uncensored",
    stream=True,
    messages=[
        {"role": "system", "content": "You are a sardonic innkeeper in a fantasy story."},
        {"role": "user", "content": "A stranger walks in at midnight. Greet him."},
    ],
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

The system message sets the voice for the rest of the conversation. Keep it short and specific, and resend it with every request, because the API does not remember earlier calls. Streaming ends with the usage numbers, which you can use for cost tracking. Remember the concurrency rule: an open stream occupies one of your slots, which is 2 on a trial key and 8 on a full key.

What a first call costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. The tavern-name prompt above is about 40 input tokens and perhaps 60 output tokens:

  • Input: 40 x 0.15 / 1,000,000 = $0.000006
  • Output: 60 x 0.50 / 1,000,000 = $0.00003
  • Total: about $0.000036

So the $0.50 trial covers well over ten thousand calls like that one. Real prompts are longer, but the first week of experiments will not come close to using up the credit. After the trial, top-ups run from $20 to $500 with bonus credit from $50, and failed or refused requests are not charged. The pricing page has the numbers in full.

Fixing the usual problems

SymptomLikely causeFix
401 UnauthorizedWrong key, extra space, or header not in Bearer formCopy the key again; check the header reads Authorization: Bearer YOUR_KEY
404 Not FoundBase URL missing /v1, or the path was doubledUse https://api.unfilteredgpt.cc/v1 and let the SDK add the route
Model not foundWrong model nameUse uncensored
429 with concurrencyToo many requests at once; trial keys allow 2Send fewer in parallel, or retry after a short wait
429 with rate_limitedOver the per-minute cap; trial keys allow 60Slow down; a full key allows 300 per minute

Temporary overload also returns a 429, with a Retry-After: 5 header, so wait five seconds and try again. A streamed request keeps its concurrency slot until the stream ends.

After the first call

You now have a working connection. From here, turn on streaming with stream: true, try tool calling and JSON mode, or read the docs for every parameter. The model has a 100,000-token context window, so long chat histories fit. One more point to remember: the service is text only, and it keeps one hard rule: no sexual content involving minors. Prompts are not used for training.

For ideas on what to build, see the Unfiltered GPT overview. Common projects are fiction tools, roleplay apps and private assistants for lawful adult use.

Questions and answers

Is the API key free?

Creating a key is free. New users can also claim $0.50 of trial credit, valid 7 days, without a card.

Can I have more than one key?

Create a separate key for each app or environment so you can delete one without breaking the others. Check the key page for what your account allows.

Where do I put the key in a request?

In the Authorization header as Bearer followed by the key. OpenAI SDKs do this for you when you pass api_key.

How do I check my balance?

Read the X-Balance-USD header on any response, or call GET /v1/balance.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.