Integrating an Uncensored Text API with Python
Developers often seek a straightforward, uncensored text API for Python projects without the overhead of multi-model routing. This guide walks you through the essential steps to connect to our service, configure the OpenAI-compatible endpoints, and manage your credits effectively.

Understanding the API Structure
When integrating an uncensored LLM API, the first step is understanding the base URL and endpoint structure. Our service provides a hosted, OpenAI-compatible chat-completions API that serves a single uncensored open-weight text model. The base URL is https://api.providersapillm.com/v1. You will interact primarily with the POST /v1/chat/completions endpoint for generating text responses. This structure ensures that if you are already familiar with the OpenAI SDK, the transition is smooth and requires minimal code changes.
The API is designed for text input and text output only. It does not support embeddings, image generation, audio processing, video generation, OCR, or fine-tuning. This focus on pure text generation makes it ideal for developers who need reliable, uncensored responses without the complexity of managing multiple modalities. By sticking to a single model ID, uncensored, you avoid the variability of model routing and ensure consistent behavior across your application.
One key feature is the large context window of 100,000 tokens, which includes both the prompt and the completion. This allows you to pass extensive context or long documents without hitting early limits. However, because the API is text-only, you cannot use it for tasks that require visual understanding or data extraction from images. If your project involves processing visual data, you would need to handle that separately before sending the text to our API.
The API also supports streaming over Server-Sent Events (SSE). This is important for user experience, as it allows you to display text as it is generated rather than waiting for the entire response. The usage data, including token counts, is provided in the last chunk of the stream. This feature is particularly useful for chat applications where real-time feedback is expected. By using streaming, you can create a more responsive and engaging interface for your users.
Setting Up Your Python Environment
To start integrating with the API, you need to set up your Python environment correctly. The most common approach is to use the official OpenAI Python SDK, as our API is compatible with its structure. You can install the SDK using pip. This library provides a convenient interface for making HTTP requests, handling authentication, and parsing responses. It abstracts away many of the lower-level details, allowing you to focus on the logic of your application.
Once installed, you will need to configure your API key. You can sign up using Google or an email and password, and your key is shown immediately. It is important to store this key securely, as it provides access to your prepaid credits. The API key is used for authentication in the HTTP headers. If you send an invalid key, you will receive a 401 error. If you do not have enough credit, you will receive a 402 error. These error codes help you troubleshoot issues quickly.
You should also configure the base URL in your SDK client. By setting the base URL to https://api.providersapillm.com/v1, you direct your requests to our service. This ensures that you are using the correct endpoint for the uncensored model. The model ID you must send is uncensored. This specific ID tells the API which model to use for generating responses. Using the correct model ID is essential for getting the expected uncensored behavior.
Additionally, you can configure various parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the randomness and determinism of the output. For example, setting a seed ensures that you get the same response for the same input, which is useful for testing and debugging. The API also supports function calling and JSON mode, which can be useful for structured data extraction. By configuring these settings, you can tailor the API's behavior to fit your specific needs.
Making Your First Request
With your environment set up, you can make your first request to the API. The process is straightforward: you send a POST request to the /v1/chat/completions endpoint with your message and parameters. The API will then process your request and return a response. This response includes the generated text, which you can display to your users or process further in your application.
One important aspect of making requests is understanding the pricing model. The API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. You pay for real token usage, and errors or refusals are free. This prepaid credit system means you only pay for what you use, with no monthly fees or subscriptions. Your prepaid credit never expires, so you can use it whenever you need it.
To estimate costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you send 10,000 input tokens and receive 5,000 output tokens, you would calculate the cost based on these token counts. This allows you to budget effectively and avoid unexpected charges. It is also helpful to monitor your token usage to ensure you have enough credit for your projects.
Another consideration is the rate limit of 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. This limit is designed to prevent abuse and ensure fair usage for all users. If you need to handle higher volumes, you can implement retry logic in your code to handle these errors gracefully. By understanding the pricing and rate limits, you can build a reliable and cost-effective application.
Handling Streaming Responses
Streaming responses is a powerful feature of the API that enhances the user experience. By enabling streaming, you can display text as it is generated, rather than waiting for the entire response. This is particularly useful for chat applications where real-time feedback is expected. The API supports streaming over Server-Sent Events (SSE), which allows you to receive partial responses as they are generated.
To implement streaming in Python, you can use the OpenAI SDK's streaming functionality. You set the stream parameter to true in your request, and the SDK will yield chunks of text as they are generated. This allows you to update your UI in real-time, providing a smoother and more engaging experience for your users. The usage data, including token counts, is provided in the last chunk of the stream, which you can use for billing purposes.
One thing to note is that streaming can increase the complexity of your code, as you need to handle multiple chunks of text. However, the benefits often outweigh the additional complexity, especially for applications where speed and responsiveness are critical. By using streaming, you can create a more dynamic and interactive application that keeps users engaged.
It is also important to handle errors gracefully when using streaming. If a connection is lost or an error occurs, you should have a mechanism to retry or notify the user. This ensures that your application remains reliable and reliable, even in the face of network issues or API errors. By implementing proper error handling, you can provide a smooth experience for your users.
Managing Credits and Payments
Understanding how to manage your credits and payments is essential for using the API effectively. The API uses a prepaid credit system, which means you must top up your account before you can make requests. The top-up process is done via cryptocurrency, specifically USDT on TRC20 or USDC on Base. You can top up any whole amount from $20 to $500, and there are no top-up fees.
One benefit of the prepaid system is that your credit never expires. This allows you to use your credits whenever you need them, without the pressure of a monthly subscription. Additionally, you can receive bonus credit when you top up from $50, with bonuses ranging from 5% to 15%. This bonus credit can help you maximize your budget and get more value from your purchases.
It is important to note that the API only accepts crypto payments. You cannot pay with credit cards, PayPal, or bank transfers. This means you need to have a crypto wallet and be comfortable with cryptocurrency transactions. However, the process is straightforward, and the bonus credit can make it a cost-effective option for many developers.
When you run out of credit, you will receive a 402 error on your requests. This error indicates that you need to top up your account before you can continue using the API. By monitoring your credit balance and topping up regularly, you can ensure that your application runs smoothly without unexpected interruptions. The prepaid system provides flexibility and control over your spending.
When This API Is Not the Right Choice
While the uncensored text API is powerful, it may not be the right choice for every project. One key limitation is that it is text-only. If your application requires image generation, audio processing, or video creation, this API will not meet your needs. You would need to use a different service that supports these modalities. Additionally, the API does not support embeddings, which are useful for semantic search and recommendation systems.
Another consideration is the single model approach. The API serves only one uncensored open-weight text model. If you need access to a wide variety of models, such as different sizes or specialized models for specific tasks, this API may not be the best fit. You might need a provider that offers model routing or a larger catalog of models. However, for projects that require a consistent, uncensored text model, this API is an excellent choice.
The prepaid crypto-only payment system is also a factor to consider. If your team or users are not comfortable with cryptocurrency, this payment method might be a barrier. You would need to ensure that your users have a way to purchase and manage crypto credits. This might require additional education or support, which could add to the complexity of your project.
Finally, the lack of advanced features like fine-tuning or OCR might limit its use case. If you need to train the model on your own data or extract text from images, you would need to look elsewhere. By understanding these limitations, you can determine whether this API fits your specific needs and workflow. It is best suited for developers who need a simple, reliable, and uncensored text generation service.
Addressing Common Developer Questions
Developers often ask about alternatives to popular routing services and how to manage costs effectively. In discussions on r/webdev, users mention looking for OpenRouter alternatives due to rising expenses and the need for cost predictability. They also discuss the stability of different services and the ease of managing multiple models. Our API addresses these concerns by offering a stable, single-model service with transparent pricing.
On r/vibecoding, developers express a need for stability and low latency, noting that some routing services can be inconsistent. Our API provides a direct connection to the uncensored model, reducing the latency associated with routing. This direct approach ensures that your requests are processed quickly and reliably, which is important for real-time applications.
Users on r/aisolobusinesses also discuss the importance of cost-effective solutions. They mention that switching to budget API hosts can significantly reduce costs. Our prepaid crypto system allows you to pay only for what you use, with no hidden fees or monthly subscriptions. This pay-as-you-go model can help you manage your budget more effectively, especially for projects with variable usage.
Finally, developers on r/mlops often look for services that can handle growing usage without the complexity of routing. Our API offers a simple integration with the OpenAI SDK, making it easy to scale your application. By providing a straightforward, uncensored text API, we help developers focus on building their applications rather than managing infrastructure. This approach ensures that you can deliver a high-quality product to your users.
Frequently asked questions
How do I get an API key?
You can sign up using Google or an email and password. Your API key is shown immediately after signup, allowing you to start making requests right away.
What cryptocurrencies are accepted for top-ups?
The API accepts USDT on the TRC20 network or USDC on the Base network. You can top up any whole amount from $20 to $500.
Does the API support image generation?
No, the API is text-only. It does not support image, audio, video generation, or OCR. It is designed for text input and text output.
What happens if I run out of credit?
If you run out of credit, you will receive a 402 error on your requests. You will need to top up your account with crypto to continue using the API.