EN ▾
Start now

Uncensored AI API in Portuguese: Setup and Prompts

You can get Portuguese answers from an OpenAI-compatible uncensored API with a system prompt and a few habits. This guide gives the code, a language check and the costs.

Last updated

Glass chat bubble with a ribbon of green, yellow and blue light flowing into a terminal

Summary

  • Put the language rule in the system prompt and repeat it in the user message when replies drift.
  • Measure Portuguese quality on your own prompts, since results depend on the model and the task.
  • A script with a simple word-list check catches replies that switch to English.
  • A typical 2,000-token-in, 600-token-out chat turn costs $0.0006.

Get Portuguese replies in three steps

To use an uncensored ai api in portuguese, you do three things: get a key, set the language in the system prompt, and verify the output on real examples. The API is OpenAI-compatible, so anything you already wrote for the OpenAI SDK works after you change the base URL, the key and the model name to uncensored.

  1. Sign up with Google or email, then open the API key page. Claim the $0.50 trial with one click if you want to test first.
  2. Create the client with the base URL https://api.geminisemcensura.com/v1 and your key.
  3. Send a system message that fixes the language and variety, then your user message.

We recommend writing the system prompt itself in Portuguese. It is a clear signal, and it keeps the persona and tone consistent with the language you want back.

A working example in Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.geminisemcensura.com/v1",
    api_key="SUA_CHAVE_API",
)

SISTEMA = (
    "Você é um coautor de ficção para leitores adultos. "
    "Responda sempre em português do Brasil, com vocabulário natural e sem traduções literais. "
    "Todos os personagens são adultos. Não escreva em inglês, a menos que o usuário peça."
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": SISTEMA},
        {"role": "user", "content": "Escreva a abertura de um conto noir passado no Rio de Janeiro dos anos 70."},
    ],
    temperature=0.8,
)
print(resp.choices[0].message.content)

If you prefer the shell, the same request works with curl:

curl https://api.geminisemcensura.com/v1/chat/completions \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "Responda sempre em português do Brasil."},
      {"role": "user", "content": "Explique em três frases o que é uma API compatível com OpenAI."}
    ]
  }'

Writing a system prompt that keeps the language

Replies that start in Portuguese and slip into English halfway are the most common complaint. These habits reduce it:

  • Name the variety. "Português do Brasil" and "português de Portugal" differ in vocabulary and spelling. Say which one you want.
  • Say what not to do. A line such as "não misture inglês na resposta" helps more than a long style essay.
  • Give one short example. Add a sample exchange in Portuguese to the history. Models copy the form of examples closely.
  • Repeat the rule late. In long chats, append "Responda em português" to the final user message. Instructions near the end of the context weigh more than the ones far back.
  • Lower the temperature for factual replies. Values around 0.3 to 0.5 give steadier wording. Fiction can go higher.

Do not assume quality. Open-weight models differ in how well they handle Portuguese, slang and regional idioms, and the answer depends on your task. Run twenty of your real prompts and read the replies before you commit.

Check the language automatically

If you serve Portuguese users, add a cheap guard. This function counts common Portuguese and English function words and flags replies that lean English. It is a heuristic, not a language detector, but it catches the obvious failures:

PT = {"de", "que", "não", "para", "uma", "com", "os", "as", "você", "está", "em", "do", "da"}
EN = {"the", "and", "you", "that", "with", "this", "for", "are", "was", "of"}

def lean(text):
    words = [w.strip(".,?;:()").lower() for w in text.split()]
    pt = sum(w in PT for w in words)
    en = sum(w in EN for w in words)
    return "pt" if pt >= en else "en"

def ask_pt(client, messages, tries=3):
    for _ in range(tries):
        r = client.chat.completions.create(model="uncensored", messages=messages)
        text = r.choices[0].message.content or ""
        if lean(text) == "pt":
            return text
        messages = messages + [{"role": "user", "content": "Responda em português do Brasil."}]
    return text

Pass the client from the example above, with the base URL https://api.geminisemcensura.com/v1. Because failed or refused requests are not charged, retries on errors cost nothing, but a retry after a successful English reply is billed like any other call, so keep the loop short.

Streaming and JSON in Portuguese

Streaming works the same way as with OpenAI: set stream: true and read the chunks over SSE. Usage arrives at the end of the stream. Remember that a streamed request holds one of your concurrency slots until it finishes, and a trial key has 2.

import OpenAI from "openai";

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

