Integrating Uncensored Text API: SDK Checklist
Connecting an uncensored text API requires precise SDK configuration and a clear understanding of payment methods. This checklist covers the essential steps to integrate our service, from initial setup to verifying your trial credits.

Setting Up Your SDK Environment
This site is an independent service and is not affiliated with xAI.
Integrating our API begins with configuring your development environment to communicate with our endpoints. You need to set the base URL to https://api.grokaiuncensored.com/v1 in your SDK client. This ensures that all requests are directed to the correct service. The API is compatible with standard OpenAI SDKs, so you can use familiar libraries for Python, Node.js, or other languages. This compatibility reduces the learning curve and allows for quick implementation.
Once the base URL is set, you must specify the model ID. For our uncensored text model, the ID is simply uncensored. This identifier tells the API which model to use for generating responses. It is important to use this exact ID to avoid errors. The API supports both chat completions and responses endpoints, so you can choose the format that best fits your application architecture.
Authentication is handled via API keys. You can generate a key by signing up with Google or using an email and password. The key is displayed immediately after signup, so make sure to copy it securely. Store this key in your environment variables to prevent accidental exposure. The API key is required for all requests, and invalid keys will result in a 401 error.
Finally, ensure that your SDK is configured to handle streaming if you need real-time responses. Our API supports streaming over Server-Sent Events (SSE). This allows you to receive tokens as they are generated, providing a smoother user experience. You can also configure parameters like temperature, top_p, and stop sequences to control the model's behavior. These settings allow you to fine-tune the output to match your specific needs.
Understanding Payment and Top-Up Methods
Our API operates on a prepaid credit system, which means you must fund your account before making requests. The pricing is straightforward: $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free, so you only pay for actual usage. This model ensures that you are not charged for failed requests or rate-limit errors.
Top-ups are accepted via cryptocurrency 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 top up any whole amount within this range. This flexibility allows you to manage your budget according to your usage patterns. The credit never expires, so you can top up when prices are favorable.
When you top up, you may receive bonus credit if you top up $50 or more. The bonus ranges from 5% to 15%, depending on the amount. This bonus provides extra value for larger purchases. However, note that cards, PayPal, and bank transfers are not accepted. You must use the specified crypto networks for all transactions.
To track your usage and balance, you can monitor your account dashboard. The API returns usage information in the last chunk of streaming responses. This allows you to monitor token consumption in real-time. You can also check your balance to ensure you have sufficient credits for your planned workload. Regular monitoring helps avoid unexpected service interruptions due to insufficient funds.
Verifying Trial Credits and Basic Functionality
Every new account receives $0.50 of trial credit, which allows you to test the API without immediate payment. This trial credit is a valuable tool for verifying that your integration is working correctly. You can use this credit to send a few test requests and ensure that the model responds as expected. It is recommended to test the API before committing to a larger top-up.
To verify your trial credits, send a simple text request to the /v1/chat/completions endpoint. Use the uncensored model ID and a basic prompt. If the request succeeds, you will receive a response, and your trial balance will decrease accordingly. This confirms that your API key is valid and your SDK is configured correctly. If you receive a 402 error, it means you have no credit left, and you will need to top up.
You can also test the streaming functionality using the trial credits. Send a request with the streaming parameter enabled. The API will return tokens in real-time, allowing you to verify that the SSE connection is working. This is particularly useful for applications that require immediate feedback. The trial credits are sufficient for a reasonable number of test requests, giving you a good sense of the model's performance.
After verifying the basic functionality, you can proceed to test more complex scenarios. Try using different parameters like temperature and top_p to see how they affect the output. You can also test the JSON mode to ensure that the model returns structured data correctly. These tests help you understand the model's capabilities and limitations before deploying it to production.
Handling Errors and Rate Limits
Understanding error codes is important for a reliable integration. The API returns specific error codes to help you diagnose issues. A 401 error indicates an invalid API key, which means you should check your key configuration. A 402 error means you have no credit left, requiring a top-up. A 429 error indicates that you have exceeded the rate limit of 300 requests per minute per key.
Rate limits are enforced to ensure fair usage across all users. If you exceed the limit, you will receive a 429 error. You can implement exponential backoff in your SDK to handle these errors gracefully. This involves waiting for a short period before retrying the request. The wait time should increase with each consecutive failure to avoid overwhelming the server.
Errors and refusals are free, so you do not lose credit for failed requests. This is important to note when calculating your costs. You only pay for successful token generation. This means that if your model refuses a request due to content policy, you are not charged. However, if the request is successful, you are charged for the tokens generated.
It is also important to handle network errors and timeouts in your SDK. These errors are not specific to the API but are common in any networked application. Implementing retry logic for these errors can improve the reliability of your integration. You can also log these errors for debugging purposes. This helps you identify patterns and optimize your integration over time.
When This API Is Not the Right Choice
While our API is powerful for text generation, it is not suitable for all use cases. It is a text-only API, meaning it does not support image, audio, or video generation. If your application requires multimedia outputs, you will need to integrate additional services. The API also does not support embeddings, OCR, or fine-tuning. These features are not part of our current offering.
If you need model routing or multiple model support, this API may not be the right fit. It serves a single uncensored open-weight text model. You cannot switch between different models or use a routing layer to distribute load. This simplicity is a feature for those who want a straightforward integration, but it may be a limitation for those who need flexibility.
The API also has a context window of 100,000 tokens. While this is large, it may not be sufficient for extremely long documents or conversations. If your use case requires processing very long texts, you may need to implement chunking strategies. This involves breaking down the input into smaller parts and processing them sequentially.
Finally, if you require strict SLA guarantees or certifications like SOC2 or HIPAA, this API may not meet your needs. We do not claim these certifications, and our service is an independent offering. For applications with strict compliance requirements, you may need to consider other providers. Always evaluate your specific needs before integrating any API.
Addressing Common Developer Questions
Developers often ask about the differences between uncensored and censored models. The primary difference is the model's willingness to generate content on controversial or adult topics. Our model does not refuse lawful adult, fictional, or security-research topics. This makes it suitable for applications that require less restrictive content generation. However, it does have a hard limit on sexual content involving minors.
Another common question is about the availability of free tiers. Our API does not offer a free unlimited tier. You get a small trial credit, but ongoing usage requires prepaid credits. This is different from some competitors that offer free tiers with limitations. It is important to budget for your usage based on the token pricing.
Users also inquire about the model's performance compared to other vendors. While we do not claim specific benchmark scores, our model is designed for high-quality text generation. The uncensored nature allows for more creative and diverse outputs. Developers should test the model with their specific prompts to evaluate its suitability.
Finally, many developers ask about the ease of integration. The API's compatibility with OpenAI SDKs makes it easy to integrate. You can use familiar tools and libraries to connect to the API. This reduces the development time and effort required to get started. The documentation and examples provided help guide you through the process.
Advanced Configuration and Best Practices
For advanced users, configuring the API to handle complex workflows is essential. You can use function calling to enable the model to interact with external tools. This allows you to build more intelligent applications that can perform actions based on the model's output. The API supports tool definitions in the request, allowing you to specify the available functions.
JSON mode is another powerful feature that ensures the model returns structured data. This is useful for applications that require parsing the output. You can enable JSON mode by setting the appropriate parameter in your request. This ensures that the model's output is valid JSON, making it easier to integrate with your backend.
Seed values can be used to ensure reproducibility in your outputs. By setting a seed, you can get consistent results for the same input. This is useful for testing and debugging. You can also use stop sequences to control the length of the output. This allows you to prevent the model from generating excessive text.
Finally, it is important to monitor your API usage and costs. You can use the usage information returned in streaming responses to track token consumption. This helps you stay within your budget and avoid unexpected charges. Regular monitoring and optimization of your integration can lead to a more efficient and cost-effective solution.
Frequently asked questions
How do I top up my account?
You can top up your account using USDT on the TRC20 network or USDC on the Base network. The minimum amount is $20, and the maximum is $500. Top-ups are charged immediately, and you receive bonus credit for amounts of $50 or more.
What happens if I run out of credit?
If you run out of credit, you will receive a 402 error on your requests. You will need to top up your account to continue using the API. Errors and refusals are free, so you only lose credit when tokens are generated.
Does the API support image generation?
No, the API is text-only. It does not support image, audio, or video generation. If you need multimedia outputs, you will need to integrate additional services.
How do I verify my trial credits?
You can verify your trial credits by sending a test request to the API. The trial credit is $0.50, and it is sufficient for a reasonable number of test requests. You can check your balance in the account dashboard.