EN ▾
Get API key

Integrating Uncensored Text APIs with Custom SDKs

Developers often seek a direct path to integrate uncensored text generation into their own applications. This guide walks through the specific steps for configuring an OpenAI-compatible endpoint, focusing on the unique constraints of a text-only service. We cover connection protocols, SDK settings, and practical budgeting for token usage.

Developer workspace with glowing uncensored server rack and laptop showing API integration

Setting Up the Base URL and Endpoint

Integrating a custom SDK begins with correctly configuring the base URL. For our service, the base URL is https://api.unhingedgrok.cc/v1. This URL is the foundation for all subsequent requests. You must ensure that your SDK is pointed to this exact address to avoid connection errors. The service uses standard OpenAI-compatible endpoints, which means you can often reuse existing code structures with minimal modification.

The primary endpoint for generating text is POST /v1/chat/completions. This is where you send your prompt and receive the model's response. Another important endpoint is POST /v1/responses, which handles different response formats. Additionally, you can use GET /v1/models to verify connectivity and check available model configurations. These endpoints are the core of the interaction between your application and the uncensored model.

When configuring your SDK, you need to set the model ID to "uncensored". This specific identifier tells the server which model to use for the generation. It is important to use this exact string to ensure you are interacting with the correct uncensored model. Other model IDs might point to different versions or types of models that do not match your requirements.

Ensure that your SDK is set to handle JSON responses correctly. The API returns structured data that your application needs to parse. Proper configuration of the request headers and body is essential for smooth operation. This setup phase is critical for ensuring that your application can communicate effectively with the API.

Authentication and Key Management

Authentication is handled via API keys that are generated upon signup. You can create an account using Google or by providing an email and password. Once you sign up, your API key is shown immediately. It is important to copy and store this key securely, as it is the primary method for authenticating your requests. The key is tied to your prepaid credit balance and usage limits.

When making requests, include your API key in the Authorization header. This ensures that the server can identify your account and deduct credits appropriately. If the key is invalid, you will receive a 401 error. This error indicates that the key provided is not recognized or has been revoked. Always verify your key before making bulk requests to avoid unnecessary errors.

It is also important to monitor your credit balance. If you run out of credit, you will receive a 402 error. This error signals that your account has no remaining prepaid funds. Since there is no monthly subscription, you must top up your credit to continue using the service. The credit is charged based on real token usage, so you only pay for what you consume.

Rate limits are enforced at 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. This error indicates that you have sent too many requests in a short period. To avoid this, implement retry logic with exponential backoff in your SDK. This ensures that your application can handle temporary rate limits gracefully without overwhelming the server.

Configuring Generation Parameters

The API supports a range of parameters to control the output of the model. You can adjust the temperature to influence the randomness of the output. A higher temperature results in more creative and varied responses, while a lower temperature produces more deterministic and focused outputs. This parameter is useful for fine-tuning the model's behavior to match your application's needs.

Other important parameters include top_p, stop sequences, and seed. The top_p parameter controls the diversity of the output by filtering tokens based on their probability. Stop sequences allow you to specify a string that terminates the response. This is useful for controlling the length of the output or stopping the model at specific points. The seed parameter allows you to reproduce the same output for a given prompt, which is helpful for testing and debugging.

Penalties can also be applied to discourage certain types of output. These penalties help in shaping the model's responses to avoid repetitive or undesirable content. By adjusting these parameters, you can customize the model's behavior to better fit your specific use case. It is important to experiment with different settings to find the optimal configuration for your application.

Streaming is supported via Server-Sent Events (SSE). This allows you to receive the model's output in real-time as it is generated. The usage information is included in the last chunk of the stream. This feature is particularly useful for applications that require immediate feedback or for improving the user experience by showing the output as it is being generated.

Understanding Token Budgeting and Pricing

Pricing for the API is based on token usage. The cost is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This pricing structure means that you pay for the tokens sent to the model and the tokens generated by the model. It is important to estimate your token usage to budget effectively for your application.

