EN ▾

unhingedgrok.com2026

Uncensored API. OpenAI compatible. Zero refusals.

unhingedgrok.comGet API key

Quickstart for Unhinged Grok users

Connect your existing OpenAI SDK to our uncensored LLM API in five minutes by updating the base URL and API key. This guide shows how to send your first request using standard client code.

Authentication and Base URL

Our API is OpenAI compatible, meaning you do not need a new library. You only need to update two values in your existing configuration: the base_url and the api_key. Your API key is generated immediately upon signup via Google or email. Keep this key secure; it is the only credential required for authentication.

Replace the standard OpenAI base URL with our endpoint. This change directs all subsequent requests to our uncensored model servers. No other code changes are required for basic text generation.

Configuration Example

  • Base URL: https://api.unhingedgrok.com/v1
  • API Key: Your unique key from the dashboard

Verify your connection by listing available models. This confirms your authentication is working correctly before sending generation requests.

First Request

Start by sending a simple text completion request. This example uses curl to demonstrate the raw HTTP structure. The request targets the /v1/chat/completions endpoint with the model ID uncensored. The response returns generated text in the choices array.

This direct approach works for any language or tool that supports standard OpenAI HTTP formats. You can test this immediately after generating your key.

Direct HTTP Request

curl https://api.unhingedgrok.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 library to integrate our API. Install the package via pip. Initialize the client with your key and the custom base URL. The rest of the SDK methods, such as chat.completions.create, work exactly as documented for OpenAI.

This method is ideal for backend services, data processing scripts, or automated workflows. The SDK handles JSON serialization and response parsing automatically.

Python Code Example

from openai import OpenAI

client = OpenAI(base_url="https://api.unhingedgrok.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.js SDK Integration

For JavaScript or TypeScript environments, use the official openai npm package. Configure the client with the same base URL and key. The Node SDK supports both callback and promise-based patterns.

This setup allows you to embed uncensored text generation directly into web applications, serverless functions, or Node-based automation tools. Error handling remains consistent with standard OpenAI SDK behavior.

Node.js Code Example

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unhingedgrok.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 real-time token generation by setting stream: true. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response. The final chunk includes token usage statistics.

Streaming reduces perceived latency for end-users. It is essential for chat interfaces and interactive applications. Handle each chunk incrementally to update the UI immediately.

Streaming Code Example

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, and Context

Understand the operational constraints to avoid service interruptions. The context window supports 100,000 tokens total, and if max_tokens is unset, the response can run to the end of the window.

Rate limits allow 300 requests per minute per key. Concurrent requests are capped at 8. Request bodies must not exceed 8 MB. Handle standard HTTP error codes: 401 indicates an invalid key, 402 signals insufficient credit, and 429 denotes rate limiting. Errors do not consume credit.

What the API supports

Everything the endpoint can and cannot do, in one place — check it before you top up.

ParameterDetails
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.unhingedgrok.com/v1
API keyBearer token in the Authorization header
Model IDuncensored
Structured outputresponse_format: {"type": "json_object"}
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
SSE streamingSupported (stream: true), usage included at the end
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Context window100,000 tokens, input and output combined
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Requests per minute300 requests per minute per key
Max body8 MB request body
Parallel requestsup to 8 in parallel per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Bonus credit+5% from $50, +10% from $100, +15% from $200
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Subscriptionpaid credit never expires, no subscription
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Free trial$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Billingprepaid credit, charged by real token usage; errors and refusals are free
Key managementone active key per account; a new key replaces the old one
Sign-inGoogle or e-mail and password
Content policyadult content allowed; sexual content involving minors is refused

Errors and what to do

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this the official Grok API?

No. We are an independent service hosting our own uncensored model. We are not affiliated with X Corp or the official Grok API. Our API is compatible with the OpenAI client format but runs a different model.

How do I pay for usage?

Credit is topped up using cryptocurrency (USDT on TRC20 or USDC on Base). Prepaid credit is charged based on real token usage. Errors and refusals are free. Credit never expires.

What is the context window size?

The model supports a 100,000 token context window for both prompt and completion combined. There is no separate output cap. If max_tokens is not specified, the response can run to the end of the window.

Your key is one form away

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

Get API key