EN ▾

unhingedgrok.com2026

Uncensored API. OpenAI compatible. Zero refusals.

unhingedgrok.comGet API key

Grok Unhinged Mode Example: Prompts and API Calls

Looking for a grok unhinged mode example? Below are five runnable requests that reproduce the loose, blunt, no-lecture style on an uncensored model, with the exact code and what to expect from each.

Five floating panels linked to a terminal, representing the five API examples in the article

Updated

Key points

  • Unhinged style comes from the system prompt; the model itself does not refuse lawful adult requests.
  • Five examples cover persona, fiction, JSON mode, tool calling and streaming.
  • Outputs vary between runs, so fix a seed when you compare prompts.
  • One example run of 400 input and 600 output tokens costs $0.00036.

What the "unhinged" label means, and how this differs

"Unhinged" became a nickname for a conversation style in xAI's Grok chat product: irreverent, sarcastic, quick to swear, unwilling to give a lecture before an answer. If you want a grok unhinged mode example for your own app, the useful question is which parts of that style you can reproduce through an API.

All of it, in practice, because style is mostly instruction. This site runs one open-weight model, hosted by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the Grok API and not affiliated with xAI. What you get is the absence of refusals plus the freedom to set the tone yourself with a system message.

A note on honesty: the examples below show the requests exactly as you would send them, and describe the kind of response to expect. Generated text differs on every run, so I do not paste a single sample and call it typical. Run each one with your own key and read the result. The trial credit covers it.

Every example uses the same three pieces of setup: the base URL https://api.unhingedgrok.com/v1, a bearer key in the Authorization header, and the model ID uncensored. If you can send one of them, you can send all five, and any OpenAI-compatible client will accept the same values. Pick the language you already work in and skip the others.

Example 1: a blunt reviewer persona

The simplest test is a system prompt that changes the attitude, nothing else. The request asks for feedback on a function, and the persona is told to be direct rather than to be rude for its own sake.

curl https://api.unhingedgrok.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "temperature": 0.9,
    "messages": [
      {"role": "system", "content": "You are a grumpy senior engineer. Say what is wrong in plain words, no compliments, no hedging, at most 120 words."},
      {"role": "user", "content": "Review: def avg(xs): return sum(xs)/len(xs)"}
    ]
  }'

Expect a short, opinionated answer that points at the empty-list division and probably grumbles about missing type hints. Without the system message the same question usually returns a balanced, friendly review. That gap between the two replies is the whole "mode".

Example 2: a dark fiction scene

This is where refusals hurt most on other services. A thriller writer needs a menacing antagonist, and a scene with a threat in it should read like a threat. Keep it about adult characters and lawful fiction.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="uncensored",
    temperature=0.95,
    frequency_penalty=0.4,
    seed=42,
    messages=[
        {"role": "system", "content": "You write adult crime fiction in a cold, precise voice. No disclaimers, no moralising. All characters are adults."},
        {"role": "user", "content": "Scene: a loan shark visits a bakery owner who is three weeks late. Under 300 words, ending on the owner's decision."},
    ],
)
print(resp.choices[0].message.content)

What to look for: tension carried by dialogue and detail, no paragraph at the end explaining that intimidation is wrong, and an ending that respects your brief. If the voice is too flat, raise the temperature a notch. If it repeats phrases, raise frequency_penalty. Setting seed lets you rerun the exact request and compare after you edit one line of the prompt.

Example 3: JSON mode for characters and game data

Less filtered does not mean less structured. JSON mode works with the same model, which makes it handy for generating NPCs, quest hooks or dialogue trees that your game code can parse.

curl https://api.unhingedgrok.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "response_format": {"type": "json_object"},
    "messages": [
      {"role": "system", "content": "Return only JSON with keys name, age, secret, catchphrase. Characters are adults."},
      {"role": "user", "content": "Create a corrupt harbour inspector for a noir game."}
    ]
  }'

Mention the word JSON and the keys in the prompt, as above; that is the reliable way to get the shape you want. Parse the result inside a try block anyway. A truncated reply is the usual cause of a parse error, so check finish_reason before you blame the model.

Example 4: tool calling for a game master

A roleplay narrator that invents dice results is easy to catch cheating. Give it a tool and let your code roll. Tool calling follows the OpenAI format: tools, tool_choice, and results returned as messages with role tool.

