Quickstart for MiniMax NSFW users
Get your first response in under five minutes by pointing your standard OpenAI SDK to our uncensored endpoint.
Base URL and Headers
To use our uncensored miniMax api, you need only two things: a valid API key and the correct base URL. Create your key on the Get API key page using your Google account or an email address. No phone number is required, and the key is displayed immediately for you to copy.
Our service is an openai compatible uncensored api, meaning it follows the standard REST structure. You do not need to rewrite your integration logic; you simply update the base URL in your client configuration.
All requests must include the standard Authorization header. Ensure your client is configured to send requests to our specific domain, as this is the only endpoint that serves the uncensored model.
First Request
Your first request should be a simple chat completion to verify connectivity and response format. Use the model ID uncensored to access the large language model hosted on our servers. This model is designed to provide raw output without standard content refusals for lawful adult use.
Below is a standard cURL command to test the endpoint. Replace YOUR_API_KEY with the key you generated during signup.
This request returns a standard JSON object containing the assistant's reply. If you receive a response, your integration is working correctly.
curl https://api.minimaxnsfw.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
Most developers prefer using the official OpenAI Python SDK for its ease of use. To connect to our minimax nsfw service, initialize the client with our base URL and your API key.
The code structure remains identical to standard GPT-4 or GPT-3.5 integrations. The only difference is the endpoint target. This allows you to swap models without changing your application logic.
Ensure you have the openai package installed. The example below demonstrates a basic text generation request.
from openai import OpenAI
client = OpenAI(base_url="https://api.minimaxnsfw.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 SDK Integration
For JavaScript and TypeScript developers, the OpenAI Node SDK provides a clean interface. Configure the client with the baseURL pointing to our API.
This approach is ideal for web servers or serverless functions. The SDK handles retries and response parsing automatically. You can run this code in any Node.js environment that supports the OpenAI package.
Remember that the model ID is always uncensored. This ensures you are interacting with the specific uncensored variant we host.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.minimaxnsfw.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
For applications that benefit from real-time token display, our API supports Server-Sent Events (SSE). Enable streaming by setting stream: true in your request parameters.
The SDK will emit events for each token as it is generated. The final chunk in the stream contains the token usage statistics, allowing you to track consumption accurately.
This is particularly useful for chat interfaces where users expect immediate feedback. The latency is generally low, but network conditions may vary.
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
Our infrastructure enforces specific limits to ensure stability. You are allowed 300 requests per minute per key, with a concurrency limit of 8 requests at the same time. The maximum request body size is 8 MB.
Common errors include 401 for invalid or missing keys, 402 if your prepaid credit is exhausted, and 429 if you exceed the rate limit. Errors and refusals do not consume credit.
The context window is 100,000 tokens total (prompt + completion). If you do not specify max_tokens, the response can run to the end of the window. You can set a value if your use case requires shorter responses.
API facts in one table
Before you integrate, here is exactly what you get with a key.
| Spec | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Authentication | Authorization: Bearer YOUR_KEY |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| Base URL | https://api.minimaxnsfw.com/v1 |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Context window | 100,000 tokens, input and output combined |
| SSE streaming | Supported (stream: true), usage included at the end |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Structured output | JSON object mode via response_format json_object |
| Max body | up to 8 MB per request |
| Rate limit | 300/min per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | 8 requests at the same time per key |
| 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 |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Credit expiry | no monthly fee; paid credit does not expire |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Account | sign in with Google or with e-mail + password |
Error reference
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
How does pricing work for uncensored miniMax api usage?
You pay only for real token usage: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free. Credit is prepaid via crypto and never expires.
What is the maximum output length for a single request?
There is no separate output cap. If you omit the max_tokens parameter, the response can run to the end of the window. The total context window (input + output) is 100,000 tokens.
Do I need a credit card to start?
No. You can sign up with Google or email. New accounts receive $0.50 in trial credit valid for 7 days. Claim this credit with one click on your API key page. No card is needed to begin. Top-ups are processed via USDT or USDC.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.