Quickstart for Unrestricted Grok users
Integrate the unrestricted grok API in five minutes using standard OpenAI SDKs. Drop in the base URL and key to start streaming text or calling tools without content refusals.
Base URL & Authentication
Our service is an openai compatible api designed for immediate integration. You do not need a custom client library; the official SDKs work if you point them to our endpoint. Your API key authenticates every request. Keep this key secure in your environment variables.
The base URL is https://api.unrestrictedgrok.com/v1. Unlike generic aggregators, this is a direct connection to our uncensored model server. There is no model routing or fallback logic. When you switch the base URL in your SDK configuration, the rest of the code remains identical to your existing setup.
We do not offer image, audio, or embedding endpoints. This is a text-only chat completions API. If you need those modalities, you must call other services separately. Our focus is strictly on high-quality, unrestricted text generation.
First Request
Verify your integration with a simple HTTP POST. This request sends a prompt to the uncensored model. The response contains the generated text in the choices array. If the request fails, check the error message for details on rate limits or invalid keys.
This approach works for any language that can send HTTP requests. It is the fastest way to confirm your grok api setup is correct before building complex application logic.
Remember that the model does not refuse lawful adult or controversial topics. However, sexual content involving minors is strictly blocked. This limit applies to all requests regardless of the SDK used.
curl https://api.unrestrictedgrok.com/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."}]
}'
Python SDK Integration
Use the official openai Python package to interact with the API. Initialize the client with your API key and the correct base URL. The chat.completions.create method handles the request structure. You can set the model parameter to uncensored to ensure you are hitting the right endpoint.
Pass your conversation history as a list of messages. The API returns a response object that you can parse for the assistant's reply. This method is ideal for backend services or script-based workflows. It maintains the same structure as standard OpenAI calls.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedgrok.com/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)
Node SDK Integration
The Node.js SDK follows the same pattern. Import the client, configure the base URL, and call the completion method. This is useful for server-side rendering or API endpoints in Express or Fastify applications. The response structure is consistent with other OpenAI-compatible services.
You can pass system instructions to guide the model's behavior. The temperature parameter controls randomness. Lower values produce more deterministic outputs, which is useful for code generation or factual tasks. Higher values increase creativity.
Handle errors appropriately. Network issues or invalid keys will throw exceptions. Check the response status code to distinguish between client errors and server-side failures. The uncensored model is optimized for direct text output.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedgrok.com/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);
Streaming Responses
Enable streaming by setting stream: true in your request. The API sends data chunks as they are generated. This reduces perceived latency for users waiting for long responses. Each chunk contains a portion of the text.
Accumulate these chunks in your application logic. The final chunk includes token usage statistics. This allows you to track costs accurately in real-time. Streaming is essential for chat interfaces where immediate feedback improves the user experience.
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Limits, Errors & Context Window
The context window supports 100,000 tokens total, including prompt and completion. If you do not specify max_tokens, the response can run to the end of the window. Plan your input length accordingly to avoid truncation.
You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 error indicates an invalid key. A 402 error means you need to add credit. A 429 error signals you have exceeded the rate limit. Errors are free, so only successful completions consume your prepaid credit.
Keep request bodies under 8 MB. These limits ensure stable performance for all users. Monitor your usage to stay within these bounds. The API is designed for high-throughput production workloads.
Capabilities and limits
A quick checklist for developers: format, limits, features, billing.
| Item | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.unrestrictedgrok.com/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Authentication | Authorization: Bearer YOUR_KEY |
| Model ID | uncensored |
| Context window | 100,000 tokens, input and output combined |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Structured output | response_format: {"type": "json_object"} |
| Request size | 8 MB request body |
| Parallel requests | up to 8 in parallel per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Requests per minute | 300/min per key |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Trial credit | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Credit expiry | paid credit never expires, no subscription |
| Content | adult content allowed; sexual content involving minors is refused |
| Keys | one key per account, regenerate any time (the old one stops working) |
| Account | sign in with Google or with e-mail + password |
When a request fails
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
What is the context window size?
The total context window is 100,000 tokens, combining both the input prompt and the output completion. There is no separate output cap. If you do not set a limit, the response can run to the end of the window.
How do I handle errors like 401 or 429?
A 401 error means your API key is invalid or missing. A 429 error indicates you have exceeded the 300 requests per minute limit. Check your network connection and key validity for 401 errors. Wait a few seconds for 429 errors before retrying.
Does the model refuse content?
The model is uncensored and does not refuse lawful adult, fictional, or controversial topics. However, sexual content involving minors is strictly blocked and will be refused. This is the only hard content limit applied to all requests.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.