EN ▾
Start now

Integrating an Uncensored LLM API: A Developer Checklist

Connecting an uncensored endpoint to your agentic workflow requires more than just swapping a base URL. You must handle streaming, function calling, and token limits carefully to ensure stability. This checklist covers the essential integration steps for developers using this specific service.

Developer workspace with laptop and API network visualization

Understanding the Uncensored Endpoint

When integrating an uncensored LLM API, the first step is understanding what the model actually does. This service provides a hosted, OpenAI-compatible chat-completions endpoint. The model ID you must send is simply "uncensored". It is a single, open-weight text model that takes text in and returns text out. There are no embeddings, image generation, or audio features. This simplicity is a feature, not a limitation, for developers who only need raw text generation.

The base URL for all requests is https://api.apertusia.com/v1. You will interact with three main endpoints: POST /v1/chat/completions for generating responses, POST /v1/responses for alternative response formats, and GET /v1/models to verify available models. Since the model is uncensored, it does not refuse lawful adult, fictional, or controversial topics. However, it does refuse requests involving sexual content with minors. Your integration should account for this hard limit in your data pipeline.

Unlike many competitors, this API does not require a subscription or monthly fee. You pay only for what you use. The pricing is straightforward: $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals are free, which means you do not pay for failed attempts. This model is ideal for developers who want predictable costs without hidden subscription traps. You can top up credit using crypto, ensuring no personal financial data is tied to your account.

Before you write any code, ensure you understand the context window. The model supports a 100,000 token context window, which includes both the prompt and the completion. This is large enough for most agentic workflows that involve reading long documents or maintaining long conversation histories. However, it is not infinite. You must implement logic to manage the context window to avoid truncation or excessive token usage. This checklist will help you build that logic correctly.

Authentication and Key Management

Authentication is handled via API keys. When you sign up, you can use Google or an email and password combination. The key is shown immediately upon creation, so save it securely. You will include this key in the Authorization header of your requests. If the key is invalid, you will receive a 401 error. If you run out of credit, you will receive a 402 error. These errors are free, so you do not pay for authentication failures.

It is important to manage your API keys securely. Since the key is shown only once, ensure your development environment stores it safely. You can generate multiple keys if needed, but each key is tied to your account's credit balance. If you lose your key, you may need to generate a new one. The API does not support key rotation in the traditional sense, so treat each key as a permanent credential.

When integrating with your agentic workflow, ensure that your SDK is configured to send the key correctly. Most OpenAI-compatible SDKs allow you to set the API key directly. Verify that the key is not being logged in plain text in your application logs. This is a best practice for any API integration, but especially important for uncensored services where data privacy might be a concern.

Remember that the key is the only way to access your credit. If you share your key, others can use your credit. Monitor your usage regularly to ensure you are not being drained unexpectedly. The API does not offer a free unlimited tier, so every request counts. Use the trial credit of $0.50 to test your integration before committing to a top-up. This trial requires no card, making it easy to verify your setup.

Configuring SDK Settings for Streaming

One of the most important features of this API is streaming over Server-Sent Events (SSE). This allows you to receive tokens as they are generated, which is essential for agentic workflows that need real-time feedback. When you make a request, set the stream parameter to true. The API will send a series of chunks, with the final chunk containing the usage statistics. This is how you track token consumption in real-time.

Your SDK should be configured to handle these chunks correctly. Most modern SDKs support streaming out of the box. You need to ensure that your code accumulates the tokens and processes them as they arrive. This is particularly useful for building chat interfaces or agents that need to display progress. The usage in the last chunk gives you the total tokens used for that request, allowing you to update your credit balance accurately.

Function calling is also supported, which is important for agentic workflows. You can define tools in your request, and the model will return structured JSON that your agent can execute. This allows the model to interact with external systems, such as databases or APIs, without you needing to parse raw text. Ensure your SDK is configured to handle the tool calls correctly, as this is a key feature of modern LLM integrations.

Parameters like temperature, top_p, stop, and seed allow you to control the model's behavior. Temperature affects randomness, while top_p controls the nucleus sampling. Stop sequences allow you to halt generation at specific points. Seed ensures reproducibility for testing. These parameters are standard in OpenAI-compatible APIs, so your existing knowledge should transfer easily. Experiment with these settings to find the right balance for your use case.

Handling Errors and Rate Limits

Errors are a part of any API integration. This API returns specific error codes to help you debug. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error indicates a rate limit. The limit is 300 requests per minute per key. If you exceed this, you will need to wait or implement backoff logic in your agent.

