Prerequisites: Your API Key and Base URL
You need a valid API key and the correct base URL to start using the uncensored AI API. Sign up with Google or email to receive your key instantly without phone verification. The base URL is HTTPS://api.apikeycodex.com/v1. This endpoint works with the official OpenAI SDKs. You only need one active key per account. A new key replaces the old one. You get $0.50 trial credit for 7 days. Errors are free. Refusals do not cost tokens. Your prompts are not used for training. Privacy is simple. You only provide an email. The uncensored model handles adult content. It refuses only unlawful or minor sexual content. Use this base URL in your client configuration.
Sending your first chat completion request
Make a POST request to /v1/chat/completions to get text output. Send the model id as "uncensored". Include your system prompt and user messages. The uncensored LLM answers directly. It does not refuse lawful adult topics. Set the API key in the Authorization header. Use bearer token authentication. The request body contains messages. Each message has a role and content. The model generates text. You receive the response. Check the token usage. It counts input and output tokens. Billing is transparent. You pay only for tokens used. Errors cost nothing. The uncensored model is fast. It fits your use case. Try a simple query. See the results. Use curl for testing.
curl https://api.apikeycodex.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Create a REST endpoint for user authentication"}]
}'
Using the Python SDK for integration
Install the official openai python package. Set the base URL to our endpoint. Set the API key in the environment. Call the chat.completions.create method. Pass the model "uncensored". Provide your messages. The SDK handles the request. You get a response object. Access the content. Check the token counts. The uncensored AI API works seamlessly. It supports function calling. Use tools in the request. The model follows instructions. It outputs JSON if requested. Set response_format to json_object. This ensures valid JSON. The uncensored model is reliable. It handles complex prompts. Stream or sync. Choose your method. The Python SDK is easy. Integrate quickly.
from openai import OpenAI
client = OpenAI(base_url="https://api.apikeycodex.com/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)
Integrating with Node.js clients
Use the official Node.js SDK. Configure the base URL. Set the API key. Call the completions endpoint. Send the model "uncensored". Provide your input messages. The uncensored model responds. It supports streaming. Use the stream method. Iterate over chunks. Build the response. The uncensored AI API key works here. Node.js is popular. This integration is standard. Handle errors gracefully. Check the status code. Retry if needed. The uncensored model is robust. It handles large inputs. Context window is 100,000 tokens. Use it fully. The uncensored LLM is fast. Node.js clients work well. Integrate today.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apikeycodex.com/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);
Handling streaming responses for real-time output
Enable streaming by setting stream to true. The API returns chunks. Each chunk contains partial text. Process chunks as they arrive. The uncensored model streams efficiently. Show text immediately. The uncensored AI API supports SSE. Use the last chunk for token usage. Count tokens accurately. Billing is real-time. Pay only for what you use. The uncensored model is responsive. It feels fast. Streaming reduces perceived latency. Use it for chat interfaces. The uncensored LLM works well. Node.js and Python support it. Handle errors in streaming. Close the stream properly. The uncensored model is reliable. Stream now.
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Limits, errors, and token usage
You face limits per key. 300 requests per minute. 8 concurrent requests. 8 MB request body. Errors return 401 for invalid keys. 402 for no credit. 429 for rate limits. Fix errors quickly. Check your balance. Top up with crypto. USDT or USDC. Bonus credit applies. Context window is 100,000 tokens. Max output is 16,000 tokens. Set max_tokens if needed. The uncensored model respects limits. Billing is transparent. Errors are free. Pay-as-you-go. No subscription. Credit never expires. The uncensored AI API is simple. Use it confidently. Monitor usage. Stay within limits. The uncensored LLM is powerful. Limits are reasonable. Manage your key. Replace if needed. One key per account. Simple rules. Clear limits. No surprises.
from openai import OpenAI
client = OpenAI(base_url="https://api.apikeycodex.com/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)