The short answer
If you are searching for the minimax openai base url, here it is for this service: https://api.minimaxnsfw.com/v1. Put that in the base URL field of any OpenAI-compatible SDK or app, use your key from this site, and set the model to uncensored. Requests then go to POST /v1/chat/completions, the same route the OpenAI libraries already call.
One clarification before the code. This site is not the official MiniMax API and is not run by MiniMax. It hosts one open-weight text model, operated by an independent provider and tuned to answer without content refusals for lawful adult use. You get an OpenAI-shaped endpoint, so code written for the OpenAI client works with two changed values. If you need MiniMax's own hosted models, use the endpoint and keys from their documentation.
| Setting | Value |
|---|---|
| Base URL | https://api.minimaxnsfw.com/v1 |
| Model | uncensored |
| Auth header | Authorization: Bearer YOUR_KEY |
| Chat route | POST /v1/chat/completions |
| Model list | GET /v1/models |
You can get a key on the API key page. New accounts can claim a $0.50 trial credit there with one click, no payment needed.
Python with the openai package
The official openai package takes a base_url argument on the client. That is the only place the address goes. Install the package with pip install openai, then:
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": "system", "content": "You are a concise writing assistant."},
{"role": "user", "content": "Give me three opening lines for a noir story."},
],
temperature=0.8,
)
print(resp.choices[0].message.content)
print(resp.usage)
The base URL already ends in /v1, so the SDK builds https://api.minimaxnsfw.com/v1/chat/completions on its own. Parameters such as temperature, top_p, stop, seed and the frequency and presence penalties are passed through to the model.
The usage field tells you how many prompt and completion tokens the call used, which is the number you are billed on. Printing it during the first tests is a cheap way to learn what your prompts cost.
Node.js and curl
The Node package works the same way, with baseURL spelled in camel case:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.minimaxnsfw.com/v1",
apiKey: process.env.MINIMAX_KEY,
});
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Summarize the plot of Hamlet in two sentences." }],
});
console.log(resp.choices[0].message.content);
For a first smoke test, curl is faster than any SDK because it removes every layer between you and the server:
curl https://api.minimaxnsfw.com/v1/chat/completions \
-H "Authorization: Bearer $MINIMAX_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'
To see which model IDs the endpoint exposes, call the list route. It should show uncensored:
curl https://api.minimaxnsfw.com/v1/models \
-H "Authorization: Bearer $MINIMAX_KEY"
# expected in the list: "uncensored"
If curl works and your app does not, the problem is in the app's settings, not in your key or the network.
Environment variables and other clients
Recent versions of the OpenAI SDKs read OPENAI_API_KEY and OPENAI_BASE_URL from the environment when you do not pass them in code. That lets you redirect an existing script without editing it:
export OPENAI_BASE_URL="https://api.minimaxnsfw.com/v1"
export OPENAI_API_KEY="YOUR_KEY"
# model name to use in requests: uncensored
python my_existing_script.py # still sends model="uncensored" if you set it
Remember that the script must also ask for the model uncensored. A script hard-coded to another model name will send that name to our endpoint, and the request will not do what you expect.
Frameworks and apps follow one of two patterns:
- A base URL field. Many tools, including front ends such as SillyTavern, let you add a custom OpenAI-compatible endpoint. Paste the base URL, the key, and the model name.
- A library parameter. LangChain's
ChatOpenAIacceptsbase_urlandapi_key, and most other wrappers around the OpenAI client expose similar arguments.
Field labels differ. Look for names like "API base", "endpoint", "custom URL" or "OpenAI-compatible host". If the app asks for a full route rather than a base, give it https://api.minimaxnsfw.com/v1/chat/completions; if it asks for a base, stop at /v1.
Streaming, JSON mode and tools use the same address
You do not need a different URL for the other features. Set stream: true and the response arrives as server-sent events, with token usage in the final chunk. Set response_format to {"type": "json_object"} for JSON mode. Tool calling works with tools and tool_choice, and tool results go back as messages with role: "tool".
from openai import OpenAI
client = OpenAI(base_url="https://api.minimaxnsfw.com/v1", api_key="YOUR_KEY")
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a four-line poem about rain."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
The feature list ends at text. There is no image or audio generation, no embeddings and no fine-tuning, so do not point an embeddings call at this base URL. For the full parameter list and more examples, see the quickstart docs.
Common mistakes and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| 404 on every request | Base URL missing /v1, or the route was added twice | Use exactly https://api.minimaxnsfw.com/v1 as the base |
| 401 or an auth error | Key from another service, or a stray space or newline in the key | Paste the key from this site again and trim whitespace |
| Model not found | Wrong model name in the request | Send "model": "uncensored" |
429 with rate_limited | Over 300 requests per minute on a full key, or 60 on a trial key | Slow down or batch less aggressively |
429 with concurrency | More than 8 requests at once (2 on a trial key) | Cap parallel workers; a stream holds its slot until it ends |
429 with Retry-After: 5 | Temporary overload | Wait the five seconds and retry |
Retry logic should honor the Retry-After header when it is present and back off when it is not. Every response carries X-Request-Id, which is worth logging so you can quote it if you contact support. The X-Balance-USD header shows your remaining credit after each call.
When this is the wrong base URL
Be honest about what you are buying. If your project needs a specific MiniMax model, or you need its exact behavior, this endpoint will not give you that. It serves a single independent open-weight model under the ID uncensored, and it is not a router that forwards to other vendors.
It fits when you want an OpenAI-compatible endpoint for fiction, roleplay, companion apps or editorial tools for lawful adult use, and you are tired of refusals. One hard limit applies to everything: no sexual content involving minors. Prompts are not used for training.
Pricing is pay as you go from prepaid credit: $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no subscription and no charge for failed or refused requests. Top-ups are accepted in crypto, USDT on TRC20 or USDC on Base, from $20 to $500. The pricing page has the bonus tiers.
