EN ▾
Get API key

Integrating the Uncensored Text API: A Developer Checklist

Developers often seek reliable, uncensored text generation without the overhead of managing local GPU infrastructure. This guide outlines how to integrate our OpenAI-compatible endpoint, handle prepaid crypto credits, and validate your access using the initial trial balance.

Developer integrating crypto API on a modern desk with digital tokens

Understanding the API Endpoint and Model

Before writing any code, it is essential to understand the specific endpoint and model identifier for our service. We provide a hosted, OpenAI-compatible chat-completions API that serves a single uncensored open-weight text model. The model identifier you must send in your requests is "uncensored". This simplicity means you do not need to manage multiple model versions or routing logic. Your application sends text in and receives text out, making it straightforward to integrate into existing workflows.

The base URL for all API requests is https://api.uncensoredclaude.cc/v1. This URL is consistent across all endpoints, including chat completions, responses, and model listing. By using this single base URL, you can maintain a clean configuration in your application. You do not need to switch between different domains for different features, as we do not offer embeddings, image generation, audio, or video capabilities. This focus on text ensures stability and predictable performance for your text generation needs.

When configuring your client library, ensure you are using the standard OpenAI SDK or any compatible HTTP client. The API supports standard parameters such as temperature, top_p, stop sequences, seed, and penalties. This compatibility allows you to use familiar tools and libraries without learning a new protocol. The API also supports streaming over Server-Sent Events (SSE), which is useful for real-time applications where you want to display text as it is generated. This feature enhances the user experience by providing immediate feedback.

It is important to note that the API does not support fine-tuning, model routing, or OCR. If your application requires these features, you may need to combine this API with other services. However, for pure text generation tasks, this API provides a reliable and uncensored solution. The lack of additional features reduces complexity and potential points of failure, making it an ideal choice for developers who want a reliable text generation engine without the overhead of managing multiple AI services.

Configuring SDK and Authentication

Setting up your development environment is the next critical step. You can sign up for an account using Google or an email and password combination. Upon signup, your API key is shown immediately, allowing you to start testing right away. This key is essential for authenticating your requests to the API. You must include this key in the Authorization header of your HTTP requests to ensure that your usage is tracked and billed correctly.

When using the OpenAI SDK, you can initialize the client with your API key and the base URL. This setup allows you to use familiar methods like client.chat.completions.create to send requests. The SDK handles the serialization of your data and the parsing of responses, making the integration process smoother. You can also use other HTTP clients if you prefer more control over the request lifecycle. The API supports standard error codes such as 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Handling these errors gracefully is important for a reliable application.

The API enforces a rate limit of 300 requests per minute per key. This limit is generous for most development and production use cases. If you exceed this limit, you will receive a 429 error, and your requests will be throttled. You can monitor your usage and adjust your request frequency accordingly. The API also supports function calling, which allows you to define tools that the model can use. This feature is useful for applications that require the model to interact with external systems or perform specific actions based on user input.

JSON mode is also supported, which ensures that the model's output is valid JSON. This is particularly useful for applications that parse the model's output programmatically. By using JSON mode, you can reduce the risk of parsing errors and ensure that your application receives structured data. This feature is especially valuable for building agents or systems that rely on precise data formats.

Managing Crypto Top-Ups and Credits

Our pricing model is based on prepaid credit, which is charged by real token usage. The cost is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. There is no monthly subscription or fee, and paid credit never expires. This model allows you to pay only for what you use, making it cost-effective for projects with variable usage patterns. Errors and refusals are free, so you do not pay for failed requests or content that is filtered by the hard content limit.

To add credit to your account, you can use crypto payments. We accept USDT on the TRC20 network or USDC on the Base network. You can top up with any whole amount from $20 to $500. If you top up with $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus provides additional value for larger top-ups. The payment process is straightforward, and you can track your balance in your account dashboard. There is no need for credit cards, PayPal, or bank transfers, which simplifies the onboarding process for international users.

It is important to note that the top-up process is crypto-only. If you prefer traditional payment methods, you may need to use a crypto exchange or wallet to convert your funds. The minimum top-up amount is $20, which is a reasonable threshold for most users. The maximum amount of $500 per transaction allows for flexibility in managing your budget. You can top up as needed, and your credit will be available immediately after the transaction is confirmed.

The prepaid credit model ensures that you always know your spending limit. You do not have to worry about unexpected charges or overages. If your credit runs out, you will receive a 402 error, and you can top up your account to resume usage. This transparency is beneficial for budgeting and cost control, especially for teams with multiple developers or projects using the API.

Verifying Trial Credit and Initial Testing

Every new account receives $0.50 of trial credit, which allows you to test the API without making a purchase. This trial credit is a great way to verify your integration and ensure that your application is working correctly. You can use this credit to send requests, test different parameters, and evaluate the model's performance. The trial credit is available immediately after signup, so you can start testing right away.

When testing your integration, it is important to send a variety of requests to cover different use cases. You can test the streaming feature, function calling, and JSON mode to ensure that all features are working as expected. You can also test the error handling by sending invalid requests or exceeding the rate limit. This comprehensive testing helps you identify any issues before deploying your application to production.

