EN ▾
Get API key
https://api.grokunrestricted.top/v1

Uncensored LLM API for developers

grokunrestricted.topGrok Unrestricted: Uncensored Grok: the options compared

Grok Unrestricted: Uncensored Grok: the options compared

The uncensored Grok API has become a go-to for developers who need a model that doesn't refuse lawful adult content. If you are tired of standard refusals, this guide explains how context windows, token limits, and streaming work, plus how to swap in a drop-in alternative that keeps your existing code.

Grok Unrestricted: Uncensored Grok: the options compared

Updated

Key points

  • Standard context windows combine prompt and completion tokens, so long conversations or large inputs consume the limit faster.
  • Max output tokens cap the response length, which can truncate long answers if you do not explicitly set the parameter.
  • Streaming via Server-Sent Events (SSE) allows real-time token delivery, but you must handle partial JSON carefully.
  • Our uncensored API uses a single active key per account, so you must rotate keys manually rather than generating multiple concurrent ones.

Understanding Context Window Limits

The context window defines the total number of tokens the model can process in a single request. This includes both your input prompt and the generated output. For example, a 100,000-token context window means the sum of your input and output tokens cannot exceed 100,000.

If you send a 50,000-token prompt, the model can only generate up to 14,000 tokens in that same request. This is a hard constraint. If you need longer outputs, you must split your input or manage state across multiple requests.

  • Input tokens: Your prompt, system instructions, and conversation history.
  • Output tokens: The model's response.
  • Total: Input + Output ≤ Context Window Limit.

When working with long documents, consider chunking strategies. This keeps your input within a manageable range, leaving room for the model to generate a complete response without hitting the context limit prematurely.

Max Output Tokens vs. Default Behavior

By default, many APIs set a maximum output token limit to control costs and latency. If you do not specify max_tokens, the model might stop generating early, even if it has more content to provide.

Some APIs apply a small default max output. Here, if you do not set max_tokens, the response can run to the end of the window. If you want shorter responses, you must explicitly set the max_tokens parameter. However, remember that your input tokens still count toward the total context window.

For example, if your prompt is 10,000 tokens and you set max_tokens to 8,000, you are using 18,000 tokens out of a 100,000-token window. This leaves plenty of room for future turns in a conversation, but it requires careful tracking.

Always monitor your token usage. Overestimating output tokens can lead to wasted credits, while underestimating can result in truncated responses.

Streaming vs. Non-Streaming Responses

Streaming allows you to receive tokens as they are generated, providing a better user experience for real-time applications. Non-streaming waits for the entire response before returning it.

With streaming, you receive a series of Server-Sent Events (SSE). Each event contains a partial response. The final event includes the token usage statistics, which is important for billing and monitoring.

Here is how you might structure a streaming request:

curl https://api.grokunrestricted.top/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Remember to handle the final chunk carefully. It contains the full token count, which you should log for your records. Non-streaming is simpler but can feel slow for long responses.

Handling Function Calling Errors

Function calling allows the model to return structured data that triggers specific actions in your application. Errors can occur if the model returns invalid JSON or if the function signature does not match the expected format.

Common issues include:

  • Invalid JSON: The model returns malformed JSON. Always validate the output before parsing.
  • Missing parameters: The model omits a required parameter. Check the schema carefully.
  • Type mismatches: The model returns a string where a number is expected. Cast or coerce types as needed.

If the model returns an error, you can retry the request with a lower temperature to encourage more deterministic output. Alternatively, you can provide a more detailed function description to guide the model.

JSON Mode Formatting Issues

JSON mode forces the model to return a valid JSON object. This is useful for parsing structured data. However, the model might still include markdown formatting or extra text outside the JSON object.

For example, the model might return:

You need to strip the markdown before parsing. Additionally, ensure that the JSON schema matches your expectations. If the model returns unexpected keys, you can use a JSON schema to guide the output.

Always test your JSON parsing logic with edge cases. This ensures that your application remains solid even if the model behaves unexpectedly.

Token Counting Mistakes

Token counting can be tricky. Different models use different tokenizers, so the number of tokens might vary. Always use the tokenizer provided by the API provider for accurate counts.

Common mistakes include:

  • Counting characters instead of tokens: One token can represent multiple characters.
  • Ignoring system messages: System messages count toward the context window.
  • Not accounting for streaming: Streaming does not change the token count, but it changes how you receive the data.

Keep a running tally of your token usage. This helps you stay within your budget and avoid unexpected charges.

Rate Limit Exceeded Solutions

Rate limits prevent abuse and ensure fair usage. Our uncensored API allows 300 requests per minute per key and 8 concurrent requests. If you exceed these limits, you will receive a 429 error.

To handle rate limits:

  • Implement exponential backoff: Wait longer between retries after each failure.
  • Use multiple keys: Generate multiple API keys to distribute the load.
  • Monitor usage: Track your token usage to anticipate limits.

For example, if you are processing a large batch of documents, consider splitting the workload across multiple keys. This ensures that you do not hit the rate limit too quickly.

Why Your Prompt Was Refused

Even in an uncensored API, there are hard content limits. The most common refusal is for sexual content involving minors. This limit always applies, regardless of the model's general uncensored nature.

If your prompt is refused, check for this specific content type. Other refusals are rare in an uncensored model. However, you might encounter refusals if the model detects a violation of its core safety guidelines.

To avoid refusals:

  • Be specific: Clearly state the context of your prompt.
  • Use appropriate language: Avoid ambiguous terms that might trigger a refusal.
  • Check the model's guidelines: Review the API documentation for any specific content restrictions.

If you receive a refusal, you can retry with a slightly modified prompt. This often helps the model understand the context better.

Best Practices for Uncensored Output

To get the best uncensored output, follow these best practices:

  • Set a low temperature: This encourages more deterministic and focused responses.
  • Use system messages: Guide the model with clear instructions.
  • Monitor token usage: Stay within your context window to avoid truncation.
  • Validate output: Ensure the model returns the expected format.

Our API offers a drop-in alternative to other uncensored models. It uses the same OpenAI-compatible SDKs, so you can swap in our API without changing your code. The base URL is https://api.grokunrestricted.top/v1, and the model ID is uncensored.

from openai import OpenAI

client = OpenAI(base_url="https://api.grokunrestricted.top/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

This setup allows you to test your application with our uncensored model while maintaining compatibility with your existing infrastructure.

Questions and answers

What is the context window limit for the uncensored API?

The context window is 100,000 tokens, which includes both the prompt and the completion. There is no separate output cap, and if you do not specify a limit, the response can run to the end of the window.

How do I handle rate limits?

You are limited to 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, implement exponential backoff or use multiple API keys to distribute the load.

Is the API really uncensored?

Yes, the model does not refuse lawful adult, fictional, or controversial topics. The only hard limit is sexual content involving minors, which is always blocked.

How do I sign up and get an API key?

You can sign up using Google or email and password. The API key is shown immediately. You do not need a phone number or credit card for the trial.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

https://api.grokunrestricted.top/v1Get API key