const stream = await client.chat.completions.create({
  model: "uncensored",
  stream: true,
  messages: [
    { role: "system", content: "Responda sempre em português do Brasil." },
    { role: "user", content: "Conte uma história curta de mistério em um parágrafo." },
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

For structured output, use JSON mode with response_format: {"type": "json_object"} and say in the prompt that you want JSON. Field names can stay in English while the values are in Portuguese. State that in the system prompt, for example: "chaves em inglês, valores em português". The docs describe tool calling too, if your app needs it.

Pitfalls specific to Portuguese text

Portuguese brings a few technical and stylistic traps that English projects never meet.

Accents and encoding

Accented characters must travel as UTF-8 end to end. In Python, when you dump JSON for logs or for a database, pass ensure_ascii=False to keep the accents readable, and make sure the file or column is UTF-8. With curl, save the request body in a file and send it with --data @body.json, since pasting accents into some shells garbles them.

Você, tu and formality

Brazilian Portuguese uses "você" in most writing, while some regions prefer "tu", and Portugal has its own forms of address. State the form in the system prompt, and add a formal or informal register if your product has a tone. Without it, a long chat can drift between forms.

Gender and agreement

Portuguese marks gender on adjectives and past participles. If a character is a woman, the narration must agree. Put each character's name and gender in the system prompt, in a short list, so the model does not guess from context that may be ambiguous.

Mixed-language history

If part of your stored chat history is in English, the model sees a mixed signal and often follows the last language it saw. Translate or trim old turns before you resend them, or add the language reminder to every request. Shorter histories also cost less, since you pay input tokens for every message you resend.

Names, slang and idioms

Literal translations of English idioms read badly. Ask the model to write naturally for a Brazilian reader rather than translate, and give two or three examples of the phrasing you like. Always have a native speaker review a sample before you publish text at scale.

What it costs to test and to run

Portuguese text usually takes somewhat more tokens than the same content in English, though the exact ratio depends on the text. Read the usage field of your own responses instead of estimating. At $0.15 per 1M input tokens and $0.50 per 1M output tokens, a turn with 2,000 tokens in and 600 out costs $0.0003 + $0.0003 = $0.0006. Ten thousand such turns cost $6.

The $0.50 trial therefore covers about 833 turns of that size, valid for 7 days. After that, top up any whole amount from $20 to $500 with USDT on TRC20 or USDC on Base. There is no subscription and credit never expires. Details and bonuses are on the pricing page. For background on what these models are and are not, read the guide to AI without censorship.

One rule applies in every language: the model is tuned for lawful adult use, and sexual content involving minors is never allowed.

Build a small Portuguese evaluation set

Before you ship, write twenty prompts that reflect what your users will really ask. Mix kinds: a short story opening, a dialogue, a formal email, a how-to answer and a reply in the voice of a character. Run each through the API with your final system prompt and keep the reply next to its token counts.

Then read the replies as a native speaker would. Look at five things: is the language consistent from start to finish, is the register right, do gender and number agree, does the phrasing sound natural rather than translated, and is the length close to what you asked for. Score each from 1 to 5. Anything under 3 on agreement or naturalness points to a change in the system prompt, an extra example in the history, or a different temperature. Store the prompt set in your repository and rerun it every time you edit the system prompt, so you notice regressions before your users do.

Frequently Asked Questions

  • What is ia sem censura? It is an uncensored AI model that does not refuse lawful adult, fictional, or controversial topics. It provides raw text output without standard safety filters, allowing developers to control content directly.
  • How does pricing work? You pay per token. Input tokens are $0.15 per 1M, and output tokens are $0.50 per 1M. There are no monthly fees. Credit is topped up via crypto and never expires.
  • Can I use the OpenAI SDK? Yes. The API is fully OpenAI-compatible. Change the base_url to https://api.geminisemcensura.com/v1 and use the model ID uncensored. The same SDKs and code work without modification.
  • What are the limits? The context window is 100,000 tokens. Max output is up to the full 100,000-token window. You are limited to 300 requests per minute and 8 concurrent requests per key. Request body size is 8 MB.

FAQ

Does the API support Portuguese?

The API is a pass-through to one open-weight model, and quality in Portuguese depends on that model and your prompts. Test it with the free trial on your own examples before you rely on it.

How do I get Brazilian rather than European Portuguese?

Say it in the system prompt: write in Brazilian Portuguese, or in the variety of Portugal. Adding one short example reply in that variety helps.

Why does the model answer in English?

Usually the instruction is too weak or too far back in a long chat. Write the system prompt in Portuguese and repeat the language rule in the last user message.

Can I use the OpenAI SDK for this?

Yes. Change the base URL to https://api.geminisemcensura.com/v1, use your key, and set the model to uncensored.

Get your API key in minutes

Register, retrieve your key, and update the base URL. That is all.

Start with trial credit

Enter email and password to get your key instantly.