It is also important to monitor your token usage during testing. You can track the number of input and output tokens to understand the cost of your requests. This information is useful for estimating the cost of your application and planning your budget. The API provides detailed usage statistics, which you can access through your account dashboard. This data helps you optimize your requests and reduce costs.

Once you have verified your integration, you can proceed to top up your account with crypto. The trial credit is a great way to get started, but you will need to add credit to continue using the API. The top-up process is simple, and you can add credit as needed. The prepaid credit model ensures that you always have control over your spending, and you can stop using the API at any time if you no longer need it.

When This API Is Not the Right Choice

While our API is excellent for text generation, it may not be the right choice for all applications. If your project requires image, audio, or video generation, you will need to use a different service. Our API focuses solely on text, so you cannot generate media files directly. If you need to create images or videos, you may need to integrate multiple APIs or use a more comprehensive AI platform.

Similarly, if your application requires embeddings for semantic search or vector databases, our API does not support this feature. You would need to use a separate embedding API to generate vectors from your text data. This additional step adds complexity to your architecture, but it is necessary if you need to perform semantic search or other vector-based operations.

Another limitation is that we do not offer fine-tuning services. If you need to train the model on your specific dataset, you will need to use a different provider. Fine-tuning allows you to customize the model's behavior and improve its performance on specific tasks. Without this feature, the model will perform based on its general training, which may not be optimal for all use cases.

Finally, if you require on-premises deployment for data privacy or regulatory compliance, our hosted API may not be suitable. We provide a cloud-based service, so your data is processed on our servers. If you need to keep your data on your own infrastructure, you may need to look for a provider that offers on-premises solutions. Understanding these limitations helps you make an informed decision about whether our API is the right fit for your project.

Addressing Community Questions on Integration

Developers in communities like r/LocalLLaMA and r/AIDeveloperNews often discuss the challenges of integrating uncensored models. Many users ask about the best way to connect these models to their existing codebases, especially when dealing with different model architectures. The consensus is that using an OpenAI-compatible API simplifies the integration process significantly. By standardizing the API interface, developers can reuse their existing code and libraries, reducing the learning curve.

Another common question is about the performance of uncensored models compared to their censored counterparts. Users often report that uncensored models can be more creative and less restrictive, which is beneficial for certain applications. However, they may also require more careful prompt engineering to avoid unwanted outputs. The key is to find the right balance between creativity and control, which can be achieved through careful tuning of parameters like temperature and top_p.

Users also discuss the importance of context window size. Larger context windows allow the model to retain more information from previous interactions, which is useful for long-form content generation or complex conversations. Our API supports a context window of 100,000 tokens, which is sufficient for most use cases. However, if you need even larger context windows, you may need to consider other providers or use chunking strategies to manage memory.

Finally, there is often discussion about the cost-effectiveness of using uncensored models. While uncensored models can be more expensive due to higher token usage, they often provide better quality and more flexibility. The prepaid credit model allows you to control your spending, and the bonus credits for larger top-ups can help offset the cost. By understanding these trade-offs, developers can make informed decisions about which models and providers to use for their projects.

Best Practices for Production Deployment

When moving your application to production, it is important to implement reliable error handling and rate limiting. Our API returns standard HTTP error codes, which you can use to handle different failure scenarios. For example, a 401 error indicates an invalid key, while a 402 error means you have insufficient credit. A 429 error indicates that you have exceeded the rate limit. By handling these errors gracefully, you can ensure that your application remains stable and responsive.

It is also important to monitor your token usage and costs. You can track the number of input and output tokens to understand your spending patterns. This information is useful for optimizing your requests and reducing costs. You can also set up alerts to notify you when your credit balance is low, so you can top up your account before running out of credits. This proactive approach helps you avoid unexpected service interruptions.

Another best practice is to use environment variables to store your API key and other sensitive configuration data. This prevents your key from being hardcoded in your source code, which reduces the risk of accidental exposure. You can also use a secrets manager to store and retrieve your credentials securely. This is especially important for team environments where multiple developers are working on the same project.

Finally, consider implementing caching strategies to reduce the number of API calls. If your application makes repeated requests with the same parameters, you can cache the responses to avoid redundant API calls. This can significantly reduce your costs and improve the performance of your application. By following these best practices, you can ensure that your integration is efficient, reliable, and cost-effective.

Frequently asked questions

How do I top up my account with crypto?

You can top up your account using USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. If you top up with $50 or more, you receive a bonus credit ranging from 5% to 15%.

What happens if I run out of credit?

If you run out of credit, you will receive a 402 error on your requests. You can top up your account with crypto to resume usage. Your paid credit never expires, so you can add credit whenever you need it.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). This allows you to receive text as it is generated, which is useful for real-time applications. You can also receive usage information in the last chunk of the stream.

Can I use the API for image generation?

No, the API is text-only. It does not support image, audio, or video generation. If you need these features, you will need to use a different service or combine this API with other tools.