EN ▾
Get API key

Integrating Uncensored AI Model Hosted API: A Developer Checklist

Developers often struggle with configuring uncensored text-only APIs for stable streaming and reliable error handling. This guide provides a tested integration checklist, covering SDK settings for temperature and streaming, and how to handle common stream errors to ensure your application runs smoothly.

Developer workspace with laptop showing API code and crypto tokens

Understanding the API Scope and Limits

Before diving into code, it is essential to understand what this service offers and what it does not. Our API is a hosted, OpenAI-compatible chat-completions endpoint that serves a single uncensored open-weight text model. The model identifier you must send is "uncensored". Text goes in, and text comes out. There are no embeddings, no image generation, no audio or video creation, no OCR, no fine-tuning, and no model routing capabilities. If your application requires multimodal inputs or outputs, this text-only API may not be the right choice for your entire workflow. You would need to pair it with other tools for those specific tasks. The context window for this model is 100,000 tokens, which includes both the prompt and the completion together. This allows for substantial context retention, which is useful for long-form content generation or complex reasoning tasks. However, keep in mind that the model does not have memory between sessions unless you pass the context in the request. Each request is stateless, so you must manage the conversation history in your application logic. The API supports streaming over Server-Sent Events (SSE), which is important for real-time applications. You can also use function calling with tools, JSON mode, and various parameters such as temperature, top_p, stop sequences, seed, and penalties. These features allow you to fine-tune the model's behavior to fit your specific use case, if you are building a chatbot, a code assistant, or a content generator. Understanding these limits and features helps you design your integration correctly from the start.

Authentication and Account Setup

Getting started with our API is straightforward. You can sign up using Google or by providing an email and password. Once you create an account, your API key is shown immediately, allowing you to start making requests without delay. This immediate access is beneficial for quick prototyping and testing. The key is tied to your account, and you can use it to authenticate your requests to the base URL: https://api.uncensoredaimodel.cc/v1. When you make a request, ensure you include the API key in the Authorization header. If the key is invalid, you will receive a 401 error. If you run out of credit, you will get a 402 error. If you exceed the rate limit, you will receive a 429 error. These error codes are standard and help you debug your integration. It is important to handle these errors gracefully in your application to provide a good user experience. Our API offers a trial credit of $0.50 for every new account, and no credit card is needed to start. This allows you to test the API without any financial commitment. The trial credit is charged by real token usage, and errors and refusals are free. This means you can experiment with different prompts and parameters without worrying about wasting credit on failed requests. Once you exhaust the trial credit, you can top up your account with crypto. The API does not require a subscription or monthly fee. You pay only for what you use, and your paid credit never expires. This pay-as-you-go model is ideal for developers who want to avoid recurring costs. You can monitor your usage and credit balance through your account dashboard. If you need more credit, you can top up at any time. The simplicity of the authentication and account setup makes it easy to integrate the API into your workflow.

Payment Methods and Credit Management

Top-ups for our API are accepted in crypto only. You can use USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range. If you top up from $50, you receive a bonus credit ranging from +5% to +15%. This bonus credit is added to your account immediately after the payment is confirmed. It is important to note that we do not accept credit cards, PayPal, or bank transfers. If you prefer to use traditional payment methods, you may need to use a crypto exchange or wallet to convert your funds. The crypto-only payment model allows for faster transactions and lower fees. It also provides a level of anonymity for users who prefer it. However, it does require you to have a crypto wallet and some basic knowledge of how to send and receive cryptocurrency. The prepaid credit is charged by real token usage. This means you pay only for the tokens that are successfully processed. Errors and refusals do not consume credit, which is a significant advantage. You can experiment with different prompts and parameters without worrying about wasting credit. The credit never expires, so you can use it whenever you need it. This flexibility is beneficial for developers who have irregular usage patterns. To manage your credit, you can check your balance in your account dashboard. If you run out of credit, you will receive a 402 error on your next request. You can top up your account at any time to resume service. The bonus credit for larger top-ups provides an incentive to add more funds at once. This can be useful for projects with high token usage. Keep in mind that the bonus percentage varies depending on the amount you top up.

Configuring Parameters for Stable Output

To get the most out of our API, you need to configure the parameters correctly. The API supports several parameters that control the model's behavior. You can set the temperature to control the randomness of the output. A lower temperature produces more deterministic results, while a higher temperature produces more creative and varied outputs. The default temperature is usually set to a value that balances creativity and consistency. You can also set the top_p parameter to control the diversity of the output. This parameter filters the tokens based on their cumulative probability. A lower top_p value results in more focused output, while a higher value allows for more diverse responses. The stop parameter allows you to specify sequences that terminate the generation. This is useful for controlling the length of the output or stopping the generation at a specific point. The seed parameter allows you to set a random seed for reproducibility. This is useful for debugging and testing, as it ensures that the same input produces the same output. You can also set penalties to discourage certain tokens from being generated. This can help to reduce repetition or bias in the output. The API supports JSON mode, which forces the model to output valid JSON. This is useful for integrating with other systems that expect structured data. It is important to experiment with these parameters to find the best settings for your use case. You can start with the default values and adjust them based on your needs. Keep in mind that changing the parameters can affect the quality and speed of the output. You should test different combinations to find the optimal settings. The API documentation provides more details on each parameter and how it affects the model's behavior.

