EN ▾
Get API key

Integrating Uncensored Text API with Standard SDKs

Developers often ask how to connect a generic OpenAI-compatible endpoint to their existing codebases. This guide provides a step-by-step integration path, including SDK configuration and a tested checklist for sending and receiving text data.

Developer workspace with laptop showing API code and network graph

Understanding the Endpoint Structure

Before writing any code, you must understand the base URL structure that our service provides. The API is hosted at https://api.unfilteredgrok.com/v1. This is the root address for all your requests. You will not need to construct complex URLs for different models because there is only one uncensored open-weight text model available. The model identifier you must send in your requests is simply uncensored. This simplifies the integration process significantly compared to services that require you to manage multiple model versions.

The API follows the standard OpenAI chat-completions format. This means that if you have existing code written for OpenAI, you likely only need to change the base URL and the API key. The endpoints you will use are POST /v1/chat/completions for generating text and POST /v1/responses for newer response formats. There is also a GET /v1/models endpoint if you need to verify the available models, though you will only see the single uncensored option.

It is important to note that this service does not support embeddings, image generation, audio, video, or OCR. If your application requires those specific capabilities, this API is not the right choice for those tasks. You should use our API only for the text generation steps. The context window for this model is 100,000 tokens, which covers both the prompt and the completion together. This allows for substantial context handling in a single request.

When you start integrating, ensure that your HTTP client is configured to handle JSON payloads correctly. The API expects standard JSON bodies for your requests. You will need to include your API key in the Authorization header. The service charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free, so you do not pay for failed attempts. Prepaid credit is charged by real token usage, and it never expires.

Configuring the SDK Client

Most developers use an SDK to interact with LLM APIs. To integrate our API, you need to point your SDK client to the correct base URL. For example, if you are using the Python SDK, you would set the base URL to https://api.unfilteredgrok.com/v1. You must also provide your API key, which is shown immediately after you sign up. You can sign up using Google or an email and password combination. The key is displayed right away, so you can copy it for your configuration.

When configuring the client, you do not need to set a specific model name in the configuration object if the SDK requires it, as the model is always uncensored. However, you should ensure that the client is set to use the correct API version. The API is compatible with the standard OpenAI format, so most modern SDKs should work without major adjustments. You can test the connection by making a simple request to the models endpoint.

It is important to verify that your SDK is sending the API key in the correct header format. The standard format is Bearer followed by your key. If you receive a 401 error, it means your key is invalid or missing. A 402 error indicates that you have no credit left, and a 429 error means you have hit the rate limit. The rate limit is 300 requests per minute per key. If you exceed this, you will need to wait or use a different key.

Remember that this is an independent service. Do not assume that the SDK settings from another vendor apply directly to our limits or pricing. Always check the specific documentation for our API to confirm the current limits and features. The SDK configuration is straightforward, but ensuring the correct base URL and key is the most critical step. Once configured, you are ready to send your first request.

Sending Text Requests

Once your client is configured, you can start sending text requests. The primary endpoint is POST /v1/chat/completions. You need to send a JSON body that includes the model name, which is uncensored, and the messages array. The messages array should contain your system prompt and user messages. You can also include optional parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the randomness and behavior of the model.

The API supports function calling, which means you can define tools in your request and have the model call them. This is useful for building agents or applications that need to interact with external systems. You can also use JSON mode to force the model to output valid JSON. This is particularly helpful when you need structured data from the model. The penalties parameter is also available if you want to control specific token penalties.

When sending requests, keep in mind that the context window is 100,000 tokens. This includes both the input prompt and the output completion. If your prompt is very long, you need to ensure that the total token count does not exceed this limit. The API will return an error if the context window is exceeded. You can monitor token usage by checking the response headers or the usage field in the response.

Errors are handled gracefully. If you send a request with an invalid key, you will get a 401 error. If you have no credit, you will get a 402 error. If you exceed the rate limit, you will get a 429 error. These errors are free, so you do not lose credit for them. This makes it safe to test your integration frequently. You can also use the seed parameter to get reproducible results, which is useful for debugging.

Handling Streaming Responses

Streaming is a key feature for many applications, as it allows users to see the model's output in real-time. Our API supports streaming over Server-Sent Events (SSE). To enable streaming, you set the stream parameter to true in your request. The API will then send a series of chunks, each containing a part of the response. The last chunk will include the usage data, which tells you how many tokens were consumed in that request.

