Integrating Sans Censure API for Developers
Connecting an OpenAI-compatible uncensored API to your backend requires understanding specific endpoint behaviors and token limits. This guide walks you through the integration process, ensuring you handle streaming, function calling, and error states correctly.

Understanding the Base URL and Endpoints
The foundation of your integration begins with the correct base URL. For our service, all requests must be directed to https://api.sanscensure.com/v1. This ensures that your client connects to the uncensored model rather than any other endpoint. The API follows a standard OpenAI-compatible structure, which means you can likely reuse existing client libraries or scripts with minimal modification.
You will primarily interact with the POST /v1/chat/completions endpoint for text generation. This endpoint handles the input and output of text data. If you need to retrieve model information, you can use the GET /v1/models endpoint. Additionally, the POST /v1/responses endpoint is available for specific response formats. It is important to note that this service does not support embeddings, image generation, audio, video, OCR, fine-tuning, or model routing. Keep your integration focused on text-only operations.
When building your client, ensure that you are sending the correct model identifier. The model ID to send is 'uncensored'. This identifier tells the server which specific open-weight model to use for the generation. Without this correct ID, your requests may fail or return unexpected results. Always verify that your configuration includes this specific model string in every request payload.
Since the API is text-in and text-out, you do not need to handle complex multimodal data structures. This simplifies the integration process significantly. You can focus on managing the text flow and token limits rather than dealing with image or audio encoding. This simplified approach allows for faster development cycles and easier debugging when issues arise during the integration phase.
Authentication and Key Management
Authentication is handled via API keys, which are generated immediately upon signup. You can sign up using Google or by creating an account with an email and password. Once your account is created, the API key is shown to you right away. It is important to store this key securely, as it provides access to your prepaid credit. The key is required for all API requests to authenticate your identity and deduct credits correctly.
If you receive a 401 error, it indicates an invalid key. This usually happens when the key is missing, malformed, or has been revoked. Ensure that your client sends the key in the Authorization header as specified by the OpenAI compatibility standard. A missing or incorrect key will prevent your application from accessing the model, resulting in immediate rejection of the request.
Errors also include 402 for insufficient credit and 429 for rate limits. A 402 error means you have run out of prepaid credit. Since there is no subscription or monthly fee, you must top up your account to continue using the service. The 429 error indicates that you have exceeded the rate limit of 300 requests per minute per key. If you encounter this, implement exponential backoff in your client to retry the request after a short delay.
Remember that errors and refusals are free of charge. This means that if a request fails due to a network issue or a validation error, you are not charged for those tokens. This feature helps you manage your budget effectively during development and testing phases. You can experiment with different prompts and parameters without worrying about wasting credit on failed attempts.
Token Limits and Context Window
The context window for this API is 100,000 tokens, which includes both the prompt and the completion. This large window allows for extensive conversations and detailed document processing. However, it is important to manage your input size carefully to stay within this limit. If your prompt plus the generated response exceeds 100,000 tokens, the request may be truncated or rejected depending on the implementation.
Understanding token usage is key to budgeting your credits. The price is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. To estimate costs, you can use the formula: tokens divided by 1,000,000 times the per-million price. This allows you to predict expenses before making requests. Since credit is charged by real token usage, you only pay for what is actually processed.
Prepaid credit is charged based on real token usage, and errors are free. This means you are not penalized for failed requests. The credit never expires, so you can top up when convenient. The prepaid model ensures that you always know your exact spending, with no hidden fees or subscription traps. This transparency is valuable for indie builders managing tight budgets.
When designing your application, consider how you will handle long conversations. You may need to implement a strategy to truncate older messages or summarize previous context to stay within the 100,000 token limit. This ensures that the most relevant information is retained for the model to generate accurate responses. Proper context management is essential for maintaining quality in long-form interactions.
Payment Methods and Top-Up Process
Payments for this API are accepted only in cryptocurrency. You can top up your account using USDT on the TRC20 network or USDC on the Base network. This restriction means that traditional payment methods like credit cards, PayPal, or bank transfers are not supported. You must have a crypto wallet to add funds to your account. The top-up amount can be any whole amount from $20 to $500.
There is a bonus credit system for larger top-ups. If you top up from $50, you receive a bonus ranging from +5% to +15%. This bonus credit is added to your account immediately, giving you more value for your investment. The bonus percentage may vary depending on the current promotion or the amount topped up. Check the dashboard for the exact bonus rate at the time of your purchase.
To top up, navigate to the payment section of your account and select your preferred cryptocurrency. Enter the amount between $20 and $500 and generate a deposit address. Send the exact amount from your wallet to the provided address. Once the transaction is confirmed on the blockchain, the credit is added to your account. This process is straightforward but requires familiarity with crypto transactions.
Since no cards or PayPal are accepted, ensure that your users or your own workflow is equipped to handle crypto payments. This is a key consideration for developers integrating the API into applications that might need to pass costs to end-users. You may need to build a crypto payment gateway into your app if you plan to resell access. The prepaid model ensures that you always have funds available for API calls.
API Features and Parameters
The API supports several advanced features that enhance the flexibility of your integrations. Streaming is available over Server-Sent Events (SSE), allowing you to receive responses in real-time. The usage information is included in the last chunk of the stream, so you can track token consumption as the response is generated. This is useful for building chat interfaces that feel responsive and natural.
Function calling, also known as tools, is supported. This allows the model to call specific functions defined by your application. You can define tools in your request, and the model will return structured data that triggers these functions. This is powerful for building agents that can interact with external systems or perform specific tasks based on user input.
JSON mode is available for ensuring structured output. This forces the model to return valid JSON, which is essential for programmatic processing. You can also set parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the creativity and determinism of the model. Temperature affects randomness, while top_p controls the nucleus sampling.
Penalties are also supported, allowing you to discourage certain words or phrases in the output. This can be useful for maintaining tone or avoiding repetition. The combination of these features makes the API suitable for a wide range of applications, from simple chatbots to complex AI agents. Experiment with these parameters to find the best settings for your specific use case.
When This API Is Not the Right Choice
While this API is powerful for text generation, it may not be the right choice for all projects. If you need image generation, audio processing, video creation, or OCR, this service does not support those capabilities. You will need to integrate a separate service for those tasks. The API is strictly text-in and text-out, so any multimodal requirements must be handled externally.
Similarly, if you require embeddings for vector search, fine-tuning models for your specific domain, or model routing to switch between different models, this API does not offer these features. The uncensored model is a single open-weight model, so you cannot route to other models. If your project depends on these advanced features, you may need to look for a more comprehensive API provider.
Another consideration is the payment method. If your users or your business model relies on credit cards, PayPal, or bank transfers, this API may not be suitable. Since payments are crypto-only, you must be comfortable with cryptocurrency transactions. This could be a barrier for some users who prefer traditional payment methods. Ensure that your target audience is comfortable with crypto before integrating this API.
Finally, if you need an SLA guarantee, SOC2/HIPAA/ISO certifications, or on-prem deployment, this service does not offer these. It is an independent service without those formal guarantees. If your project requires strict compliance or uptime guarantees, you may need to choose a different provider. This API is best suited for developers who value flexibility and uncensored text generation over formal certifications.
Addressing Community Questions on NSFW AI
Developers and users often discuss NSFW AI chatbots on Reddit, particularly in subreddits like r/hatethissmug and r/Best_AI_Companions. A common theme is the desire for realistic personality and memory in chatbots. Users frequently complain that many AI chat apps feel like normal chatbots with a different coat of paint, lacking genuine wit or cleverness. They want responses that feel organic rather than manufactured.
Another frequent topic is the difference between AI-generated content and human-created content. Some users argue that real fans of NSFW content prefer original stories from platforms like AO3 rather than AI-generated material. They view AI chatbots as a pastime rather than a deep emotional connection. This perspective highlights the importance of setting realistic expectations for AI companionship.
For developers building their own NSFW AI apps, the focus is often on conversation quality over image generation. Many users find that the quality of the conversation is more important than visual elements. They also value strong memory features that allow the AI to remember past interactions. This suggests that integrating memory and context management is important for creating a compelling NSFW AI experience.
Additionally, users discuss the importance of avoiding overly eager or artificial responses. A lack of genuine personality is a major limitation in many current platforms. By using an uncensored model, you can create more nuanced and realistic interactions. The key is to balance the uncensored nature of the model with a natural conversational flow. This approach can help differentiate your application from others that feel generic or forced.
Frequently asked questions
How do I top up my account?
You can top up using USDT on TRC20 or USDC on Base. The minimum amount is $20 and the maximum is $500. No credit cards or PayPal are accepted.
What is the context window size?
The context window is 100,000 tokens, including both the prompt and the completion. This allows for long conversations and detailed document processing.
Does the API support image generation?
No, the API is text-only. It does not support image, audio, video, or OCR generation. You must use a separate service for those capabilities.
What happens if I run out of credit?
You will receive a 402 error. You must top up your account with crypto to continue using the API. Errors and refusals are free of charge.