EN ▾
Open account

Integrating the Uncensored NSFW LLM API

Developers often face friction when connecting to specialized text models that lack standard corporate guardrails. This guide walks you through the technical setup of our uncensored API, from authentication to handling token limits. We focus on the specific mechanics of integration rather than marketing claims.

Developer workspace with API integration code and crypto tokens

Understanding the API Endpoint Structure

Integrating our API begins with understanding the base URL and the specific endpoints available for text generation. The service operates as a hosted solution that mimics the OpenAI chat completions interface. This allows developers to use familiar SDKs without writing custom HTTP clients from scratch. The base URL for all requests is https://api.bestnsfwllms.com/v1. This single endpoint handles all text-based interactions, ensuring a consistent experience across different client libraries.

The primary endpoint for generating responses is POST /v1/chat/completions. This endpoint accepts standard parameters such as messages, temperature, and top_p. It is designed to be a drop-in replacement for existing OpenAI integrations. You can send text in and receive text out, with the model identifier set to "uncensored". This ensures that the model does not apply standard corporate filters to lawful adult or controversial topics.

Additionally, there is a POST /v1/responses endpoint for alternative response formats. The GET /v1/models endpoint allows you to verify the available models. It is important to note that this service does not support embeddings, image generation, audio, or video. If your application requires those features, you will need to integrate a separate provider. The API is strictly for text generation, which simplifies the integration process for pure text applications.

When configuring your client, ensure that you are using the correct base URL. Any deviation will result in connection errors. The API supports streaming over Server-Sent Events (SSE), which is useful for real-time applications. The usage data is included in the last chunk of the stream, allowing you to track token consumption accurately. This structure makes it easy to integrate into existing chat interfaces or backend services.

Authentication and Key Management

Authentication is handled via API keys that are generated immediately upon signup. You can create an account using Google or by providing an email and password. The key is displayed right after creation, so you must copy it securely. This key is required for all subsequent requests to the API. If the key is invalid or missing, the API will return a 401 error. This ensures that only authorized users can access the service.

The API keys are tied to your account and are used to track usage and charge credits. It is important to keep your key secure, as anyone with the key can use your credits. The service does not support key rotation or multiple keys per account, so treat the key like a password. You can regenerate your key if it is compromised, but this will invalidate the old key.

When making requests, include the API key in the Authorization header. The format is typically Bearer . This is standard practice for most REST APIs. If you are using an SDK, it usually handles this header automatically. Make sure to configure the SDK with your specific key to avoid authentication errors. The API will reject requests with invalid keys, so double-check your configuration.

Errors related to authentication are straightforward to resolve. A 401 error indicates an invalid key, while a 402 error indicates that you have run out of credit. A 429 error means you have hit the rate limit. Understanding these errors helps you debug integration issues quickly. The API is designed to be predictable, making it easier to handle errors in your application logic.

Configuring Parameters for Text Generation

The API supports a range of parameters that allow you to fine-tune the output of the model. You can adjust the temperature to control the randomness of the responses. A higher temperature results in more creative and varied outputs, while a lower temperature produces more deterministic results. The top_p parameter allows you to control the nucleus sampling, which affects the diversity of the text.

You can also specify stop sequences to halt the generation at specific points. This is useful for controlling the length of the output or for stopping at certain markers. The seed parameter allows you to reproduce specific outputs by setting a random seed. This is helpful for testing and debugging, as it ensures that the same input produces the same output.

The API also supports penalties, which can be used to discourage certain tokens or patterns. This is useful for avoiding repetitive or unwanted content. The context window for the model is 100,000 tokens, which includes both the prompt and the completion. This large context window allows for long conversations and detailed inputs. It is important to manage your input size to stay within this limit.

When configuring these parameters, it is best to start with the defaults and adjust based on your needs. The API is designed to be flexible, allowing you to experiment with different settings. You can also use JSON mode to enforce a specific output format. This is useful for applications that require structured data. The API handles these parameters efficiently, ensuring that your requests are processed quickly.

Handling Crypto Top-ups and Credits

The API uses a prepaid credit system based on token usage. You can top up your account using cryptocurrency, specifically 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. This flexibility allows you to manage your budget according to your usage needs.

When you top up, you may receive bonus credit if you contribute $50 or more. The bonus ranges from 5% to 15%, depending on the amount. This bonus is added to your account immediately, giving you more tokens to use. The credit never expires, so you can top up whenever you need more. This is a significant advantage over subscription-based models, as you only pay for what you use.