To estimate costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you send 1 million input tokens and receive 1 million output tokens, the cost would be calculated based on these amounts. This formula helps you predict your expenses based on the volume of data you process.

The service offers a trial credit of $0.50 for every new account. This allows you to test the API without immediate financial commitment. You can top up your credit using crypto, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. Additional bonus credit is available for top-ups of $50 or more.

Errors and refusals are free, which means you do not pay for failed requests or content that is refused due to the hard content limit. This can help reduce costs, especially if your application frequently encounters edge cases. It is important to monitor your usage to ensure that you are not exceeding your budget.

When This API Is Not the Right Choice

While this API is powerful for text generation, it is not suitable for all use cases. If your application requires image, audio, or video generation, this service will not meet your needs. The API is text-only, meaning it cannot produce multimedia content. You would need to integrate other services for those capabilities.

Similarly, if you need embeddings for semantic search or fine-tuning for custom model training, this API does not support these features. The service is designed for chat completions and responses, not for advanced machine learning tasks. Users requiring these features should look for specialized APIs that offer embedding and fine-tuning capabilities.

OCR and model routing are also not available. If your application needs to extract text from images or route requests to multiple models based on specific criteria, this API is not the right fit. It is important to assess your technical requirements before integrating this service to ensure it aligns with your project's needs.

Additionally, if you require an SLA with specific uptime guarantees or certifications like SOC2 or HIPAA, this service may not be suitable. The service does not claim these certifications or guarantees. For applications with strict compliance or reliability requirements, you may need to consider other providers that offer these specific features.

Addressing Common Developer Questions

Developers often ask about the feasibility of running uncensored models locally versus using a hosted API. Many users on Reddit discuss the challenges of running large models on limited hardware, such as MacBooks. They frequently inquire about free or low-cost alternatives for uncensored AI that can handle coding, image generation, and roleplay with high context tokens.

Some users have built their own platforms using base architectures like Gemini 3, but they often face issues with model size and performance. They seek recommendations for platforms that offer uncensored experiences without the need for extensive infrastructure. The discussion often highlights the trade-offs between local deployment and cloud-based solutions.

Another common question is about the availability of free uncensored AI for video and image generation. Users are looking for tools that can produce high-quality media without the need for credits or paid subscriptions. They often share their experiences with various tools and recommend those that provide consistent quality.

Finally, developers ask about the best practices for integrating these APIs into their applications. They want to know how to handle rate limits, manage tokens, and ensure smooth operation. The consensus is that careful planning and testing are essential for successful integration. Users are encouraged to check the documentation for current prices and limits to stay informed about any changes.

Testing and Troubleshooting Integration

Testing your integration is important to ensure that everything works as expected. Start by sending a simple request to the API and verifying that you receive a valid response. Check the status codes to ensure that the request was successful. A 200 status code indicates success, while other codes indicate errors.

If you encounter a 401 error, verify that your API key is correct and has not been revoked. If you receive a 402 error, check your credit balance and top up if necessary. For 429 errors, implement retry logic to handle rate limits. These errors are common and can be resolved with proper error handling.

It is also important to test the different parameters and features of the API. Try adjusting the temperature, top_p, and other settings to see how they affect the output. Test the streaming functionality to ensure that it works correctly. This helps you understand the capabilities of the API and how to best utilize them in your application.

Finally, monitor your application's performance and usage. Keep track of the tokens consumed and the costs incurred. This helps you optimize your integration and ensure that you are getting the best value from the service. Regular testing and monitoring are key to maintaining a reliable and efficient integration.

Frequently asked questions

How do I authenticate my requests to the uncensored API?

You authenticate your requests by including your API key in the Authorization header. This key is generated when you sign up and is tied to your prepaid credit balance.

What happens if I run out of credit?

If you run out of credit, you will receive a 402 error. You can top up your credit using USDT on TRC20 or USDC on Base, with amounts ranging from $20 to $500.

Can I use this API for image generation?

No, this API is text-only. It does not support image, audio, or video generation. You would need to integrate other services for multimedia content.

How is pricing calculated?

Pricing is based on token usage: $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free.