Rate limiting can be a bottleneck for agentic workflows that make many rapid requests. You should implement exponential backoff in your code to handle 429 errors gracefully. This prevents your agent from flooding the API and causing further rate limit issues. Monitor your usage to ensure you are not hitting the limit too frequently, especially if you have multiple agents using the same key.

Errors and refusals are free, which is a significant advantage. If the model refuses a request due to the hard content limit, you do not pay. This means you can retry requests without worrying about cost. However, if you hit the rate limit, you still need to wait. Plan your agent's workflow to account for these delays, especially if you have time-sensitive tasks.

It is also important to handle network errors. While the API is hosted, network issues can still occur. Implement retries for transient errors to ensure your agent does not fail due to temporary connectivity issues. This is a best practice for any API integration, but it is especially important for uncensored services that may have higher traffic volumes.

When This API Is Not the Right Choice

While this API is powerful for text generation, it is not suitable for every use case. If you need image generation, audio processing, or video creation, this API will not meet your needs. It is a text-only model, so any multi-modal tasks must be handled by other services. Similarly, if you need embeddings for vector search, you will need to integrate a separate embedding API.

Fine-tuning is another capability this API does not offer. If you need to train the model on your specific data, you will need to use a different service. The model is fixed, so you cannot customize its behavior through fine-tuning. This is a trade-off for the simplicity and uncensored nature of the model. If you need a model that adapts to your data, this may not be the right choice.

Model routing is also not supported. This API serves a single model, so you cannot switch between different models based on the task. If you need to use a smaller model for simple tasks and a larger model for complex ones, you will need to implement that logic in your agent. This adds complexity but allows for more flexibility.

Finally, if you need an SLA or certifications like SOC2 or HIPAA, this API may not be the right fit. It is an independent service that does not claim these certifications. If you are building a product for enterprise clients who require strict compliance, you may need to use a different provider. However, for indie builders and developers who value uncensored text generation, this API is an excellent choice.

Addressing Common Developer Questions

Developers frequently ask how to link uncensored APIs to agentic workflows, such as those using Blackbox or Kryven's API. The key is to treat the API as a standard OpenAI-compatible endpoint. You can send requests to the chat completions endpoint and handle the responses in your agent's logic. This allows you to integrate the uncensored model into your existing workflow without major changes.

Another common question is whether the API is suitable for low-cost testing. With a $0.50 trial credit and no card required, it is an excellent option for testing. You can verify your integration before committing to a top-up. This is particularly useful for developers who want to experiment with uncensored models without financial risk.

Some developers also ask about crypto payments. The API supports USDT on TRC20 and USDC on Base, with amounts between $20 and $500. You can also receive bonus credit for larger top-ups. This flexibility allows you to choose the crypto that suits your needs. The process is straightforward: top up your credit and start using the API.

Finally, developers often wonder about the model's behavior. The model is uncensored, meaning it does not refuse lawful adult or controversial topics. However, it does refuse sexual content involving minors. This is a hard limit, so your agent should be prepared to handle these refusals. Test your integration with various prompts to understand the model's boundaries.

Final Checklist for Smooth Integration

Before deploying your integration, ensure you have completed the following checklist. First, verify that your API key is correct and stored securely. Second, confirm that your SDK is configured for streaming and function calling. Third, implement error handling for 401, 402, and 429 errors. Fourth, test your agent with various prompts to understand the model's behavior.

Next, check your token budget. Ensure you have enough credit to cover your expected usage. If you are using the trial credit, monitor it closely to avoid running out. Remember that errors are free, so you can retry requests without cost. However, rate limits are strict, so plan your agent's workflow accordingly.

Finally, review your code for any potential issues. Ensure that you are handling SSE chunks correctly and that your agent can process function calls. Test your integration with a variety of inputs to ensure it is reliable. Once you are satisfied with the results, deploy your agent and monitor its performance. This API is a powerful tool for developers who need uncensored text generation.

Frequently asked questions

How do I handle streaming responses?

Set the stream parameter to true in your request. The API will send Server-Sent Events (SSE) chunks. Your SDK should accumulate these tokens. The final chunk includes usage statistics for tracking token consumption.

What happens if I run out of credit?

You will receive a 402 error. Errors are free, so you do not pay for the failed request. You can top up credit using crypto to resume usage. The API does not charge for refusals or errors.

Can I use this API for image generation?

No, this API is text-only. It does not support image, audio, or video generation. If you need multi-modal capabilities, you will need to integrate a separate service for those tasks.

How do I top up my credit?

You can top up using USDT on TRC20 or USDC on Base. Amounts range from $20 to $500. Bonus credit is available for larger top-ups. No cards or PayPal are accepted.