Updated
C AI No Filter Alternative: Build Your Own Chat
An AI girlfriend API provides a dedicated interface for chat applications that simulate romantic or companion-like interactions using large language models. This guide compares technical approaches, focusing on uncensored models that handle roleplay context without standard content refusals.

The short answer
App-style character chat gives you a ready interface, ready-made characters and a community. It also gives you the app's rules, and you cannot change them. An API flips that. You get raw text completions from one open-weight model that was tuned to answer without content refusals for lawful adult use, and everything else is your code.
This is not the official product of any model vendor. It is a hosted, independent deployment of one open-weight model with an OpenAI-style interface. The one hard limit is no sexual content involving minors, and that is not configurable.
If you only want to chat and never touch code, an app is easier. If you want your own characters, your own memory rules, a Discord bot or a web page of your own, read on.
What you give up and what you get
| Question | Chat app | Your own bot on an API |
|---|---|---|
| Character creation | Built-in editor and public library | A system prompt you write and store yourself |
| Content rules | Set by the app | A model tuned to answer without refusals for lawful adult use |
| Memory | Managed for you | You decide what to keep, trim or summarize |
| Interface | Included | Terminal, web page, Discord, anything |
| Cost model | Free tier or subscription | Prepaid credit, pay per token |
The honest downside is effort. You will write a small loop, pick a front end and watch your own balance. The upside is that nothing in the middle rewrites your prompt or cuts off a reply.
Write the persona as a system prompt
A character is a block of text sent as the first message with role: "system". Short, concrete personas work better than long biographies. Cover four things: who the character is, how they talk, what they know, and how they should behave when the user steers the scene somewhere new.
PERSONA = (
"You are Mara, a dry-witted ship navigator in a space-opera story. "
"Speak in short, clipped sentences. Stay in character at all times. "
"Describe actions in italics between asterisks. "
"Never speak for the user. If the user changes the scene, follow it."
)
Two habits help a lot. First, tell the model what not to do ("never speak for the user"), because open-weight models often write both sides of a dialogue. Second, keep the persona stable across the session and put changing facts, such as the current location, in later messages.
A minimal character chat loop
The endpoint is https://api.nofilterai.top/v1 and the model ID is uncensored. Any OpenAI SDK works. This loop keeps the history, streams tokens as they arrive and trims old turns so the prompt stays small.
from openai import OpenAI
client = OpenAI(
base_url="https://api.nofilterai.top/v1",
api_key="YOUR_KEY",
)
PERSONA = "You are Mara, a dry-witted ship navigator. Stay in character."
history = []
MAX_TURNS = 40 # keep the last 40 messages
while True:
user = input("you> ")
history.append({"role": "user", "content": user})
messages = [{"role": "system", "content": PERSONA}] + history[-MAX_TURNS:]
stream = client.chat.completions.create(
model="uncensored",
messages=messages,
stream=True,
temperature=0.9,
)
reply = ""
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
piece = chunk.choices[0].delta.content
reply += piece
print(piece, end="", flush=True)
print()
history.append({"role": "assistant", "content": reply})
Note that the system message is added on every call and never trimmed. Only the history slice is cut. If you want the character to remember events from far back, ask the model every 20 turns for a three-sentence summary and keep that summary as an extra system message.
What a session costs
Price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Because the whole history is resent each turn, input dominates. Take a mid-length session with a 3,000-token prompt and a 300-token reply:
- Input: 3,000 / 1,000,000 x $0.15 = $0.00045
- Output: 300 / 1,000,000 x $0.50 = $0.00015
- One turn: $0.0006, so 1,000 turns cost $0.60
Even a full 100,000-token context sent as input costs 100,000 / 1,000,000 x $0.15 = $0.015 per call. Failed or refused requests are not charged, and credit never expires. The minimum top-up is $20, and you can see the exact rates on the pricing page. This site takes crypto only, USDT on TRC20 or USDC on Base.
New accounts can claim $0.50 of trial credit with one click on the API key page. That is enough for roughly 800 turns of the example above, valid for 7 days, and it needs no payment details.
Keep long stories coherent with summaries
Trimming by count is the cheapest memory, but it forgets. A better pattern for long stories is a rolling summary. Every 20 turns, send the oldest part of the history to the model with a short instruction, store the result, and drop the turns it covers.
def summarize(old_messages):
text = "\n".join(m["role"] + ": " + m["content"] for m in old_messages)
r = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "Summarize this story so far in 3 sentences. Keep names, places and open plot threads."},
{"role": "user", "content": text},
],
max_tokens=200,
temperature=0.3,
)
return r.choices[0].message.content
# when len(history) > 40:
# summary = summarize(history[:20]); history = history[20:]
# then add {"role": "system", "content": "Story so far: " + summary} after PERSONA
This costs one extra small call per 20 turns and keeps the prompt flat. You can also store the summary in a file or database so a character remembers a user across days. Everything is plain text, so there is no special memory feature to configure.
Pitfalls you will hit
- The character speaks for you. Add a line to the persona and a
stopsequence such as["\nyou:"]if you use a plain transcript format. - Replies get repetitive. Raise
temperaturea little and usefrequency_penaltyorpresence_penalty. These are passed through to the model. - HTTP 429. A full key allows 8 concurrent requests and 300 per minute. A streamed reply holds its slot until the stream ends, so a bot serving many users should queue messages. The error code tells you which limit you hit:
rate_limitedorconcurrency. - Context growth. The window is 100,000 tokens for prompt plus reply. Trimming by message count is simple, but long messages can still add up, so trim by estimated size if your users write essays.
More examples of this pattern for companion bots are in the AI companion API guide, and the documentation lists every parameter.
When an app is still the better choice
Pick an app if you want a huge library of public characters, voice, images, or a mobile client with no setup. This API is text only: no image or audio generation, no embeddings and no fine-tuning. Pick the API when you want your own product, a Discord or Telegram bot, or full control of the prompt and the history.
If you already run a Discord server, the same loop above fits inside a bot. See the walkthrough on building a no filter AI Discord bot.
More guides
Questions and answers
Is this the same model that Character.AI uses?
No. It is a separate open-weight model run by an independent provider. It is not affiliated with any chat app or model vendor.
Do I need to know how to code?
A little. The loop above is about 25 lines of Python. If you use SillyTavern or a similar front end, you can add an OpenAI-compatible endpoint with the base URL and key instead.
Are my chats used for training?
No. Prompts are not used for training.
Is there any content the API refuses to write?
The model is tuned to answer without content refusals for lawful adult use. Sexual content involving minors is a hard limit and is not allowed.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key