MiniMax-M2
Call MiniMax-M2 through the same OpenAI-compatible endpoint as every other model here — one key, one base URL, billed per token from your prepaid credit.
Prepaid. Credit never expires.
Call it
These snippets already point at our endpoint and this model. Replace the key with your own.
from openai import OpenAI
client = OpenAI(
base_url="https://hostaihub.com/v1",
api_key="sk-hah-YOUR-KEY"
)
resp = client.chat.completions.create(
model="MiniMax-M2",
messages=[{"role": "user", "content": "Hello!"}]
)
print(resp.choices[0].message.content)
curl https://hostaihub.com/v1/chat/completions \
-H "Authorization: Bearer sk-hah-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M2",
"messages": [{"role":"user","content":"Hello!"}]
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://hostaihub.com/v1",
apiKey: "sk-hah-YOUR-KEY",
});
const r = await client.chat.completions.create({
model: "MiniMax-M2",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);
stream = client.chat.completions.create(
model="MiniMax-M2",
messages=[{"role": "user", "content": "Hi"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
Token usage is metered on streamed replies too, so your balance stays accurate.
How you are billed
Per token, per request
Input and output tokens are counted separately at the rates above, and the exact cost is deducted from your credit as each request completes.
Prepaid, never a surprise bill
You can only spend credit you have already bought. When it runs out, requests are refused rather than billed onward.
Every request itemised
Your dashboard lists each call with its model, tokens in and out, and what it cost — no monthly reconciliation needed.
Endpoints
Base URL https://hostaihub.com/v1
- POST /chat/completions
- POST /completions
- POST /embeddings
- GET /models
Compatibility
Anything that speaks the OpenAI API works unchanged — the official Python and Node SDKs, LangChain, LlamaIndex, Cursor, Continue, and most desktop chat clients. Point the base URL here and use your key.