import json, random
from openai import OpenAI

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

tools = [{
    "type": "function",
    "function": {
        "name": "roll_dice",
        "description": "Roll a die with the given number of sides",
        "parameters": {
            "type": "object",
            "properties": {"sides": {"type": "integer"}},
            "required": ["sides"],
        },
    },
}]

messages = [
    {"role": "system", "content": "You are a ruthless game master. Use roll_dice for any risky action and narrate the result."},
    {"role": "user", "content": "I try to pick the lock on the warlord's strongbox."},
]

first = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
call = first.choices[0].message.tool_calls[0]
sides = json.loads(call.function.arguments)["sides"]

messages.append(first.choices[0].message)
messages.append({"role": "tool", "tool_call_id": call.id, "content": str(random.randint(1, sides))})

final = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
print(final.choices[0].message.content)

In production, check that tool_calls is present before indexing it. The model may decide that picking a lock needs no roll, especially at a low temperature.

Example 5: streaming a reply as it is written

Chat apps feel better when text appears word by word. Set stream to true and read the SSE chunks; usage arrives at the end.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.unhingedgrok.com/v1",
  apiKey: process.env.API_KEY,
});

const stream = await client.chat.completions.create({
  model: "uncensored",
  stream: true,
  messages: [
    { role: "system", content: "You are a deadpan late-night host. Two paragraphs, dry humour." },
    { role: "user", content: "Roast my plan to rewrite the whole app over a weekend." },
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

A streamed request holds its concurrency slot until the stream ends. On a trial key with 2 concurrent requests, two open streams mean a third call returns 429 with code concurrency. Close streams you no longer read.

Tuning the tone once the basics work

After the first run, most of the effort goes into small adjustments. The same five requests can be pushed in very different directions without changing the model or the endpoint.

Run an A/B test on the system message

Send one user message twice with the same seed, once with no system message and once with your persona. Because the seed is fixed, the difference between the two replies comes from the system message and not from sampling luck. Do this before you write a long prompt, and again after each edit. If a sentence in your prompt does not change the output, delete it and save the input tokens.

Describe the attitude, not the label

The word "unhinged" tells the model very little. A line such as "you answer the question first, then add one honest, slightly rude observation" gives it something to execute. The same goes for sarcasm: name the target (the plan, the code, the situation) so the jokes land on something other than the user.

Keep a plain mode next to the loose one

Most apps need both. A chat feature may want the irreverent voice, while the part that writes order summaries or error messages needs a neutral tone. Keep two system prompts in your code and pick one per call. The model ID and endpoint stay the same, so switching costs nothing.

Watch the length

Loose personas ramble. State a word range in the prompt, such as "under 150 words", and you will see shorter, punchier replies and a smaller output bill. Output tokens cost more than input tokens at $0.50 per 1M against $0.15, so trimming replies is the cheapest saving available.

Running the examples cheaply, and what stays off the table

Each example is small. Suppose one run sends 400 input tokens and gets 600 back. Input costs 400 x $0.15 / 1,000,000 = $0.00006, output costs 600 x $0.50 / 1,000,000 = $0.0003, so the run costs $0.00036. The $0.50 trial credit covers well over a thousand such runs, though the 7-day window and the 2-request concurrency cap are the real limits. Full details are on the pricing page.

To start, create your key and follow the quickstart for client setup. Payment for larger top-ups is crypto only, USDT on TRC20 or USDC on Base.

Two boundaries apply to every example. The model is text only, so no images, audio or embeddings. And sexual content involving minors is never allowed. Everything else here is about adult fiction and lawful use, and that is where a model without refusals earns its keep.

Questions and answers

Is this the same as Grok's unhinged mode?

No. Grok is xAI's product. This is an independent API serving one open-weight model; you recreate the style with a system prompt.

Will I get the same output as your examples?

No two runs match unless you fix the seed. Treat each example as a request to run yourself, then judge the reply.

Can the model refuse a request?

It is tuned to answer without content refusals for lawful adult use. Failed or refused requests are not charged.

Which client should I use to test?

Anything OpenAI-compatible: the OpenAI Python or Node SDK, curl, SillyTavern or Open WebUI. Set the base URL, key and the model ID uncensored.

Your key is one form away

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

Get API key