EN ▾
Get API key

Integrating Our Uncensored Text API for Agents

Developers often seek a reliable, unfiltered text API for coding agents and custom bots without complex setup. This guide provides a tested checklist for SDK integration, showing how to connect your application to our OpenAI-compatible endpoint for smooth text-in, text-out functionality.

Server rack with glowing data streams representing an uncensored AI text API

Understanding the API Endpoint Structure

The foundation of integrating our service begins with identifying the correct base URL. You must point your HTTP client to https://api.unrestrictedgrok.cc/v1. This endpoint supports the standard OpenAI-compatible chat-completions interface, which means you can likely reuse existing code from other projects without major refactoring. The API is text-only, meaning it accepts text input and returns text output. It does not handle images, audio, video, or embeddings. This simplicity is a feature, not a limitation, as it reduces overhead and latency for pure text generation tasks.

When you initialize your client, you will use the model ID uncensored. This identifier tells the server which specific open-weight model to invoke. The model is uncensored, meaning it does not refuse lawful adult, fictional, security-research, or controversial topics. However, it does enforce a hard content limit regarding sexual content involving minors. Requests violating this limit are refused, while all other topics are processed without political or stylistic filtering.

The API supports three primary endpoints. The POST /v1/chat/completions endpoint is used for standard chat interactions. The POST /v1/responses endpoint offers an alternative response format. The GET /v1/models endpoint allows you to verify available models. There is no fine-tuning, model routing, or OCR capability. Keeping your integration focused on these three endpoints ensures you stay within the documented capabilities of the service.

Authentication is handled via API keys. You can generate a key by signing up with Google or an email and password. The key is shown immediately upon creation. You must include this key in the Authorization header of your requests. If the key is invalid, the API returns a 401 error. If you have no credit, it returns a 402. If you exceed the rate limit, it returns a 429. Understanding these error codes is important for building reliable client-side logic.

SDK Integration and Configuration

Integrating the API into your application is straightforward because it follows the OpenAI protocol. You can use any standard SDK that supports OpenAI-compatible endpoints. This includes libraries for Python, JavaScript, Go, and other languages. The configuration requires only the base URL and your API key. You do not need to manage complex authentication flows or OAuth tokens. The key is static and does not expire unless you revoke it manually.

When configuring your client, set the model to uncensored. This ensures that the requests are routed to the correct model. The context window for this model is 100,000 tokens. This includes both the prompt and the completion. This large context window allows you to pass extensive documentation, codebases, or conversation history in a single request. It is particularly useful for coding agents that need to reference large files or complex project structures.

The API supports several parameters that allow you to control the output. You can set the temperature to adjust randomness, top_p for nucleus sampling, and stop sequences to halt generation. You can also set a seed for reproducible results. Additionally, you can apply penalties to discourage certain tokens. These parameters give you fine-grained control over the generation process, allowing you to tune the output for specific use cases like creative writing or technical documentation.

Streaming is supported over Server-Sent Events (SSE). This allows you to receive the response token by token, providing a better user experience for interactive applications. The usage information, including token counts, is included in the last chunk of the stream. This means you can track your credit usage in real-time. Streaming is essential for building chatbots that feel responsive and natural. It reduces the perceived latency for the end user.

Managing Credit and Payments

The pricing model for this API is simple and transparent. You pay $0.15 per million input tokens and $0.50 per million output tokens. There is no monthly subscription fee, and prepaid credit never expires. Errors and refusals are free, meaning you are not charged for failed requests or content that is refused due to the hard content limit. This pay-as-you-go model is ideal for developers who want to avoid commitment and only pay for what they use.

To add credit to your account, you must use cryptocurrency. The service accepts USDT on the TRC20 network or USDC on the Base network. You can top up with any whole amount between $20 and $500. If you top up with $50 or more, you receive bonus credit ranging from +5% to +15%. This bonus credit is added to your account immediately. There is no option to pay with credit cards, PayPal, or bank transfers. You must use a crypto wallet to send the funds to the provided address.

New accounts start with $0.50 of trial credit. No credit card is required to sign up. This allows you to test the API without any financial commitment. You can use this trial credit to send requests, stream responses, and verify that the integration works correctly. Once the trial credit is exhausted, you must top up with crypto to continue using the service.

It is important to monitor your token usage to avoid running out of credit unexpectedly. You can track usage by parsing the response headers or the final streaming chunk. The API returns the number of input and output tokens used in each request. By multiplying these numbers by the respective per-million prices, you can estimate your costs. This helps you budget for your project and avoid surprise charges.

Handling Errors and Rate Limits

Reliable error handling is essential for any API integration. Our API returns specific HTTP status codes to indicate the state of your request. A 401 error means the API key is invalid or missing. A 402 error indicates that you have no credit remaining. A 429 error means you have exceeded the rate limit of 300 requests per minute per key. Understanding these codes allows you to implement appropriate retry logic and user feedback.

When you encounter a 402 error, you need to top up your credit using crypto. You can implement a check in your application to verify that you have sufficient credit before sending a request. This prevents unnecessary API calls that would fail. You can also set up alerts or notifications to inform you when your credit is running low. This is particularly important for automated agents that run continuously.

