How to Use an Uncensored LLM With a Claude API Key

Swap your Claude API key endpoint to access an uncensored LLM that ignores standard content filters while keeping your existing code. This guide explains how to redirect your requests to an OpenAI-compatible interface for unrestricted creative or technical outputs.

Last updated

Summary

  1. Change your SDK base URL to point to an uncensored provider instead of the default Claude endpoint.
  2. The uncensored model accepts standard parameters like temperature and top_p without refusing adult or controversial topics.
  3. Token pricing is transparent, with costs based purely on input and output length rather than subscription tiers.
  4. Function calling and JSON mode work identically to standard OpenAI-compatible APIs for easy integration.

Why swap the Claude API key endpoint?

Swapping the endpoint removes content restrictions that limit creative freedom or technical nuance. Claude models often refuse to discuss adult themes, controversial historical events, or specific medical details even when those topics are lawful. By redirecting your API calls to an uncensored provider, you retain full access to the model's reasoning capabilities without the safety layer filtering your inputs. This approach is ideal for developers who need raw outputs for data processing, creative writing, or roleplay applications.

The switch requires only a change in the base URL and the API key. Your existing Claude API key might not work directly if the uncensored provider uses a different key format, but the integration pattern remains identical. You gain access to a model that prioritizes answer generation over content moderation, ensuring that your application receives the full range of the model's knowledge base.

Understanding the OpenAI-compatible interface

The interface uses standard OpenAI-compatible endpoints to ensure broad SDK support. Our API serves requests at https://api.mistralaikey.com/v1 using the same structure as major providers. This means you can use libraries like OpenAI Python SDK, LangChain, or LlamaIndex without rewriting your core logic. The endpoint supports POST /v1/chat/completions for text generation and GET /v1/models for listing available models.

FeatureSupport Level
Streaming (SSE)Yes
Function CallingYes
JSON ModeYes
EmbeddingsNo

By adhering to these standards, we ensure that your code remains portable. You can switch between different models or providers by changing a single configuration variable. This flexibility is crucial for testing different uncensored models or scaling your application without deep refactoring.

Configuring your SDK for uncensored responses

Configuring your SDK involves updating the base URL and API key in your environment variables. For the OpenAI Python SDK, you set base_url to our endpoint and api_key to your uncensored key. This simple change redirects all chat completion requests to our servers. The model ID is set to uncensored, which triggers the open-weight model tuned for unrestricted responses.

Here is how you initialize the client in Python:

This configuration ensures that every request is routed correctly. You can verify the connection by sending a simple test prompt. If you receive a response without content filters, your configuration is successful. This method works for any OpenAI-compatible client, making it easy to integrate into existing projects like SillyTavern or Aider.

Handling temperature and top_p settings

Adjusting temperature and top_p allows you to control the creativity and randomness of the output. A higher temperature increases the variety of responses, which is useful for creative writing or brainstorming. Lower temperatures produce more deterministic and focused answers, ideal for coding or factual queries. The uncensored model supports all standard parameters, including top_p, stop, seed, and penalties.

Our API allows a context window of 100,000 tokens, giving you ample room for long conversations or document analysis. The maximum output per request is 16,000 tokens, which is sufficient for most use cases. If you do not specify max_tokens, the default is 2,048 tokens. This flexibility ensures that you can fine-tune the model's behavior to match your specific application needs without losing the uncensored nature of the responses.

Monitoring token usage in uncensored mode

Monitoring token usage is straightforward with our transparent pricing model. You pay $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This pricing is based on actual usage, with no hidden fees or subscription costs. Errors and refusals are free, so you only pay for successful responses. This structure is cost-effective for high-volume applications where content filtering might otherwise trigger unnecessary charges.

You can track your usage through the dashboard or by examining the response headers. Each response includes token counts, allowing you to calculate costs accurately. Prepaid credit is charged based on real token usage, and it never expires. This means you can top up with crypto and use the credits over time without worrying about monthly renewals. For small projects, a trial credit of $0.50 is available for new accounts, valid for 7 days.

Function calling with uncensored models

Function calling enables the model to generate structured data for your applications. Our API supports tool definitions, allowing the model to output JSON that matches your schema. This feature is essential for building agents that interact with external systems or databases. The uncensored model handles function calling just as well as standard models, ensuring that your logic remains intact.

When using function calling, specify the tools in the request body. The model will return a response with the appropriate tool calls if needed. This capability is available alongside streaming and JSON mode, providing a comprehensive set of tools for developers. You can integrate this into your workflow to automate tasks, extract data, or control hardware devices based on natural language inputs.

Common integration pitfalls

Common pitfalls include incorrect base URLs and missing API keys. Ensure that your base URL ends with /v1 to match the endpoint structure. Also, verify that your API key is correctly formatted and active. Another common issue is assuming that the uncensored model supports all features of premium models, such as image generation or embeddings. Our API focuses on text generation, so check the documentation for specific feature availability.

Rate limits are set to 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, you may receive a 429 error. To avoid this, implement exponential backoff in your client code. Additionally, remember that the trial credit expires after 7 days, so plan your testing accordingly. These limits ensure fair usage while maintaining high performance for all users.

Switching back to standard models

Switching back to standard models is as simple as changing the base URL and model ID. If you need to compare outputs or use a model with specific features, you can revert your configuration. This flexibility allows you to use the uncensored model for creative tasks and a standard model for production-ready features. The OpenAI-compatible interface makes this switch seamless, requiring no code changes beyond configuration variables.

You can also run both models in parallel for A/B testing. This approach helps you evaluate the quality of uncensored responses against standard ones. By maintaining a modular architecture, you can easily toggle between different providers or models. This strategy ensures that your application remains robust and adaptable to changing requirements or model updates.

Common questions

How do I get an uncensored API key?

Sign up on our website using Google or email to receive your API key immediately. The key is generated instantly and can be used with any OpenAI-compatible client. You can top up your balance with crypto starting from $20, or use the free trial credit for testing.

Does the uncensored model support streaming?

Yes, our API supports streaming via Server-Sent Events (SSE). You can receive tokens in real-time, which is useful for chat applications. The last chunk of the stream includes the total token usage for accurate billing.

What happens if I exceed the rate limit?

If you exceed 300 requests per minute or 8 concurrent requests, you will receive a 429 error. Implementing exponential backoff in your client code will help you manage these limits effectively without losing data.

Is my data used for training?

No, your prompts are not used for training. We prioritize privacy by not storing logs of workflow executions. Your data remains secure, and you can delete your account and all associated data at any time.

Get your key instantly

Sign up, copy the token, update your base URL. That is all you need.

Start nowView documentation