EN ▾
Get API key

MiniMax OpenAI Base URL: Connect Any Client to Our API

The minimax openai base url question has a short answer on this site: our endpoint is https://api.minimaxnsfw.com/v1, and anything that speaks the OpenAI chat format can use it. This page shows the exact settings for the common SDKs and clients.

Updated

Key points

  1. Base URL: https://api.minimaxnsfw.com/v1, model ID uncensored, key sent as a Bearer token.

  2. Change two values in an existing OpenAI client: base URL and API key. Nothing else in your code has to move.

  3. Do not append /chat/completions to the base URL; the SDK adds the path itself.

  4. This is an independent open-weight model, not the official MiniMax API.

Isometric illustration of a cable connecting a client to an API endpoint

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.

SettingValue
Base URLhttps://api.minimaxnsfw.com/v1
Modeluncensored
Auth headerAuthorization: Bearer YOUR_KEY
Chat routePOST /v1/chat/completions
Model listGET /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 ChatOpenAI accepts base_url and api_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

SymptomLikely causeFix
404 on every requestBase URL missing /v1, or the route was added twiceUse exactly https://api.minimaxnsfw.com/v1 as the base
401 or an auth errorKey from another service, or a stray space or newline in the keyPaste the key from this site again and trim whitespace
Model not foundWrong model name in the requestSend "model": "uncensored"
429 with rate_limitedOver 300 requests per minute on a full key, or 60 on a trial keySlow down or batch less aggressively
429 with concurrencyMore 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: 5Temporary overloadWait 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.

Questions and answers

What is the base URL for this API?

Use https://api.minimaxnsfw.com/v1 as the base URL and the model ID uncensored. The chat route is POST /v1/chat/completions.

Is this the official MiniMax API?

No. It is an independent provider running one open-weight model, and it is not affiliated with MiniMax or any other model vendor.

Do I need to change my code beyond the base URL?

Usually you change the base URL, the API key and the model name. Parameters like temperature, top_p, stop, seed and the penalties are passed through.

Can I test before paying?

Yes. New users can claim $0.50 of trial credit with one click on the API key page. It lasts 7 days and needs no payment.

Your key is one form away

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

Get API key