EN ▾
Get API key

First request in five minutes

Get your first response in under five minutes. This quickstart shows how to connect to our uncensored LLM API using standard OpenAI-compatible clients.

Base URL
https://api.unhingedgrok.cc/v1
Model
uncensored

Base URL & Authentication

Start by creating an account via Continue with Google or email. Your API key appears immediately on the Get API key page. There is no phone number required, and you receive $0.50 in trial credit valid for 7 days. Claim this credit with one click on your API key page. Use this key in the Authorization header. The base URL for all requests is https://api.unhingedgrok.cc/v1. This endpoint works with any standard OpenAI-compatible SDK by simply updating the base URL configuration.

First Request

Send a standard chat completion request to test connectivity. The model identifier is uncensored. This is an open-weight model tuned for lawful adult content and lacks refusals for controversial topics, but it is not the official Grok API. The following example demonstrates a minimal text-in, text-out call.

curl https://api.unhingedgrok.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."}]
  }'

If you receive a 401, your key is invalid. A 402 indicates insufficient prepaid credit. A 429 means you have hit the rate limit of 300 requests per minute.

Python SDK Integration

Use the official openai Python package. Configure the client with our base URL and your API key. The model ID uncensored ensures you are talking to our server-side model, not a routed vendor model. This approach lets you leverage familiar SDK patterns for a pure usage-based pricing model with no monthly fees.

from openai import OpenAI

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

Errors like InsufficientQuota will trigger a 402 response, prompting you to top up via crypto. Remember that credit never expires, so you can top up at your own pace.

Node SDK Integration

For Node.js environments, configure the OpenAI SDK similarly. Set the baseURL to our endpoint and provide your key. The model field should always be set to uncensored. This ensures consistent behavior across different client libraries while maintaining the transparent prepaid billing structure specific to this service.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unhingedgrok.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);

Both input and output tokens are charged. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals do not consume tokens, so you only pay for actual text generated.

Streaming & SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Token usage statistics are included in the final chunk of the stream. This allows your application to track costs and latency in real-time without waiting for the full response to complete. Streaming is ideal for long-form content generation that runs toward the end of the window.

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)

Ensure your client handles SSE parsing correctly. If the stream is interrupted, you may lose partial context, so consider implementing retry logic for critical operations.

Limits, Errors & Context Window

The context window is 100,000 tokens total (prompt + completion). If max_tokens is unset, the response can run to the end of the window. You are limited to 8 concurrent requests and 8 MB request bodies per key. If you need a new key, generating one replaces the old one. Errors like 401, 402, and 429 are standard HTTP responses that your client should handle gracefully. No credit is refunded for mistakes, but double charges are fixed via Support.

Capabilities and limits

A quick checklist for developers: format, limits, features, billing.

ParameterDetails
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
AuthenticationBearer token in the Authorization header
Model IDuncensored
Base URLhttps://api.unhingedgrok.cc/v1
SSE streamingSupported (stream: true), usage included at the end
Context window100,000 tokens, input and output combined
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
JSON modeJSON object mode via response_format json_object
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Requests per minute300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max body8 MB request body
Concurrencyup to 8 in parallel per key
Billingprepaid credit, charged by real token usage; errors and refusals are free
Subscriptionno monthly fee; paid credit does not expire
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Trial credit$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
Content policyadult content allowed; sexual content involving minors is refused
Sign-inGoogle or e-mail and password
Keysone active key per account; a new key replaces the old one

Errors and what to do

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

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 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 serve our own uncensored open-weight model. It is compatible with the OpenAI API format but is not GPT, Claude, Gemini, Grok, or any other vendor's model. Check the vendor's own documentation for their specific limits and pricing.

How do I pay if I run out of credit?

You can top up using USDT (TRC20) or USDC (Base). Payments range from $20 to $500. You receive a 5% bonus for $50+ and a 10% bonus for $100+. Credit never expires.

What content is blocked?

We allow most lawful adult, fictional, and controversial topics. The only hard limit is sexual content involving minors, which is always refused. We do not moderate other topics.

Your key is one form away

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