Authentication and Base URL
Start by setting your base URL and API key in your environment. Our API lives at HTTPS://api.aiwithnofilter.com/v1 and accepts any standard OpenAI-compatible client. Generate your key on the dashboard with Google or email, then pass it as a bearer token. This ensures every request authenticates correctly without extra headers.
curl https://api.aiwithnofilter.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "generate a python function to parse json logs"}]
}'
Sending Your First Completion
Make a POST request to /v1/chat/completions with the model id "uncensored". Send your system prompt and user messages in the standard JSON format. The API returns a text response instantly, ready for your application logic. This works for roleplay, creative writing, or any unrestricted text generation task.
from openai import OpenAI
client = OpenAI(base_url="https://api.aiwithnofilter.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)
Streaming Responses with SSE
Enable streaming by setting stream to true in your request body. The API sends Server-Sent Events (SSE) as tokens are generated, allowing real-time display. Each chunk contains partial text and usage data in the final event. This reduces perceived latency for users waiting for long outputs.
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)
Function Calling and JSON Mode
Use the tools parameter to define functions your model can call. Pass tool_choice to enforce specific behavior or let the model decide. Enable JSON mode with response_format set to json_object for strict schema compliance. This ensures structured outputs for reliable integration with your backend services.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aiwithnofilter.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);
Parameters: Temperature, Top P, and Seed
Control creativity with temperature and diversity with top_p. Use seed for reproducible outputs during debugging. Set stop sequences to halt generation at specific markers. These parameters give you precise control over the model's behavior without needing to switch models.
300 requests per minute limit applies.
Understanding Token Usage and Limits
Your context window is 100,000 tokens total, including prompt and completion. Max output per request is 16,000 tokens unless you specify otherwise. Errors and refusals consume no tokens, so you only pay for actual usage. Handle 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits gracefully.
Credit never expires, ensuring no wasted funds.