Implementing Streaming and Error Handling

Streaming is a key feature of our API, allowing you to receive responses in real-time. You can enable streaming by setting the stream parameter to true in your request. The API will send responses as Server-Sent Events (SSE), which you can parse in your application. This is useful for chatbots and other applications that require immediate feedback. The usage information is included in the last chunk of the stream, which allows you to track token usage accurately. Error handling is important for a reliable integration. You should handle common HTTP errors such as 401, 402, and 429. A 401 error indicates an invalid API key, which you should check in your configuration. A 402 error indicates that you have run out of credit, which you can resolve by topping up your account. A 429 error indicates that you have exceeded the rate limit of 300 requests per minute per key. You should implement exponential backoff to handle rate limits gracefully. It is also important to handle network errors and timeouts. Your application should be able to retry failed requests and handle connection issues. You can use a library or framework that provides built-in error handling for HTTP requests. This can simplify your code and make it more reliable. You should also log errors and failures to help with debugging and monitoring. Streaming can be complex to implement correctly, so it is important to test your integration thoroughly. You should test different scenarios, such as high load, network interruptions, and invalid inputs. This will help you identify any issues and fix them before deploying your application. The API documentation provides examples of how to implement streaming in various programming languages. You can use these examples as a starting point for your integration.

Estimating Costs and Budgeting

Understanding the cost structure of our API is essential for budgeting. The pricing is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This means that you pay for the tokens that are sent to the model and the tokens that are generated by the model. The total cost is the sum of the input and output costs. You can estimate your monthly spend by calculating the expected token usage and multiplying it by the per-million prices. It is important to note that errors and refusals are free. This means that you do not pay for tokens that are not successfully processed. This can help you save money on failed requests. You should also consider the cost of the trial credit, which is $0.50. This is a one-time cost that allows you to test the API before committing to a larger investment. To estimate your costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you use 100,000 input tokens and 50,000 output tokens, your cost would be (100,000 / 1,000,000) * $0.15 + (50,000 / 1,000,000) * $0.50. This calculation helps you understand the impact of token usage on your budget. You can adjust your usage to fit your budget by reducing the context window or the length of the output. It is also important to monitor your usage regularly to ensure that you are not exceeding your budget. You can check your account dashboard to see your token usage and credit balance. If you notice that your usage is higher than expected, you can investigate the cause and make adjustments. The API does not have a monthly fee, so you only pay for what you use. This makes it easy to control your costs and avoid unexpected charges.

When This API Is Not the Right Choice

While our API is powerful for text generation, it may not be the right choice for every project. If your application requires image, audio, or video generation, this text-only API will not suffice. You would need to integrate with other services that specialize in multimodal content. Similarly, if you need embeddings for vector search or fine-tuning for custom models, this API does not support those features. You would need to find a provider that offers these capabilities. Another consideration is the context window. While 100,000 tokens is generous, it may not be enough for extremely long documents or conversations. If your use case requires processing very long texts, you may need to chunk the input or use a different model. Additionally, if you need real-time voice interaction or video processing, this text-based API is not designed for those tasks. You would need to add other components to your architecture to handle those requirements. The crypto-only payment method may also be a barrier for some users. If your team or users prefer traditional payment methods like credit cards or PayPal, this API may not be the best fit. You would need to set up a crypto wallet and manage the conversion of funds. This adds a layer of complexity to the integration process. However, for users who are comfortable with crypto, the benefits of lower fees and anonymity can be significant. Finally, if you need a service with a strict SLA or specific certifications like SOC2 or HIPAA, this API may not meet those requirements. The service does not claim these certifications, so you should verify if they are necessary for your use case. If you need a provider with a guaranteed uptime or specific compliance standards, you may need to look elsewhere. For most text-based applications, however, this API provides a reliable and flexible solution.

Frequently asked questions

How do I start using the uncensored LLM API?

You can sign up with Google or an email and password to get an API key immediately. The service offers a $0.50 trial credit with no credit card required. You can then top up with USDT on TRC20 or USDC on Base.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for substantial context retention in your requests.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). You can enable this by setting the stream parameter to true in your request.

What happens if I run out of credit?

You will receive a 402 error on your next request. You can top up your account with crypto to resume service. Errors and refusals do not consume credit.