EN ▾
Open Source LLM API

Uncensored, OpenAI-compatible chat API

Get API key

Troubleshooting Uncensored Text APIs

Integrating an uncensored text API offers flexibility but introduces unique operational risks. Developers must manage rate limits, token billing, and the absence of built-in safety filters carefully.

Server rack with glowing blue data streams representing an uncensored text API

Understanding Rate Limits and Throttling

When integrating any API, understanding rate limits is the first step to a stable application. Our API enforces a limit of 300 requests per minute per key. If you exceed this threshold, the service returns a 429 error. This error indicates that you have sent too many requests in a short window. It does not mean your key is invalid or that you have run out of credit.

To handle this, you should implement exponential backoff in your client code. This means waiting for a short period before retrying the request, and increasing that wait time with each successive failure. This approach prevents your application from flooding the server and getting blocked temporarily. It is a standard practice for any developer using a hosted API service.

It is also important to monitor your request volume closely. If you are building a high-throughput application, consider batching requests where possible. This reduces the total number of API calls you make. You can also distribute your load across multiple API keys if you have several. This strategy helps you stay within the per-key limit while maintaining performance.

Finally, always check the response headers for any rate limit information. Some APIs provide headers that tell you how many requests you have left. While our API does not explicitly state this in the headers, being aware of the 300 requests per minute limit is important. By respecting these limits, you ensure a smooth experience for your users and avoid unexpected interruptions in your service.

Managing Token Costs and Billing

One of the most common concerns for developers is understanding how costs are calculated. Our API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This means you pay for the text you send and the text the model generates. Errors and refusals are free, which can help reduce costs if your prompts often trigger a refusal.

To estimate your costs, you need to count the tokens in your prompts and responses. You can use a token counter library to get an accurate count before sending the request. This allows you to budget effectively and avoid surprise charges. Remember that the context window is 100,000 tokens, so long conversations can accumulate tokens quickly.

It is also important to note that prepaid credit never expires. This means you can top up your account whenever you need more credit. The credit is charged based on real token usage, so you only pay for what you use. This is a flexible model that suits developers who want control over their spending.

When comparing costs, keep in mind that other vendors may have different pricing structures. For example, some services might charge per request or offer different token rates. Always check the vendor's documentation for current prices and limits. This ensures you are making an informed decision about which API best fits your budget and needs.

Handling Missing Safety Filters

Uncensored APIs do not have built-in safety filters for adult or controversial topics. This means the model will generate text for these topics without refusal, except for sexual content involving minors. As a developer, you are responsible for implementing your own safety logic if needed. This gives you more control but also more responsibility.

You can use the stop parameter to limit the length of the response. This can help prevent the model from generating excessive text. You can also use the temperature and top_p parameters to control the randomness of the output. Lower values make the output more deterministic, while higher values make it more creative.

It is important to test your prompts thoroughly to ensure they produce the desired results. You can use the seed parameter to get consistent results for the same prompt. This is useful for debugging and ensuring reproducibility. You can also use the JSON mode to get structured output, which is easier to parse and display in your application.

When integrating the API, consider adding a layer of content moderation in your application. This can help you filter out unwanted content before it reaches your users. You can use a separate model or service for this purpose. This approach allows you to maintain the uncensored nature of the API while still providing a safe experience for your users.

Integrating with Agentic Workflows

Many developers are interested in using uncensored APIs for agentic workflows. This involves linking the API to other tools or models to create a more complex system. For example, you might use the API to generate text for a chatbot, and then use that text to trigger actions in another application.

To do this effectively, you need to understand how the API fits into your overall architecture. The API is text-only, so it cannot handle images, audio, or video. You will need to use other services for those tasks. This means you must design your workflow to handle text inputs and outputs only.

You can also use the function calling feature to allow the model to call functions in your code. This is useful for creating more interactive and dynamic applications. You can define the functions in your code and pass them to the API. The model can then call these functions based on the context of the conversation.

When building agentic workflows, it is important to test each component thoroughly. This ensures that the API integrates smoothly with the rest of your system. You can also use the streaming feature to get real-time updates from the API. This can improve the user experience by providing immediate feedback.

When This API Is Not the Right Choice

While our API is powerful for text generation, it may not be the right choice for everyone. If you need image, audio, or video generation, this service does not support those capabilities. You will need to use a different provider for those tasks. Similarly, if you need fine-tuning or model routing, this service does not offer those features.

If you require a service with a specific SLA or certification, such as SOC2 or HIPAA, you should check the vendor's documentation for current prices and limits. Our API does not claim these certifications. It is an independent service focused on providing uncensored text generation.

Additionally, if you need a free unlimited tier, this service may not meet your needs. We offer a prepaid credit model with a trial of $0.50 for new accounts. This is a good way to test the API, but it is not a long-term solution for high-volume users.

Finally, if you are looking for a service with a large community of named customers or benchmark scores, you might want to explore other options. Our API is focused on providing a simple, uncensored text API. We do not claim to have the largest community or the best benchmark scores. Always evaluate your specific needs before choosing a provider.

Addressing Common Developer Questions

Developers often ask about the best way to integrate uncensored APIs into their projects. On Reddit, users discuss linking these APIs to tools like Blackbox for agentic workflows. They also ask about the best models for unrestricted use and how to handle costs.

Some developers are interested in building their own cost profilers to understand the true cost of using local models versus hosted APIs. This is a valid concern, as the cost of running a local model can be significant. However, for many developers, a hosted API is more convenient and scalable.

Another common question is about the best way to handle rate limits and token costs. As mentioned earlier, implementing exponential backoff and monitoring token usage are key strategies. Developers also ask about the best way to handle safety filters, which is a trade-off of using an uncensored API.

Finally, some developers are looking for free or low-cost uncensored APIs. While our API offers a trial, it is not free. It is important to evaluate the cost-benefit ratio of each option. Always check the vendor's documentation for current prices and limits to make an informed decision.

Best Practices for Integration

To ensure a smooth integration with our API, follow these best practices. First, always handle errors gracefully. This includes 401 errors for invalid keys, 402 errors for no credit, and 429 errors for rate limits. You can display a user-friendly message when these errors occur.

Second, use the streaming feature to provide a better user experience. This allows you to display text as it is generated, rather than waiting for the entire response. This is especially useful for chat applications where users expect immediate feedback.

Third, use the JSON mode to get structured output. This makes it easier to parse and display the response in your application. You can also use the function calling feature to allow the model to call functions in your code.

Finally, always test your integration thoroughly. This includes testing with different prompts, temperatures, and other parameters. This ensures that your application behaves as expected under various conditions. By following these best practices, you can build a reliable and reliable application using our API.

Frequently asked questions

How do I handle rate limits in my application?

Implement exponential backoff in your client code to retry requests after a 429 error. Monitor your request volume and consider batching requests to stay within the 300 requests per minute limit.

What is the cost of using the API?

The API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free. You can top up your credit using crypto.

Does the API support image or video generation?

No, the API is text-only. It does not support image, audio, video, OCR, or fine-tuning. You will need to use other services for those capabilities.

Is there a free trial available?

Yes, every new account gets $0.50 of trial credit. No card is needed to sign up. You can use this to test the API before purchasing more credit.

base_url
https://api.opensourcellmapi.com/v1
model
uncensored