EN ▾
Get API key

Uncensored API for Grok NSFW models

First request in five minutes

Integrate our uncensored API into your NSFW AI workflow by updating three configuration values in your existing OpenAI-compatible client. This quickstart covers authentication, text generation, and streaming with zero additional dependencies.

Base URL and Authentication

Our API mirrors the OpenAI v1 interface, allowing you to swap endpoints without changing your application logic. Use https://api.groknsfw.top/v1 as your base URL. Authentication requires a valid API key passed in the Authorization header as a Bearer token. You can generate this key instantly via Google sign-in or email on the dashboard. Each account supports one active key at a time; issuing a new key invalidates the previous one immediately. This single-key model simplifies access control for most development and QA environments.

First Request

Send a standard chat completion request to test connectivity. The model identifier is uncensored, which handles content refusals differently than standard models. Below is a basic example using the curl command line tool to verify your key and base URL are correct.

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

If you receive a JSON response with choices and usage, your integration is active. Check the usage object to see token consumption for accurate billing tracking.

Python SDK Integration

Use the official openai Python package to interact with our endpoint. Set the base_url and api_key attributes before making calls. This approach works with any library that supports the OpenAI schema, making migration from other providers straightforward.

from openai import OpenAI

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

This snippet demonstrates a synchronous request. For high-throughput NSFW content generation, consider using asynchronous clients to handle multiple requests concurrently without blocking your main thread.

Node.js SDK Setup

For JavaScript or TypeScript applications, configure the OpenAI SDK to point to our base URL. This ensures your existing client code works without modification. The Node.js ecosystem benefits from this compatibility, allowing rapid prototyping of NSFW chat interfaces.

import OpenAI from "openai";

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

Ensure you are using a recent version of the SDK that supports custom base URLs. The configuration object should strictly include the apiKey and baseURL properties to avoid endpoint mismatches.

Streaming Responses (SSE)

Enable real-time token generation by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream, delivering tokens as they are generated. This reduces perceived latency for end-users in chat applications.

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)

Parse the SSE events to extract the delta content. The final chunk in the stream contains the total usage statistics, which you should use for accurate billing reconciliation. Streaming does not affect token counting or pricing.

Limits, Errors, and Context

Your requests are subject to a limit of 300 per minute and 8 concurrent requests per key. The maximum request body size is 8 MB, and the context window supports up to 100,000 tokens total. Errors are returned in standard HTTP formats: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Credit errors are free, but rate limits require you to throttle requests. There is no separate output cap; omitting max_tokens lets the response run to the end of the window.

Specs at a glance

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

SpecValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyBearer token in the Authorization header
Base URLhttps://api.groknsfw.top/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
JSON moderesponse_format: {"type": "json_object"}
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Max context100,000 tokens (prompt + completion together)
StreamingSupported (stream: true), usage included at the end
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300/min per key
Concurrencyup to 8 in parallel per key
Request size8 MB request body
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
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
Subscriptionpaid credit never expires, no subscription
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Sign-inGoogle or e-mail and password
Key managementone active key per account; a new key replaces the old one
Contentuncensored for adults; the only hard rule: no sexual content involving minors

Error codes

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
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_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this the official Grok API?

No, we are an independent service hosting an open-weight model tuned for uncensored responses. We use the same API protocol as OpenAI, but our model is not GPT-4, Grok, or any other vendor's model. Check the vendor's documentation for their specific model details.

How do I get more API keys?

Each account is limited to one active API key at a time. Generating a new key on the dashboard will immediately invalidate the previous key. This design simplifies access management for individual developers and small teams.

Do you support function calling?

Yes, the API supports standard function calling via the tools and tool_choice parameters. You can also enforce JSON output using response_format: { "type": "json_object" } for structured data generation.

Your key is one form away

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

Get API key