Uncensored AI for Developers: API Setup in Five Steps
Using uncensored ai for developers comes down to a key, a base URL and one model ID. This guide goes from sign-up to a streaming call in five steps, with copy-paste code for curl, Python and Node.
Last updated

Summary
- Use the single dedicated uncensored model via the standard /v1/chat/completions endpoint for consistent behavior.
- Set temperature and top_p higher to encourage creative, less filtered creative writing and roleplay responses.
- Prepaid crypto credits never expire, and errors are free, making cost prediction straightforward for high-volume apps.
- Streaming via SSE allows real-time token delivery, which is critical for maintaining user engagement in chat interfaces.
Step 1: Get a key
Open the API key page and sign up with Google, or with email and password. After sign-up, one click claims the $0.50 trial credit. It needs no card, is valid for 7 days and is limited to one per person. Copy the key and keep it out of your repository.
If the key leaks, regenerate it on the same page. The old key stops working immediately and there is no need to contact support. Accounts that have topped up can hold up to 5 keys, give them labels and revoke any of them, which is useful for keeping staging and production apart.
A trial key allows 2 concurrent requests and 60 requests per minute. A full key allows 8 concurrent and 300 per minute.
Step 2: Check the connection with curl
The base URL is https://api.iasemsensura.com/v1 and authentication is a bearer token. Start with the models list, which is cheap and confirms that the key works:
curl https://api.iasemsensura.com/v1/models \
-H "Authorization: Bearer YOUR_KEY"
# the model list should contain: uncensored
Then send a chat completion with the model uncensored:
curl https://api.iasemsensura.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Explain recursion in two sentences."}]
}'
The API also serves POST /v1/responses. Add -i to curl to see response headers such as X-Request-Id, X-Balance-USD and the rate limit headers.
Step 3: Use the OpenAI SDK
Any OpenAI SDK works. In Python:
from openai import OpenAI
client = OpenAI(
base_url="https://api.iasemsensura.com/v1",
api_key="YOUR_KEY",
)
reply = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You answer directly and keep replies short."},
{"role": "user", "content": "Write a regex that matches ISO 8601 dates."},
],
temperature=0.3,
)
print(reply.choices[0].message.content)
In Node, install the package with npm install openai and use the same three pieces of configuration:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.iasemsensura.com/v1",
apiKey: process.env.API_KEY,
});
const reply = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Write a haiku about stack traces." }],
});
console.log(reply.choices[0].message.content);
If you already use an OpenAI-compatible client in another tool, only the base URL and key need to change. The model name goes in the model field, exactly as written.
The API also serves the newer Responses route. The SDK call looks like this:
from openai import OpenAI
client = OpenAI(
base_url="https://api.iasemsensura.com/v1",
api_key="YOUR_KEY",
)
r = client.responses.create(
model="uncensored",
input="Name three uses of a bloom filter.",
)
print(r.output_text)
Use whichever route your existing code already calls. Chat completions are the most widely supported by third-party tools, so start there if you are unsure.
Step 4: Stream the response
Long replies feel faster when they stream. Set stream: true and read the chunks. The server sends them over SSE and ends with usage data.
from openai import OpenAI
client = OpenAI(
base_url="https://api.iasemsensura.com/v1",
api_key="YOUR_KEY",
)
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a 200-word cyberpunk opening scene."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
One detail matters for concurrency: a streamed request holds its slot until the stream ends. If a client disconnects badly or a loop never finishes reading, that slot stays busy, and with only 2 or 8 slots a few stuck streams can block new requests.
Step 5: Handle limits and errors
Over a limit, the API answers HTTP 429. Two error codes tell you which limit you hit:
rate_limited: too many requests per minute. Wait and retry.concurrency: too many requests at once. Queue your calls so that no more than 8 (2 on a trial key) run at the same time.
On temporary overload you also get a 429, with a Retry-After: 5 header. Wait that many seconds. The OpenAI SDKs retry a couple of times on their own, and you can raise that number with the max_retries client option. For a batch job, cap parallelism with a semaphore:
import asyncio
from openai import AsyncOpenAI
client = AsyncOpenAI(
base_url="https://api.iasemsensura.com/v1",
api_key="YOUR_KEY",
max_retries=4,
)
gate = asyncio.Semaphore(6)
async def ask(prompt):
async with gate:
r = await client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": prompt}],
)
return r.choices[0].message.content
async def main():
prompts = ["Define idempotency.", "Define backpressure.", "Define a mutex."]
for answer in await asyncio.gather(*(ask(p) for p in prompts)):
print(answer)
asyncio.run(main())
Failed or refused requests are not charged, and the maximum request body is 8 MB.
What the model can do and cannot do
The model is an open-weight model run by an independent provider, tuned to answer without content refusals for lawful adult use. It is not the official API of any large vendor and it is not a router across vendors. That makes it useful for fiction tools, roleplay and companion apps for adults, security research and other work where standard assistants refuse often. Sexual content involving minors is never allowed.
The context window is 100,000 tokens for prompt plus completion, and max_tokens is optional. The service is text only, with no image, audio or video generation, no embeddings and no fine-tuning. Besides streaming, it supports tool calling (tools, tool_choice and results as role: "tool"), JSON mode with response_format, and the sampling parameters temperature, top_p, stop, seed and the penalties. Prompts are not used for training.
Cost and next steps
Input costs $0.15 per 1M tokens and output costs $0.50 per 1M. A request with 2,000 input tokens and 500 output tokens costs $0.0003 + $0.00025 = $0.00055, so the $0.50 trial covers about 909 of them. Check your balance with GET /v1/balance, the OpenAI-style /v1/dashboard/billing/credit_grants, or the X-Balance-USD header.
Top-ups run from $20 to $500 in any whole amount, paid with USDT on TRC20 or USDC on Base, with +5% from $50, +10% from $100 and +15% from $200. Credit never expires. See the pricing page for details and the docs for every parameter. A longer introduction is in our integration guide.
One last tip: store the base URL, key and model in environment variables so the same code runs in development and production. In Node that is process.env.API_KEY, as in the example above, and in Python os.environ["API_KEY"]. Rotate the key by changing the variable, not the code.
Common mistakes and quick fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Missing or wrong key, or the key was regenerated | Check the Authorization header format: Bearer, a space, then the key. Copy the current key from the key page. |
| Model not found | Wrong model name | Use uncensored exactly, in lowercase. |
| Connection or 404 errors | Base URL missing /v1 or doubled | Set the base URL to https://api.iasemsensura.com/v1 and let the SDK add the path. |
429 with concurrency | Too many requests running at once | Lower parallelism to 8, or 2 on a trial key. Finish or close open streams. |
429 with rate_limited | Over 300 per minute (60 on trial) | Space calls out and back off between retries. |
| Reply cut off | Window full or max_tokens set too low | Raise or remove max_tokens; trim the prompt so the 100,000-token window has room. |
| Balance drops faster than expected | Long chat history resent on every turn | Summarize old turns and log the usage numbers. |
If you get a failure that does not match this table, log the X-Request-Id response header. It identifies the request, and it is the first thing to quote if you contact support through the support page.
Also keep secrets safe. Read the key from an environment variable, never from a file in your repository. If it leaks, regenerate it and update the variable. The old key stops at once, so the exposure ends the moment you click.
More guides
Frequently asked questions from developers
What is uncensored ia?
Uncensored ia refers to large language models that do not apply strict safety filters to lawful adult, fictional, or controversial content. Our API serves one dedicated model that answers without refusals for such topics, ensuring consistent behavior for NSFW or roleplay applications.
How does the prepaid credit work?
Prepaid credit is charged by real token usage, with errors and refusals being free. Credit never expires, and you can top up with crypto (USDT on TRC20 or USDC on Base) in amounts from $20 to $500, with bonus credits for larger top-ups. No subscription or monthly fee is required.
Can I use this API with the official OpenAI SDK?
Yes, the API is OpenAI-compatible. You can use the official OpenAI SDKs or any compatible client by setting the base_url to HTTPS://api.iasemsensura.com/v1 and providing your API key. The model ID to send is "uncensored".
What are the rate limits?
The API allows 300 requests per minute per key and 8 concurrent requests per key. The request body must be under 8 MB. Each account has one active key, and a new key replaces the old one if generated.
Common questions
Do I need a special SDK?
No. Any OpenAI SDK or OpenAI-compatible client works once you set the base URL to https://api.iasemsensura.com/v1 and use your key.
What is the model name?
The model ID is uncensored. There is only one model on this API.
How do I see my balance?
Read the X-Balance-USD header on any response, or call GET /v1/balance or the OpenAI-style /v1/dashboard/billing/credit_grants endpoint.
Can I use it for image generation or embeddings?
No. The service is text only, with no image, audio or video generation, embeddings or fine-tuning.
Is there a free test?
Yes. You can claim $0.50 of trial credit with one click after sign-up. It is valid for 7 days, needs no card and is limited to one per person.
Access via single form
Register, retrieve your key, update the base URL. That is all configuration required.