EN ▾
Get API key

MiniMax API Base URL: Which Endpoint to Use

If you searched for the minimax api base url because you want to point existing OpenAI-style code at an uncensored model, the value to use here is https://api.minimaxapi.cc/v1. This page shows where it goes in code and in chat tools, and how to check that it works.

Isometric illustration of an endpoint address routing data from a terminal to a server

Key points

  • Base URL: https://api.minimaxapi.cc/v1, with the /v1 included and nothing after it.
  • Model ID is uncensored, and the key goes in an Authorization: Bearer header.
  • Two endpoints exist: POST /v1/chat/completions and GET /v1/models.
  • This is not the official MiniMax API. It is a hosted open-weight model behind an OpenAI-compatible interface.

The short answer

Three values are all a client needs. Put them in the settings of your SDK, your script or your chat app and you are connected.

SettingValue
Base URLhttps://api.minimaxapi.cc/v1
Modeluncensored
API keyYour key, sent as Authorization: Bearer YOUR_KEY

This is a separate service. It is not the official API of MiniMax or of any other model vendor, so the key from a MiniMax account will not work here, and a key from this site will not work there. If you need MiniMax's own endpoint, check their documentation for it. What you get on this site is one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use.

The quickest test is a single curl call. Replace YOUR_KEY with a real key and run it in a terminal:

curl https://api.minimaxapi.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "uncensored", "messages": [{"role": "user", "content": "Say hello in five words."}]}'

If a JSON reply with a choices array comes back, the base URL is right and everything else in this article is optional reading.

Why changing one string is enough

The service speaks the same wire format as the OpenAI Chat Completions API. An OpenAI SDK builds a request from three parts: a base URL, a path such as /chat/completions, and your headers. When you change only the base URL and the key, the SDK sends the same request shape to a different host. Messages, temperature, top_p, stop, seed and the penalty parameters are passed through to the model.

That is why the base URL is the whole migration for most projects. You do not install a special client, and you do not rewrite your message-building code. Streaming with stream: true, tool calling and JSON mode via response_format all use the standard field names, so code written for those features keeps working.

Two methods exist and no more: POST /v1/chat/completions for generation and GET /v1/models for listing. There are no endpoints for images, audio, embeddings or fine-tuning. If your application calls an embeddings route today, that part has to stay with whatever provider you use for it now.

Python with the openai package

Install the official package with pip install openai. Then create the client with the base URL and your key, and pass uncensored as the model.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.minimaxapi.cc/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You are a concise assistant."},
        {"role": "user", "content": "List three uses for a base URL override."},
    ],
)
print(resp.choices[0].message.content)

Hard-coding a key is fine for a test and a poor habit afterwards. The Python SDK also reads two environment variables, OPENAI_API_KEY and OPENAI_BASE_URL. If you export both, you can build the client with no arguments, and the same script runs against any compatible endpoint by changing the environment alone.

export OPENAI_BASE_URL="https://api.minimaxapi.cc/v1"
export OPENAI_API_KEY="YOUR_KEY"
python - <<'PY'
from openai import OpenAI
c = OpenAI()
r = c.chat.completions.create(model="uncensored", messages=[{"role": "user", "content": "ping"}])
print(r.choices[0].message.content)
PY

The environment route is handy when a library creates its own OpenAI client internally and gives you no place to pass a URL. Set the variables before the process starts and the library picks them up.

Node.js and plain fetch

The official Node package takes the same two options, with different spelling. Install it with npm install openai.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.minimaxapi.cc/v1",
  apiKey: process.env.API_KEY,
});

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Name one thing a base URL controls." }],
});
console.log(resp.choices[0].message.content);

If you would rather skip an SDK, a bare fetch call is short. You build the full URL yourself, so this is also a good way to see exactly which path gets appended to the base.

const res = await fetch("https://api.minimaxapi.cc/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "uncensored",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
console.log((await res.json()).choices[0].message.content);

Entering the URL in chat apps and other tools

Many front ends have a field for a custom OpenAI-compatible provider. SillyTavern, for instance, lets you add an OpenAI-compatible endpoint, and a lot of other chat clients and coding tools offer the same thing under names like "Custom endpoint", "OpenAI-compatible" or "API base". The field labels differ, but the content is always the same three values from the table at the top of this page.

  1. Choose the custom or OpenAI-compatible provider type.
  2. Paste https://api.minimaxapi.cc/v1 into the base URL or API base field.
  3. Paste your key into the key field.
  4. Type uncensored into the model field. If the tool offers a model picker that calls GET /v1/models, it should list the same ID.
  5. Send a short test message before you load a long character card or a large project.

Some tools ask for the full chat completions URL rather than a base. That is a different field with a different meaning, and the next section explains how to tell them apart.

Base URL mistakes and what they look like

Almost every failed first connection comes from one of a handful of slips. The table lists the usual ones. Exact error wording varies between clients, so treat the symptom column as a guide.

What you enteredUsual symptomFix
Host only, with no /v1404 or "not found"Add /v1 to the end
Full path ending in /chat/completions in a base URL field404, because the client appends the path againRemove the path and keep it at /v1
Trailing slash after /v1Sometimes a double slash in the request path and a 404Drop the trailing slash
Wrong or missing key401Check the Bearer header and the pasted key for stray spaces
A model name from another providerModel error in the replyUse uncensored
http:// instead of https://Failed connection or redirect problemsUse https://

Check the models list first

When a tool will not connect, take the tool out of the picture and call the models route directly. It costs nothing and tells you whether the URL and key are both valid.

curl https://api.minimaxapi.cc/v1/models \
  -H "Authorization: Bearer YOUR_KEY"
# model to use in requests: "uncensored"

If that works and the tool still fails, the problem is inside the tool's settings, usually the field that holds the URL. If it fails here too, look at the key and the URL spelling.

Moving existing MiniMax-style code over

Suppose you have a script that talks to a hosted model through an OpenAI-style client. Moving it takes three edits: the base URL, the key and the model name. Everything about message structure stays. Keep the base URL in one place, such as a settings file or an environment variable, so a later switch is one line.

Check a few behaviours before you flip production traffic. The context window is 100,000 tokens counting prompt plus completion, and max_tokens is optional. The full key allows 8 requests at once and 300 requests per minute. Over those limits you get HTTP 429, and a retry loop with a short wait handles it. Prompts are not used for training. Output is text only, so anything that expects images or audio back needs another source.

The quickstart in the docs walks through the same migration with more examples, and the pricing page shows the per-token rates: $0.15 per million input tokens and $0.50 per million output tokens, billed from prepaid credit. If you do not have a key yet, get an API key first. New accounts can claim $0.50 of trial credit with one click on the key page, which is enough for a few hundred short test calls. The article on common API mistakes covers other setup slips beyond the URL.

Questions and answers

What is the base URL for this API?

Use https://api.minimaxapi.cc/v1. Include /v1 and leave off any trailing slash or endpoint path, because your client adds /chat/completions itself.

Is this the official MiniMax API endpoint?

No. It is an independent hosted service running one open-weight model behind an OpenAI-compatible interface. For MiniMax's own endpoint, check MiniMax's documentation.

Which model name do I send?

Send uncensored as the model value. You can confirm it by calling GET /v1/models with your key.

Can I use the base URL with the OpenAI SDK without code changes?

You change the base URL, the key and the model name, and the rest of a chat completions script usually runs as is. Set OPENAI_BASE_URL and OPENAI_API_KEY if the code builds its client without arguments.

Does the API need a card to try it?

No. After sign-up you can claim $0.50 of trial credit with one click on the API key page. It needs no card and is valid for 7 days.

Your key is one form away

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