First request in five minutes
Get your first response in under five minutes with a single API key and zero setup friction. This quickstart shows you how to connect your existing client code to our uncensored, OpenAI-compatible endpoint.
Base URL & Authentication
To start using the grok unrestricted API, you need two things: your API key and the base URL. Sign up via the Get API key page using Google or an email address. Your key appears immediately; no phone number is required. Copy the key from the dashboard.
All requests must include the header Authorization: Bearer YOUR_API_KEY. The base URL for our hosted service is https://api.grokunrestricted.cc/v1. This URL works with any standard OpenAI-compatible SDK. Change the base_url configuration in your client library to point here.
- Base URL:
https://api.grokunrestricted.cc/v1 - Auth Header:
Authorization: Bearer YOUR_KEY
Keep your key secure. Only one active key is allowed per account; generating a new one replaces the old.
First Request
Verify your setup with a simple chat completion. This test confirms your key works and shows the latency of the uncensored model. Send a POST request to the chat completions endpoint.
- Method:
POST - Endpoint:
/v1/chat/completions - Model:
uncensored
The following example sends a short prompt and expects a text response. If you receive a JSON object with content, your integration is successful.
curl https://api.grokunrestricted.cc/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."}]
}'Errors are free. If the model refuses a lawful topic, you still get a response without token charges.
Python SDK Integration
Use the official OpenAI Python library to interact with our API. Install the package via pip, then configure the client to use our base URL. This approach lets you reuse existing code written for other providers.
Set the base_url and api_key attributes before making calls. The model ID remains uncensored. You can pass standard parameters like temperature or max_tokens.
from openai import OpenAI
client = OpenAI(base_url="https://api.grokunrestricted.cc/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 code snippet demonstrates a synchronous call. For production use, consider handling rate limits or network retries appropriately.
Node.js SDK Integration
Integrate with Node.js by installing the OpenAI npm package. Configure the client with our base URL and your API key. The structure mirrors the Python implementation, ensuring consistency across your stack.
Define the message array with a user prompt. The response will contain the model's text output. Remember that the model ID is always uncensored.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.grokunrestricted.cc/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);This example shows a basic request. You can add parameters like top_p or stop sequences to control generation behavior.
Streaming & SSE Support
For real-time responses, enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. Token usage is reported in the final chunk.
Streaming reduces perceived latency for long outputs. Process each delta as it arrives. The model ID and authentication remain the same.
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)This method is ideal for chat interfaces where users prefer to see text appear progressively. Handle errors and network interruptions gracefully on the client side.
Rate Limits & Errors
Our API enforces strict limits to ensure stability. You are allowed 300 requests per minute per key and 8 concurrent requests. The maximum request body size is 8 MB.
Common HTTP status codes include:
401: Invalid or missing API key.402: Payment required. Your prepaid credit is exhausted.429: Rate limit exceeded. Wait before retrying.
The context window is 100,000 tokens total (input + output). The response can run to the end of the window if max_tokens is unset. Errors and refusals consume no tokens.
Technical reference
If your tool speaks the OpenAI API, these are the details that matter.
| Item | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model ID | uncensored |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Authentication | Bearer token in the Authorization header |
| Base URL | https://api.grokunrestricted.cc/v1 |
| Max context | 100,000 tokens (prompt + completion together) |
| Structured output | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Streaming | Supported (stream: true), usage included at the end |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Requests per minute | 300/min per key |
| Request size | 8 MB request body |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | up to 8 in parallel per key |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Subscription | no monthly fee; paid credit does not expire |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| 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 |
| Account | Google or e-mail and password |
| Keys | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
Errors and what to do
Every error is JSON with a type you can switch on. You are never charged for an error.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
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
How does billing work for the grok api?
You pay only for tokens used. Input tokens cost $0.15 per 1M, and output tokens cost $0.50 per 1M. Errors and refusals are free. Credit is prepaid via crypto and never expires.
Can I use multiple API keys?
No. Each account allows only one active API key. Generating a new key replaces the previous one immediately.
What is the context window size?
The total context window is 100,000 tokens, combining prompt and completion. There is no separate output cap.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key