The pricing is $0.15 per million input tokens and $0.50 per million output tokens. These rates are charged based on real token usage. Errors and refusals are free, so you are not charged for failed requests. This makes the API cost-effective for developers who are testing or experimenting with different prompts. The credit system is transparent, allowing you to track your usage and costs accurately.

To top up, you need to send the desired amount of crypto to the provided address. The system then credits your account with the corresponding tokens. You can check your balance and usage in your account dashboard. The process is straightforward, and the credits are available immediately after the transaction is confirmed. This ensures that you can start using the API without delay.

When This API Is Not the Right Choice

While this API is excellent for text generation, it is not suitable for applications that require multimodal capabilities. If your project needs image generation, video creation, or audio processing, this API will not meet your needs. The service is strictly text-based, with no support for embeddings, OCR, or fine-tuning. Developers looking for a comprehensive AI solution may need to integrate multiple providers.

The API also does not offer an SLA, certifications like SOC2 or HIPAA, or on-prem deployment options. If your organization requires strict compliance or data residency controls, this hosted service may not be the best fit. The service is designed for developers who need a simple, uncensored text model without the overhead of enterprise features.

Additionally, the API does not support model routing or multiple model selection. You are limited to the single uncensored model provided. If you need to switch between different models for different tasks, you will need to manage this logic in your application. The API is best suited for projects that require a consistent, uncensored text output.

Finally, the API does not offer a free unlimited tier or a free trial beyond the initial $0.50 credit. If you need a long-term free tier for testing, this may not be the ideal solution. The service is designed for developers who are ready to pay for usage and want a straightforward, no-nonsense text API. Consider your specific requirements before integrating.

Addressing Common Developer Questions

Developers often ask about the performance of uncensored models compared to standard ones. Many users on Reddit discuss the trade-offs between speed and creativity. Some users note that uncensored models can be slower or require more VRAM when run locally. However, when using a hosted API, the performance is generally consistent and fast. The main difference is in the output style, which is less filtered and more direct.

Another common question is about the accuracy of the model. Users often compare the uncensored model to popular vendors like OpenAI or Anthropic. While the uncensored model may not have the same benchmark scores as leading models, it excels in creative writing and roleplay. Developers should test the model with their specific prompts to see if it meets their needs. The model is designed to handle a wide range of topics without refusal.

Users also inquire about the ease of integration. Since the API is OpenAI-compatible, many developers find it easy to switch from other providers. The main challenge is handling the specific parameters and error codes. The API provides clear documentation and support for common issues. Developers are encouraged to start with small tests to ensure compatibility with their existing code.

Finally, there is discussion about the cost-effectiveness of the service. Users appreciate the pay-per-token model, which allows for precise budgeting. The crypto-only payment method is a niche feature that appeals to those who prefer privacy. Overall, the feedback from the developer community is positive, with many finding the API to be a reliable solution for uncensored text generation.

Best Practices for Integration

To ensure a smooth integration, it is recommended to start with a small test request. This helps you verify that your API key is correct and that your SDK is configured properly. You can use the GET /v1/models endpoint to check the available models. This is a good way to confirm that your connection is working before sending heavy loads.

Monitor your token usage closely, especially during the initial testing phase. The API provides usage data in the streaming responses, which you can use to track costs. This helps you avoid unexpected charges and ensures that you stay within your budget. You can also set up alerts for low credit balances to prevent service interruptions.

Handle errors gracefully in your application. The API returns specific error codes for different issues, such as 401 for invalid keys and 429 for rate limits. Implementing retry logic for rate limit errors can improve the reliability of your application. It is also good practice to log errors for debugging purposes. This helps you identify and resolve issues quickly.

Finally, consider the limitations of the API when designing your application. Since the API is text-only, you may need to integrate other services for multimedia features. The API is best suited for chatbots, content generation, and data processing tasks. By understanding these limitations, you can design a more reliable and efficient application.

Frequently asked questions

How do I top up my credit?

You can top up your credit using USDT on the TRC20 network or USDC on the Base network. The minimum amount is $20, and the maximum is $500. Credits are added immediately after the transaction is confirmed.

What happens if I run out of credit?

If you run out of credit, the API will return a 402 error. You will need to top up your account to continue using the service. Errors and refusals are free, so you are not charged for failed requests.

Can I use the API for image generation?

No, the API is strictly for text generation. It does not support image, audio, or video generation. If you need multimedia features, you will need to integrate a separate provider.

Is the API compatible with OpenAI SDKs?

Yes, the API is OpenAI-compatible. You can use the standard OpenAI SDKs by pointing them to the base URL https://api.bestnsfwllms.com/v1. This makes it easy to integrate into existing applications.