Integrating Uncensored AI: API Key Setup and SDK Checklist
Integrating an uncensored text API requires careful attention to authentication and response handling. This guide walks you through setting up your API key, configuring your SDK, and ensuring your application handles text-in, text-out requests reliably.

Understanding the API Base URL and Endpoints
The foundation of any integration is knowing where to send your requests. Our API operates on a single base URL: https://api.unfilteredaigpt.com/v1. This is the root address for all your API calls. You will interact with three primary endpoints to manage your integration. The first is POST /v1/chat/completions, which is the standard endpoint for generating text responses. The second is POST /v1/responses, which offers an alternative format for handling completions. The third is GET /v1/models, which allows you to retrieve information about the available models.
It is important to note that this service is focused strictly on text generation. The API serves one uncensored open-weight text model, identified by the model ID uncensored. You do not need to specify a complex model name; simply using uncensored as the model identifier is sufficient. The API accepts text input and returns text output. It does not support embeddings, image generation, audio, video, OCR, fine-tuning, or model routing. Keeping this scope in mind helps you design your application architecture correctly without over-engineering for features that are not present.
When constructing your API calls, ensure that you use the correct HTTP methods for each endpoint. The chat and response endpoints require POST requests, while the models endpoint uses a GET request. This distinction is important for proper communication with the server. Additionally, the API follows an OpenAI-compatible format, which means that if you are already familiar with OpenAI's API structure, you will find the transition smooth. However, always refer to our specific documentation for any nuances unique to our service.
Understanding the base URL and endpoints is the first step in a successful integration. By keeping the focus on text-based interactions and using the correct endpoints, you can build a reliable application that uses the uncensored capabilities of our API. Remember that the model ID uncensored is the key to accessing the specific model that powers this service. This simplicity allows for rapid development and deployment of your AI-driven features.
Setting Up Authentication and API Keys
Authentication is the gateway to using our API. You can sign up using Google or by creating an account with an email and password. Upon signup, your API key is displayed immediately, so make sure to copy it securely. This key is essential for authenticating your requests. You must include the API key in the Authorization header of your HTTP requests. This header typically follows the format Bearer YOUR_API_KEY. Without a valid key, your requests will be rejected with a 401 error, indicating an invalid key.
The trial account provides $0.50 of trial credit, which requires no credit card. This is an excellent way to test the API without any financial commitment. Your trial credit allows you to make requests and see how the API responds. Once you have verified that your integration works correctly, you can proceed to top up your account with prepaid credit. The trial credit is a great way to ensure that your authentication setup is correct before scaling up your usage.
When managing your API keys, it is important to keep them secure. Do not expose your key in public repositories or client-side code. Use environment variables or secure storage mechanisms to store your key. If you suspect your key has been compromised, you can generate a new one from your dashboard. The key is shown immediately after signup, so ensure you have a secure place to store it from the beginning. This practice helps prevent unauthorized access to your account and ensures that your usage is tracked accurately.
Authentication is a critical component of any API integration. By setting up your API key correctly and keeping it secure, you can ensure that your application has reliable access to the uncensored text model. Remember that the key is your identity within the system, and treating it with care will help you avoid common pitfalls. Use the trial credit to test your authentication logic thoroughly before moving to a paid account.
Configuring SDK Settings for Text Generation
Configuring your SDK correctly is essential for smooth integration with our API. The API supports streaming over Server-Sent Events (SSE), which allows you to receive responses in real-time. This is particularly useful for chat applications where you want to display text as it is generated. The usage information is included in the last chunk of the stream, so you can track token consumption accurately. When setting up your SDK, ensure that you enable streaming if you want this real-time experience.
The API also supports function calling, JSON mode, and various parameters such as temperature, top_p, stop sequences, seed, and penalties. These parameters allow you to fine-tune the behavior of the model. For example, you can use the temperature parameter to control the randomness of the output. A higher temperature results in more creative responses, while a lower temperature produces more deterministic outputs. The top_p parameter controls the diversity of the output by filtering tokens based on their probability mass.
JSON mode is a useful feature if you need structured output from the API. By enabling JSON mode, you can ensure that the model returns its response in a valid JSON format. This is particularly helpful for applications that need to parse the response programmatically. The stop parameter allows you to specify sequences that will terminate the generation. This can be useful for controlling the length of the response or stopping generation at specific points.
When configuring your SDK, take advantage of these features to build a more reliable application. Streaming, function calling, and JSON mode are powerful tools that can enhance the user experience. By understanding how to use these parameters, you can tailor the API's behavior to your specific needs. Remember to test your configuration thoroughly to ensure that it meets your requirements. The ability to fine-tune the model's output is a key advantage of using our API.
Handling Errors and Rate Limits
Errors are a natural part of any API integration. Our API returns specific error codes to help you diagnose issues. A 401 error indicates an invalid API key, which means you need to check your authentication header. A 402 error indicates that you have no credit left in your account. This is common if you have exhausted your trial credit or prepaid balance. A 429 error indicates that you have hit the rate limit of 300 requests per minute per key. If you encounter a 429 error, you should implement exponential backoff in your application to retry the request after a short delay.
It is important to handle these errors gracefully in your application. Displaying a user-friendly message when a 402 error occurs can help users understand why their request failed. Similarly, implementing retry logic for 429 errors can prevent your application from failing when it hits the rate limit. By handling errors effectively, you can provide a better user experience and reduce the likelihood of failed requests.
Rate limits are in place to ensure fair usage of the API. If you need to make a large number of requests, consider implementing a queue or batching mechanism to stay within the rate limit. You can also monitor your usage to ensure that you are not approaching the limit too quickly. By understanding the rate limits and handling errors appropriately, you can build a reliable application that uses our API efficiently.
Error handling is a critical aspect of API integration. By understanding the specific error codes and implementing appropriate error handling logic, you can ensure that your application runs smoothly. Remember that errors are not just failures but opportunities to improve your application's robustness. Use the error codes to guide your debugging process and improve the user experience.
Pricing, Top-ups, and Credit Management
Understanding the pricing structure is essential for managing your API usage. Our API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Credit is charged based on real token usage, which means you only pay for what you use. Errors and refusals are free, so you do not need to worry about being charged for failed requests. There is no subscription or monthly fee, and your prepaid credit never expires. This flexible pricing model allows you to scale your usage without worrying about recurring costs.
To top up your account, you can use cryptocurrency. We accept USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. If you top up with $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus credit is a great way to get more value from your top-up. The top-up process is straightforward, and you can add credit to your account at any time.
Managing your credit effectively is key to avoiding unexpected service interruptions. Monitor your usage regularly to ensure that you have enough credit for your requests. You can check your balance in your dashboard to keep track of your remaining credit. By understanding the pricing and top-up process, you can plan your usage and budget effectively. The flexible pricing model allows you to use the API without the burden of a monthly subscription.
Pricing and credit management are important aspects of using our API. By understanding the costs and top-up options, you can ensure that your application has the resources it needs to run smoothly. The ability to top up with cryptocurrency and receive bonus credit adds value to your usage. Keep an eye on your credit balance to avoid running out of funds unexpectedly.
When Our API Is Not the Right Choice
While our API is excellent for uncensored text generation, it may not be the right choice for every use case. If you need image generation, audio processing, or video creation, our API does not support these features. The API is focused solely on text-in, text-out interactions. If your application requires multi-modal capabilities, you may need to integrate with other services that specialize in those areas. Our API can handle the text portion of your workflow, but you will need to find separate solutions for media generation.
Similarly, if you need fine-tuning capabilities or model routing, our API does not offer these features. The API serves one uncensored open-weight text model, and you cannot route requests to different models or fine-tune the model yourself. If these features are critical to your application, you may need to consider other providers. Our API is designed for simplicity and reliability in text generation, so it may not meet the needs of more complex AI workflows.
Another consideration is the context window. Our API has a context window of 100,000 tokens, which is quite large but may not be sufficient for very long documents or conversations. If you need to process extremely long texts, you may need to implement chunking strategies or use a service with a larger context window. Understanding the limitations of our API helps you decide if it is the right fit for your project.
Finally, if you need real-time audio or video processing, our API is not the right tool. The API is designed for text-based interactions, so it does not support real-time media processing. If your application requires these features, you should look for specialized services. By understanding when our API is not the right choice, you can make informed decisions about your technology stack and ensure that your application meets all your requirements.
Addressing Community Questions on Reddit
Developers often discuss API integration challenges on Reddit, particularly in communities like r/LLMDevs. A common theme is the concern about malicious intermediaries and API routers. Some users have reported issues with routers injecting malicious code or stealing credentials. Our API operates directly with the model, reducing the risk of intermediary attacks. By using our API directly, you can minimize the potential for malicious interference in your requests.
Another frequent topic is the cost-effectiveness of different LLM APIs. Users often compare prices and features of various providers. Our API offers competitive pricing with no monthly fees and flexible top-up options. The ability to use cryptocurrency for top-ups and receive bonus credits adds value for users who prefer this payment method. By focusing on text generation with an uncensored model, our API provides a unique value proposition for developers who need reliable and affordable text AI.
Rate limits are also a common concern. Users often ask about the best ways to handle rate limits and ensure smooth operation. Our API allows 300 requests per minute per key, which is generous for most use cases. Implementing exponential backoff and monitoring your usage can help you stay within the rate limits. By understanding the community's concerns, we can ensure that our API meets the needs of developers who value reliability and flexibility.
Finally, users often discuss the importance of context windows and token management. Our API's 100,000 token context window is a significant feature that allows for long conversations and document processing. By addressing these community questions, we can help developers make informed decisions about their API integration. The focus on text generation and uncensored content makes our API a strong choice for many applications.
Frequently asked questions
How do I authenticate my API requests?
Include your API key in the Authorization header of your HTTP requests using the Bearer token format. You receive your key immediately after signing up.
What is the cost of using the API?
The API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. There are no monthly fees, and credit never expires.
Can I use cryptocurrency to top up my account?
Yes, you can top up with USDT on TRC20 or USDC on Base. Top-ups between $50 and $500 include a bonus credit of 5% to 15%.
Does the API support image or video generation?
No, the API is focused solely on text-in, text-out interactions. It does not support image, audio, video, or other media generation.