EN ▾
Get API key

Integrating an Uncensored LLM API into Python Workflows

Developers often need a reliable text-in, text-out interface for automation scripts that require minimal moderation. This guide shows how to integrate our uncensored LLM API into Python workflows using standard HTTP requests.

Server rack with data streams representing API integration

Setting Up Your Environment

Before you can send requests, you need to register an account and obtain your API key. You can sign up using Google or an email and password combination. Once registered, your API key is displayed immediately on the dashboard. This key is required for all subsequent requests to authenticate your identity against our service.

The base URL for our API is https://api.uncensoredvideogenerator.com/v1. You should configure this URL in your Python environment variables or configuration files. Using environment variables prevents hardcoding sensitive keys in your source code. This is a standard practice for maintaining security in production scripts.

You do not need to install any specialized SDKs to use the API. Standard Python libraries like requests or httpx are sufficient for making HTTP calls. This simplicity allows you to integrate the API into existing projects without adding heavy dependencies. The API follows standard OpenAI-compatible formats, making it easy to swap out if needed.

Ensure your Python environment is up to date. While the API itself does not require specific Python versions, using a modern version ensures compatibility with async libraries if you choose to implement asynchronous requests. This setup provides a stable foundation for your automation scripts.

Making Your First Request

To generate text, you send a POST request to the /v1/chat/completions endpoint. The request body must include your API key in the Authorization header and the model name uncensored in the payload. This model is the only one available for text generation in our service. It supports text input and text output without additional media processing.

The request body should follow the standard chat completion format. You must provide a messages array containing your prompts. The system accepts both system and user roles for defining the conversation context. This structure allows for complex interactions where you can set behavior instructions via the system message.

Our API does not support embeddings, image generation, audio, video, or OCR. It is strictly a text-in, text-out service. If your workflow requires image processing, you will need to handle those steps separately. The API focuses solely on generating text responses based on your prompts.

Errors such as 401 (invalid key) or 402 (no credit) will be returned if authentication fails or if your prepaid balance is insufficient. Rate limits are enforced at 300 requests per minute per key. Monitoring these limits helps prevent interruptions in your automated workflows.

Handling Streaming Responses

For real-time feedback, our API supports streaming over Server-Sent Events (SSE). This is particularly useful for long-running scripts where you want to display output as it is generated. Streaming allows you to process tokens individually rather than waiting for the entire response.

To enable streaming, set the stream parameter to true in your request. The API will send a series of chunks, each containing a portion of the generated text. The final chunk includes usage statistics, allowing you to track token consumption accurately. This feature is essential for building interactive chat interfaces or live data pipelines.

Implementing streaming in Python requires handling the SSE stream correctly. You can use libraries like requests with streaming enabled or httpx for async support. Parsing the SSE format involves splitting the response by newlines and extracting the data field from each event.

Streaming does not affect the pricing model. You are still charged based on the total tokens used, regardless of whether the response is streamed or not. This ensures consistent billing while providing a better user experience for applications that display text in real-time.

Managing Credits and Costs

Our API uses a prepaid credit system charged by real token usage. There are no monthly subscriptions or fees. You can top up your account using crypto, specifically USDT on TRC20 or USDC on Base. Payments range from $20 to $500, with bonus credit available for deposits of $50 or more.

The pricing is $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals are free, so you are not charged for failed requests. This model allows you to budget precisely based on your actual usage. You can monitor your balance through the dashboard to avoid unexpected service interruptions.

Prepaid credit never expires, giving you flexibility in when you use your funds. You do not need to worry about monthly renewals or losing unused balance. This is ideal for developers who work on projects intermittently or have variable usage patterns.

When integrating with Python, you should implement logic to check your balance before sending large batches of requests. This prevents your script from halting mid-execution due to insufficient funds. You can also set up alerts for low balance to ensure continuous operation.

Parameters and Configuration

The API supports several parameters to control text generation. You can set the temperature to adjust randomness, top_p for nucleus sampling, and stop sequences to halt generation at specific points. The seed parameter allows you to reproduce results by fixing the random state.

Penalties can be applied to discourage repetitive or unwanted tokens. These parameters give you fine-grained control over the output quality. Adjusting these settings is important for optimizing the performance of your automation scripts, especially when dealing with specific content requirements.

Function calling and JSON mode are also supported. This allows you to integrate the API into workflows that require structured data output. You can define tools and schemas to ensure the model returns data in a format your script can easily parse.

The context window is 100,000 tokens, covering both prompt and completion. This large window allows for extensive context retention, which is beneficial for long documents or complex conversations. Ensure your prompts fit within this limit to avoid truncation.

When This API Is Not the Right Choice

Our API is designed for text-only interactions. If your workflow requires image, audio, or video generation, this service is not the right choice. You would need to use a different provider that supports multimodal outputs. The API does not handle OCR, fine-tuning, or model routing.

Additionally, if you need high availability guarantees or specific certifications like SOC2 or HIPAA, this service may not meet your needs. We do not claim SLA percentages or enterprise-level compliance. For critical applications requiring these features, you should evaluate other vendors.

If you require real-time translation or search capabilities, our API does not support these natively. You would need to integrate additional tools or services to achieve these functions. The API focuses on generating text based on your prompts without additional data processing.

Finally, if you prefer card or PayPal payments, this service may not be suitable. We accept only crypto top-ups. Ensure that your payment preferences align with our crypto-only model before integrating. This avoids potential friction in the billing process.

Addressing Common Developer Questions

Developers often ask how to handle NSFW content in their scripts. Our model does not refuse lawful adult, fictional, or controversial topics, making it suitable for uncensored generation. However, it refuses sexual content involving minors. This distinction is important for content filters in your workflow.

Another common question is how to manage rate limits. With 300 requests per minute, you can implement exponential backoff strategies in your Python scripts. This ensures that your automation runs smoothly without hitting the limit too frequently. Monitoring your request rate helps maintain stability.

Users also inquire about the quality of text generation. The model supports various parameters for fine-tuning output. Experimenting with temperature and top_p can help you achieve the desired tone and coherence. This flexibility allows you to customize the API for different use cases.

Finally, developers want to know how to test the API efficiently. Using the trial credit of $0.50 allows you to send test requests without spending your main balance. This is a great way to verify your integration before scaling up your workflow. It ensures that your scripts are ready for production use.

Frequently asked questions

How do I get my API key?

Sign up using Google or email and password. Your key is displayed immediately after registration. Use this key in the Authorization header for all requests.

What payment methods are accepted?

We accept only crypto: USDT on TRC20 or USDC on Base. Payments range from $20 to $500. No cards, PayPal, or bank transfers are supported.

Can I generate images with this API?

No, this is a text-only API. It does not support image, audio, video, or OCR generation. Use it for text-in, text-out workflows.

What happens if I run out of credit?

You will receive a 402 error. Top up your account using crypto to resume service. Errors and refusals are free, so you are not charged for failed requests.