Integrating an Uncensored Text API: Step-by-Step Checklist
Engineers often ask how to connect a standard OpenAI-compatible client to an unmoderated backend without losing functionality. This guide provides a tested integration checklist, covering SDK configuration, endpoint setup, and verification steps for a pure text-in, text-out workflow.

Understanding the API Endpoint Structure
Before writing any code, you need to identify the correct base URL for the service. The API is hosted at https://api.aiunmoderated.com/v1. This base URL is the foundation for all subsequent requests. Unlike some providers that offer multiple endpoints for different model types, this service focuses strictly on chat completions and responses. You will not find endpoints for embeddings, image generation, or audio processing. This simplicity reduces the complexity of your integration, as you only need to manage text inputs and outputs.
The primary endpoint for generating text is POST /v1/chat/completions. This endpoint follows the standard OpenAI format, making it easy to use with existing libraries. You send a JSON payload containing your messages and receive a JSON response with the generated text. The second endpoint, POST /v1/responses, offers an alternative format for responses, which may be useful depending on your client's requirements. Both endpoints accept the same model ID and parameters, ensuring consistency in your integration.
You can also use GET /v1/models to retrieve information about available models. This endpoint confirms that the 'uncensored' model is available and provides details about its capabilities. This is a good first step to verify your connection before sending heavy workloads. It also helps you confirm that the service is up and running. If this endpoint fails, you know the issue is with your network or authentication, not the model itself.
Keep in mind that this service does not support fine-tuning or model routing. You are working with a single uncensored open-weight model. This means you cannot switch between different model versions or fine-tune the model for specific tasks. The focus is on providing a flexible, unmoderated text generation experience. This limitation is a trade-off for the uncensored nature of the model. It simplifies the integration process, as you do not need to manage multiple model configurations.
Configuring the Client and Authentication
Authentication is handled via API keys, which are generated when you sign up. You can sign up using Google or an email and password. The key is shown immediately after signup, so make sure to copy it securely. This key is used to authenticate all your requests. If the key is invalid, you will receive a 401 error. This error indicates that the key is either incorrect or has been revoked. You should check your account to ensure the key is active.
When configuring your client, set the API key in the Authorization header. Most OpenAI-compatible libraries allow you to set the API key as a simple string. This string is then used to authenticate your requests. Make sure to keep this key secure and do not expose it in public repositories. The key is tied to your account and your prepaid credit balance. If you lose the key, you may need to generate a new one, which could affect your ability to access the service.
It is important to note that the service does not offer a free tier or monthly subscription. You pay for what you use. The trial credit of $0.50 is available for new accounts, but it is not a recurring benefit. Once the trial credit is exhausted, you need to top up your account. The trial credit allows you to test the API without committing to a purchase. This is a good way to verify that the integration works before spending real money.
Errors are handled gracefully. If you run out of credit, you will receive a 402 error. This error indicates that you need to top up your account. The service does not charge for errors or refusals, so you only pay for successful token usage. This is a significant advantage for developers who want to experiment without risking large bills. You can test your integration extensively without worrying about accumulating costs.
Sending Requests and Handling Responses
When sending requests, you must specify the model ID as 'uncensored'. This model ID is the only one available on this service. You send a JSON payload containing your messages, which can include system prompts, user messages, and assistant messages. The service processes these messages and generates a response. The response is returned in JSON format, containing the generated text and metadata about the request.
The context window for this service is 100,000 tokens. This includes both the prompt and the completion. This large context window allows you to send long documents or conversations without losing information. It is important to manage your token usage carefully, as you are charged for both input and output tokens. The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. This pricing structure is transparent and easy to calculate.
You can use streaming to receive responses in real-time. The service supports Server-Sent Events (SSE) for streaming. This allows you to display the generated text as it is produced, providing a better user experience. The usage information is included in the last chunk of the stream, so you can track your token consumption in real-time. This is particularly useful for long-running conversations or large text generation tasks.
Function calling is also supported, allowing you to define tools that the model can use. You can specify tools in your request, and the model will return a function call if appropriate. This feature is useful for building agents or applications that need to interact with external systems. The JSON mode is available for structured output, ensuring that the model returns data in a specific format. This is helpful for parsing the response in your application.
Managing Credits and Pricing
The service operates on a prepaid credit system. You top up your account using cryptocurrency, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range. The service does not accept credit cards, PayPal, or bank transfers. This crypto-only approach allows for fast and borderless transactions.
Bonus credit is available for top-ups of $50 or more. The bonus ranges from 5% to 15%, depending on the amount you top up. This bonus credit gives you more value for your money. It is a good incentive for larger top-ups, especially for developers who expect high usage. The bonus credit is added to your account immediately after the top-up is confirmed.
Your prepaid credit never expires. This means you can top up your account whenever you want and use the credit at your own pace. There is no monthly fee or subscription required. You only pay for the tokens you use. This flexibility is advantageous for developers who have irregular usage patterns. You do not need to worry about losing your credit if you do not use it for a while.
Errors and refusals are free. If the model refuses a request due to the hard content limit, you are not charged for that request. The hard content limit prohibits sexual content involving minors. Requests that violate this limit are refused, and no tokens are consumed. This is a significant benefit, as you only pay for successful generations. It allows you to experiment with different prompts without worrying about accumulating costs for refused requests.
When This API Is Not the Right Choice
While this API is excellent for uncensored text generation, it may not be the right choice for all use cases. If you need image generation, audio processing, or video creation, this service does not support those features. It is a pure text-in, text-out API. You cannot use it to generate images or transcribe audio. If your application requires multimodal capabilities, you may need to combine this API with other services.
Similarly, if you need fine-tuning or model routing, this service does not offer those features. You are working with a single uncensored model. You cannot fine-tune the model for specific tasks or switch between different model versions. This limitation is a trade-off for the simplicity and uncensored nature of the service. If you need advanced model management, you may need to look elsewhere.
The service also does not offer an SLA or certifications like SOC2 or HIPAA. If your application requires strict compliance with these standards, this service may not be suitable. You are an independent service, and the provider does not claim to meet these specific certification requirements. If compliance is critical for your use case, you should verify the service's data handling practices.
Finally, if you need a free unlimited tier, this service may not be the best fit. It operates on a prepaid credit system, and you need to top up your account to continue using the API. The trial credit is only $0.50, which is not enough for extensive use. If you need a free tier with no usage limits, you may need to consider other options. However, for developers who need uncensored text generation and are willing to pay for usage, this service is a strong candidate.
Addressing Common Developer Questions
Developers frequently ask about the latency and performance of the API. Some threads discuss the speed of local TTS models, noting that ultra-low latency is a significant advantage. While this API is for text generation, the same principle applies. Developers want to know if the API can handle real-time interactions without noticeable delays. The service supports streaming, which helps mitigate latency issues by delivering responses incrementally.
Another common question is about the availability of different languages. Some developers are interested in voice cloning and multilingual support. While this API is text-based, the underlying model supports multiple languages. Developers can use the API to generate text in various languages, which can then be fed into a TTS engine for voice output. This flexibility allows for a wide range of applications.
Users also ask about the reliability of the API. Some threads discuss the stability of local models and the risk of rate-limiting. The service offers a rate limit of 300 requests per minute per key. This limit is generally sufficient for most applications, but heavy users may need to manage their request rate. The service does not claim an SLA, so users should be prepared for occasional variability in performance.
Finally, developers often inquire about the ease of integration. The API is OpenAI-compatible, which means it can be used with existing libraries and tools. This compatibility reduces the learning curve for developers who are already familiar with the OpenAI API. The service provides clear documentation and examples, making it easy to get started. The combination of simplicity and flexibility makes it a popular choice for indie builders and small teams.
Testing and Verification Steps
After setting up your client, it is important to test the integration thoroughly. Start by sending a simple request to the GET /v1/models endpoint to verify your connection. This will confirm that your API key is valid and that you can reach the service. If this step fails, check your network connection and API key.
Next, send a request to the POST /v1/chat/completions endpoint with a simple message. Verify that you receive a valid response containing the generated text. Check the response format to ensure it matches the expected structure. This step confirms that the API is processing your requests correctly.
Test the streaming functionality by sending a request with the stream parameter set to true. Verify that you receive chunks of text as they are generated. This step ensures that the streaming feature is working as expected. It is also a good opportunity to check the usage information in the last chunk to verify your token consumption.
Finally, test the function calling feature by defining a tool and sending a request that triggers the tool. Verify that the model returns a function call as expected. This step confirms that the function calling feature is working correctly. Once all these tests pass, you can be confident that your integration is successful and ready for production use.
Frequently asked questions
How do I top up my account?
You can top up your account using USDT on TRC20 or USDC on Base. The minimum amount is $20, and the maximum is $500. Bonus credit is available for top-ups of $50 or more.
What happens if I run out of credit?
If you run out of credit, you will receive a 402 error. You need to top up your account to continue using the API. Errors and refusals are free, so you only pay for successful token usage.
Can I use this API for image generation?
No, this API is for text generation only. It does not support image, audio, or video generation. You can use it to generate text, which can then be fed into other services for multimodal tasks.
Is there a free tier?
There is no free tier, but new accounts receive $0.50 of trial credit. This allows you to test the API without committing to a purchase. The trial credit does not expire, but it is not a recurring benefit.