When handling streaming responses, you need to parse the SSE format correctly. Each chunk starts with the data: prefix and contains a JSON object. You should accumulate the text from each chunk to build the full response. The API does not send a final empty chunk, so you should handle the end of the stream appropriately. This is standard behavior for SSE streams in most SDKs.

Streaming can improve the user experience significantly, especially for long responses. It allows users to start reading the output before the entire response is generated. However, it also requires more complex error handling. If the connection drops, you may need to retry the request. The API key and base URL remain the same, so you can resume the stream if needed.

It is important to note that streaming does not affect the pricing. You are charged for the total number of tokens used, regardless of whether the response is streamed or not. The usage data in the last chunk gives you the exact token count. You can use this information to monitor your credit usage and ensure that you have enough prepaid credit for your requests.

Top-Up and Payment Methods

Our API uses a prepaid credit system, and payments are accepted only in cryptocurrency. You can top up your account using 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 choose any whole amount within this range. This gives you flexibility in managing your budget.

If you top up with $50 or more, you receive a bonus credit. The bonus ranges from 5% to 15%, depending on the amount you add. This is a great way to get more value for your money. The credit never expires, so you can top up when prices are low and use it when you need it. There is no monthly fee or subscription required, so you only pay for what you use.

Unlike some other services, we do not accept credit cards, PayPal, or bank transfers. If you prefer to use traditional payment methods, you may need to convert your fiat currency to crypto first. This is a trade-off for the anonymity and speed of crypto payments. The trial credit of $0.50 is given to every new account, so you can test the API without needing to top up immediately.

When you top up, the credit is added to your account immediately. You can check your balance in the dashboard. If you run out of credit, you will get a 402 error on your next request. You can then top up again to resume usage. The pricing is $0.15 per million input tokens and $0.50 per million output tokens. This is charged based on real token usage, so you only pay for the tokens that are actually used.

When This API Is Not the Right Choice

While our API is excellent for uncensored text generation, it may not be the right choice for every project. If your application requires image generation, audio processing, video creation, or OCR, this API does not support those features. You will need to use a different service for those tasks. Our API is focused solely on text-in, text-out capabilities.

Similarly, if you need embeddings for vector search, this API does not provide that functionality. You would need to use a separate embedding service. The same applies to fine-tuning. If you want to train a custom model on your data, this API does not offer fine-tuning options. You would need to use a provider that supports model training.

Model routing is also not available. If you want to switch between different models based on the task, this API only offers one uncensored model. You cannot route requests to different models. This is a limitation if you need a multi-model strategy. However, for single-model uncensored text generation, this API is highly efficient.

Finally, if you need an SLA guarantee or certifications like SOC2 or HIPAA, this service does not provide those. It is an independent service without formal certifications. If your enterprise client requires these, you should verify their specific needs. For indie builders and developers who need a reliable uncensored text API, this service is a strong option. Always check the vendor documentation for the most current features and limits.

Troubleshooting Common Issues

When integrating the API, you may encounter common issues such as authentication errors or rate limits. A 401 error indicates that your API key is invalid or missing. Ensure that you are using the correct key from your dashboard. A 402 error means you have no credit left. You can top up using crypto to resolve this. A 429 error indicates that you have exceeded the rate limit of 300 requests per minute.

To avoid rate limits, you can implement exponential backoff in your code. This means that if you get a 429 error, you wait for a short period and then retry. You can also use multiple API keys to distribute the load. Each key has its own rate limit, so using multiple keys can increase your overall throughput. This is useful for high-volume applications.

Another common issue is context window overflow. If your prompt is too long, you may exceed the 100,000 token limit. To fix this, you can truncate your prompt or use a summarization technique to reduce the context size. You can also monitor the token usage in the response to ensure you are within the limit. This helps you avoid errors and optimize your requests.

Finally, ensure that your SDK is configured correctly. Check the base URL and the API key format. If you are using a third-party SDK, verify that it supports the features you need, such as streaming and function calling. You can also check the vendor documentation for specific integration tips. This will help you avoid common pitfalls and ensure a smooth integration process.

Frequently asked questions

How do I get an API key?

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

What payment methods are accepted?

We only accept crypto payments. You can top up using USDT on TRC20 or USDC on Base. The minimum amount is $20, and the maximum is $500. No cards or PayPal are accepted.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). You can enable this by setting the stream parameter to true. The usage data is included in the last chunk of the response.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for substantial context handling in a single request. You can monitor token usage in the response.