Verify OpenAI Compatibility
Most modern LLM integrations rely on the OpenAI Python or Node.js SDKs. The uncensored API maintains strict compatibility with this ecosystem. You do not need to rewrite your application logic. You only need to update the base URL and provide a valid API key.
When you initialize the client, point it to the specific endpoint. This ensures that all subsequent calls, including those for streaming or structured outputs, route correctly to the uncensored model.
This approach minimizes integration time. Developers can swap in the uncensored model to test behavior or deploy it for production workloads that require fewer content filters. The endpoint structure matches the standard /v1/chat/completions route, ensuring that parameters like temperature and top_p function as expected.
Remember that this is a single-model service. You are interacting with one specific open-weight model optimized for fewer refusals. It is not a gateway to multiple vendors.
Configure Context Window
The model supports a total context window of 100,000 tokens. This limit includes both the input prompt and the generated completion. For most applications, this provides ample space for complex reasoning or long document analysis.
Be aware of the output length. If you do not set the max_tokens parameter, the response can run to the end of the 100,000-token window.
Efficient token management is important. Since pricing is based on actual usage, understanding how your prompts consume the context window helps control costs. Keep system prompts concise and manage conversation history carefully to avoid hitting the 100k limit prematurely.
Handle Rate Limits
Each API key is subject to specific rate limits to ensure stability. You can make up to 300 requests per minute. Additionally, there is a concurrent request limit of 8 requests per key. Exceeding these limits will result in HTTP 429 errors.
The maximum request body size is 8 MB. Ensure your payloads fit within this constraint. If you are sending large base64-encoded data or long documents, verify the size before transmission.
Implement retry logic with exponential backoff in your client code. This handles transient rate limit errors gracefully. Note that each account is associated with one active key. Generating a new key replaces the previous one, so manage your key rotation carefully.
Implement Streaming
Streaming is supported via Server-Sent Events (SSE). This is essential for user experiences that require immediate feedback, such as chat interfaces. The SDK handles the event stream automatically, emitting tokens as they are generated.
Token usage statistics are included in the final chunk of the stream. This allows you to track consumption in real-time. Use this data to update your UI or log costs accurately.
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)Ensure your client code properly closes the stream when the response is complete. This prevents resource leaks and ensures accurate token counting.
Enable JSON Mode
For structured data extraction, the API supports JSON mode. Set the response_format parameter to {"type": "json_object"}. The model will then output valid JSON that can be parsed directly by your application.
This is useful for extracting entities, generating configuration files, or powering function calling. The model is optimized to adhere to the requested schema. However, always validate the output in your application layer, as LLMs can occasionally produce malformed JSON.
Combine JSON mode with a well-defined system prompt to improve consistency. Clearly describe the expected structure in your instructions. This reduces the need for complex post-processing.
Manage Function Calling
Function calling allows the model to invoke external tools. Define your functions in the tools parameter. The model can then choose to call a function based on the user's input.
Set tool_choice to auto to let the model decide, or specify a specific tool. This enables the creation of agents that can interact with APIs, databases, or other services.
Pass the tool outputs back to the model in subsequent messages. This allows for multi-turn reasoning and complex workflows. The uncensored model handles function calling reliably, maintaining context across tool interactions.
Monitor Token Usage
Pricing is transparent: $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free. You only pay for successful completions.
Credit is prepaid and never expires. You can top up by crypto, with bonuses for larger amounts. Monitor your balance regularly to avoid service interruption.
Use the token counts provided in the response to track costs. This helps in optimizing prompt length and understanding the financial impact of different workflows. Since credit does not expire, there is no pressure to use it quickly.
Set Up Crypto Payments
Payments are processed by crypto (USDT on TRC20, USDC on Base). Minimum and maximum top-up amounts are $20 and $500, respectively.
Bonuses are applied automatically. Top-ups of $50 or more receive a 5% bonus. Top-ups of $100 or more receive a 10% bonus. This makes larger credits more cost-effective.
Sign up is simple. You can use Google or an email and password. No phone number is required. The trial credit of $0.50 is available for new accounts, valid for 7 days, with no card needed. This allows for immediate testing without financial commitment. Claim this credit with one click on your API key page.