The rate limit of 300 requests per minute is generous for most use cases. However, if you are sending a large number of requests in a short period, you may hit this limit. When this happens, the API returns a 429 error. You should implement exponential backoff in your retry logic to avoid overwhelming the server. This means waiting longer between retries as the number of attempts increases. This helps to smooth out traffic and reduces the likelihood of hitting the limit again.

Content refusals are also handled gracefully. If a request violates the hard content limit regarding sexual content involving minors, the API refuses the request. This is not an error in the traditional sense, but a specific type of response. You should handle this case separately from other errors. You can inform the user that the content was refused due to policy restrictions. This transparency helps build trust with your users and explains why certain outputs are not generated.

Using Streaming and Function Calling

Streaming is a powerful feature that enhances the user experience. By using Server-Sent Events, you can send tokens to the client as they are generated. This reduces the perceived latency and makes the application feel more responsive. The usage information is included in the last chunk, so you can track your credit usage accurately. This is particularly useful for chatbots where users expect immediate feedback.

Function calling, also known as tool use, is supported by the API. This allows the model to call external functions based on the user's input. You can define a set of tools in your request, and the model will return a structured response indicating which tool to call and with what arguments. This is essential for building agents that can interact with external systems, such as databases, APIs, or file systems. It enables the model to perform actions beyond just generating text.

JSON mode is also available, which forces the model to output valid JSON. This is useful for applications that expect structured data. You can set a parameter to ensure that the output is always valid JSON, which simplifies parsing and error handling. This is particularly useful for integrating with other systems that require structured data inputs. It reduces the need for complex validation logic on the client side.

Combining streaming and function calling allows you to build sophisticated agents that can interact with the world in real-time. You can stream the thought process of the model while it decides which function to call, and then stream the result of the function call. This creates a smooth experience for the user. It also allows you to provide transparency into the agent's decision-making process, which can build trust and improve usability.

When This API Is Not the Right Choice

While our API is excellent for text generation, it is not the right choice for every project. If you need image, audio, or video generation, this API will not meet your needs. It is a text-only service, so you cannot use it to create multimedia content. If your application requires multimodal capabilities, you will need to integrate with a different provider or use a separate service for those tasks.

Similarly, if you need embeddings for semantic search or vector databases, this API does not provide that capability. You will need to use a dedicated embedding service or model. The same applies to OCR, fine-tuning, and model routing. If your workflow relies on these features, our API will not be sufficient on its own. You may need to combine it with other tools to build a complete solution.

Another consideration is the payment method. If you prefer to pay with credit cards, PayPal, or bank transfers, this API may not be convenient for you. The service only accepts crypto, specifically USDT on TRC20 or USDC on Base. If you do not have a crypto wallet or prefer traditional payment methods, you may find the top-up process cumbersome. This is a trade-off for the uncensored nature and low cost of the service.

Finally, if you need strict SLA guarantees or certifications like SOC2 or HIPAA, this API may not be the best fit. The service does not claim these certifications, and uptime is not guaranteed. For mission-critical applications where downtime is unacceptable, you may need a provider with more reliable infrastructure and service level agreements. However, for most developer projects, indie builders, and custom bots, the flexibility and cost-effectiveness of our API make it a strong candidate.

Addressing Community Questions on Reddit

Developers on Reddit often ask about the best uncensored models for roleplay, ERP, and coding tasks. Many users are looking for models that are not overly filtered or politically correct. They want a model that can handle controversial topics and creative writing without refusing requests. Our API addresses this need by providing an uncensored model that does not refuse lawful adult, fictional, or controversial topics.

Some users also ask about models that are not advertised as 'spicy' or 'character-based'. They want a general-purpose unfiltered LLM that tells the truth without trying to be politically correct. Our API fits this description well, as it is a text-only service focused on unfiltered output. It does not have a specific 'spicy' mode, but it does not filter content based on political or social norms.

Another common question is about the best uncensored LLM for coding and technical tasks. While many models are good at coding, our API's large context window and uncensored nature make it particularly useful for this purpose. You can pass large codebases and get detailed, unfiltered feedback. The ability to use function calling also allows you to build coding agents that can interact with your development environment.

Users also discuss the best alternatives to Grok. Some suggest running models locally, while others look for hosted alternatives. Our API offers a hosted, uncensored alternative that is easy to integrate. It does not require a powerful GPU or complex setup. You can start using it immediately by signing up and getting an API key. This makes it an attractive option for developers who want the benefits of an uncensored model without the overhead of local deployment.

Frequently asked questions

How do I get an API key?

You can get an API key by signing up with Google or an email and password. The key is shown immediately after signup. You can then use this key to authenticate your requests to the API.

What payment methods are accepted?

The service only accepts cryptocurrency. You can top up with USDT on the TRC20 network or USDC on the Base network. Credit cards, PayPal, and bank transfers are not accepted.

Does the API support image generation?

No, the API is text-only. It does not support image, audio, video, or embedding generation. It is designed for text-in, text-out functionality.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. This allows you to pass large amounts of text in a single request.