EN ▾

unhinged.topHosted uncensored API for developers

Integrate the Unhinged Model in Minutes

Get the unhinged model running in your codebase with a single base URL change. This guide covers the essential endpoints, authentication, and integration patterns for both synchronous and streaming workflows.

Base URL & Authentication

To start using the unhinged ai model, you need a valid API key. Generate one instantly via Google or email on the Get API key page. No phone number is required, and the key is displayed immediately.

Set your base URL to https://api.unhinged.top/v1. All requests must include an Authorization header with the Bearer scheme. This setup works with any OpenAI-compatible SDK. The API serves one uncensored LLM online, optimized for direct text generation without extra routing layers.

First Request

Send a standard chat completion request to test the integration. The model ID is always uncensored. This endpoint returns raw text without content refusals for lawful adult use. If you hit a limit, the API returns a clear error code.

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

This simple POST request demonstrates the direct text-in, text-out nature of the service. You can adjust parameters like temperature to control creativity. The response includes token usage, helping you track costs against the transparent pricing model.

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Configure the base URL and API key in your client initialization. This approach allows you to keep existing code structure while swapping in the uncensored model.

from openai import OpenAI

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

Python developers benefit from the synchronous nature of this snippet. It handles the request lifecycle automatically. Ensure you handle exceptions for rate limits or authentication failures. The model supports up to 100,000 tokens in the context window, allowing for substantial prompt history.

Node SDK Integration

For JavaScript and TypeScript environments, the Node SDK offers similar ease of use. Initialize the client with your base URL and key. This allows for rapid prototyping of AI features in web applications or backend services.

import OpenAI from "openai";

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

Asynchronous handling is built into the SDK. You can await the response directly. This pattern is ideal for server-side rendering or API endpoints that need to return model outputs to clients. Remember that the uncensored api is limited to text generation; do not expect image or audio support in this endpoint.

Streaming Responses

For lower latency experiences, enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the complete token usage summary.

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)

Streaming is essential for chat-like interfaces where users expect real-time feedback. Parse the choices[0].delta.content fields to reconstruct the full response. This method reduces the time to first token significantly compared to full synchronous responses.

Limits, Errors & Context

The API enforces strict quotas to ensure stability. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. If you exceed these limits, you will receive a 429 error.

Authentication errors return 401 if the key is invalid. If your prepaid credit is exhausted, the API returns 402. Errors and refusals are free, so you are only charged for successful token usage. The context window supports 100,000 tokens total, and the response can run to the end of the window.

What the API supports

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

ParameterDetails
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.unhinged.top/v1
AuthenticationBearer token in the Authorization header
Modeluncensored
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
JSON moderesponse_format: {"type": "json_object"}
Context window100,000 tokens, input and output combined
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Concurrency8 requests at the same time per key
Rate limit300/min per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max body8 MB request body
Subscriptionpaid credit never expires, no subscription
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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Bonus credit+5% from $50, +10% from $100, +15% from $200
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Sign-inGoogle or e-mail and password
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Keysone key per account, regenerate any time (the old one stops working)

Error reference

Every error is JSON with a type you can switch on. You are never charged for an error.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds
01

Questions and answers

How do I top up my credit?

You can top up by crypto (USDT on TRC20, USDC on Base). Acceptable amounts are whole numbers between $20 and $500. You receive a 5% bonus for deposits of $50 or more, and a 10% bonus for $100 or more.

Is there a free trial available?

Yes, new users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed to sign up via Google or email. This allows you to test the uncensored api without any financial commitment.

What happens if I get a 429 error?

A 429 error indicates you have exceeded the rate limit of 300 requests per minute or the 8 concurrent request limit. Wait briefly before retrying. You can generate a new key to replace the old one if needed, but each account is limited to one active key at a time.

Your key is one form away

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

Get API keyRead the docs