Paste your key to see what is left on it and every request it has made.
| Time | Model | Tokens | Charged | Status |
|---|
No requests yet.
Claude, GPT, Gemini, Grok and more in Claude Code, Codex, Cursor, Cline and the rest — one address, one key, one balance. Setup takes about five minutes.
sk-ntm- and it holds your
tokens — there is no account to create and nothing to sign in to.Pick your tool and follow the steps in order. Every tool needs the same three things: the address, your key and a model ID. Every model ID is in the Model IDs list — click one to copy it.
https://api.mawen8899.comsk-ntm-).claude-opus-4-8 — exactly this; it is what reaches the
server. Short names like opus-4.8 do not work.opus.claude-opus-… → opus,
claude-sonnet-… → sonnet, claude-fable-… → fable.
The first model in the list is the one the app starts with. Only Claude models belong
in this screen: GPT and the other models speak the OpenAI format, so use one of the other
tools for those.
~/.claude/settings.json
Windows%USERPROFILE%\.claude\settings.json
env block:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.mawen8899.com",
"ANTHROPIC_AUTH_TOKEN": "sk-ntm-…",
"ANTHROPIC_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "claude-fable-5-1",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
}
}
If the file already exists, add the env block to it instead of replacing
the file.
ANTHROPIC_MODEL the model claude starts with
ANTHROPIC_DEFAULT_OPUS_MODEL the model behind the name "opus"
ANTHROPIC_DEFAULT_SONNET_MODEL the model behind "sonnet"
ANTHROPIC_DEFAULT_FABLE_MODEL the model behind "fable"
ANTHROPIC_DEFAULT_HAIKU_MODEL the model behind "haiku" — and the one
used for small background requests
Every value is a full model ID from the model table below. Keep
"haiku" on Haiku 5.5, the cheapest model: titles and summaries run on it in the background,
and without that line they go to your main — more expensive — model.
To put a different model behind a name, change its line, for example
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5".
claude. Switch models whenever you like, without leaving the session:
/model sonnet → claude-sonnet-5
/model fable → claude-fable-5-1
/model opus → claude-opus-4-8
/model haiku → claude-haiku-5-5
/model claude-opus-5-5 → any full model ID works as well
Or start straight on one: claude --model sonnet. The file is read at startup,
so restart claude after you edit it.
export ANTHROPIC_BASE_URL="https://api.mawen8899.com"
$env:ANTHROPIC_BASE_URL = "https://api.mawen8899.com"
settings.json is the permanent place.
sk-ntm-…https://api.mawen8899.com/v1gpt-5.6-luna.~/.codex/config.toml
Windows%USERPROFILE%\.codex\config.toml
model = "gpt-5.6-luna"
model_provider = "mawen"
[model_providers.mawen]
name = "Mawen API"
base_url = "https://api.mawen8899.com/v1"
env_key = "MAWEN_API_KEY"
wire_api = "responses"
To use another model, put any ID from the GPT group of the
model table on the model line.
export MAWEN_API_KEY="sk-ntm-…"
$env:MAWEN_API_KEY = "sk-ntm-…"
[System.Environment]::SetEnvironmentVariable('MAWEN_API_KEY', 'sk-ntm-…', 'User')
Then close the terminal and open a new one.
touch ~/.zshrc and press Return. It creates the
file if it is missing and changes nothing if it is already there.~/.zshrc in the box and press Return — the file comes up selected.sk-ntm-…:
export MAWEN_API_KEY="sk-ntm-…"echo 'export MAWEN_API_KEY="sk-ntm-…"' >> ~/.bashrc
Then close the terminal and open a new one.
codex again.
mkdir -p ~/.config/opencode && touch ~/.config/opencode/opencode.json && open -t ~/.config/opencode/opencode.json
mkdir -p ~/.config/opencode && nano ~/.config/opencode/opencode.json
mkdir -Force "$HOME\.config\opencode" | Out-Null; notepad "$HOME\.config\opencode\opencode.json"
sk-ntm-…, and save:
{
"$schema": "https://opencode.ai/config.json",
"model": "mawen/gpt-6-luna",
"provider": {
"mawen": {
"npm": "@ai-sdk/openai-compatible",
"name": "Mawen API",
"options": {
"baseURL": "https://api.mawen8899.com/v1",
"apiKey": "sk-ntm-…"
},
"models": {
"gpt-6-luna": {
"name": "GPT 6 Luna",
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 200000, "output": 32000 }
},
"claude-opus-5-5": {
"name": "Opus 5.5",
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 200000, "output": 32000 }
}
}
}
}
}
This format works on both OpenCode 1.x and 2.x. For another model, add a block like these;
the IDs are in the Model IDs list. If the file already has other settings, add these
lines to them instead of replacing the file.
/models: your models are under Mawen API.
If they are not there, OpenCode did not load the file: check the file's name and folder first,
then look for a typing mistake. OpenCode skips a broken file without a word, so fix it before you
go on. Keep /v1 in baseURL.https://api.mawen8899.com/v1sk-ntm-…mawen) and the Display name (Mawen API).https://api.mawen8899.com/v1 and the API key
sk-ntm-…export MAWEN_API_KEY="sk-ntm-…"
$env:MAWEN_API_KEY = "sk-ntm-…"
~/.factory/settings.json
Windows%USERPROFILE%\.factory\settings.json
{
"customModels": [
{
"model": "claude-opus-4-8",
"displayName": "Mawen Opus 4.8",
"baseUrl": "https://api.mawen8899.com/v1",
"apiKey": "${MAWEN_API_KEY}",
"provider": "generic-chat-completion-api",
"maxOutputTokens": 16384
}
]
}
droid, execute /model and pick the entry from
Custom models. settings.json uses camelCase fields (do not mix it with the legacy
config.json / snake_case), the provider is generic-chat-completion-api, and
${VAR} only works in settings.json.mkdir -p ~/.pi/agent && touch ~/.pi/agent/models.json && open -t ~/.pi/agent/models.json
mkdir -p ~/.pi/agent && nano ~/.pi/agent/models.json
mkdir -Force "$HOME\.pi\agent" | Out-Null; notepad "$HOME\.pi\agent\models.json"
sk-ntm-…, and save:
{
"providers": {
"mawen": {
"name": "Mawen API",
"baseUrl": "https://api.mawen8899.com/v1",
"api": "openai-completions",
"apiKey": "sk-ntm-…",
"models": [
{
"id": "gpt-6-luna",
"name": "GPT 6 Luna",
"input": ["text", "image"],
"contextWindow": 200000,
"maxTokens": 32000
},
{
"id": "claude-opus-5-5",
"name": "Opus 5.5",
"input": ["text", "image"],
"contextWindow": 200000,
"maxTokens": 32000
}
]
}
}
}
For another model, add a block like these; the IDs are in the Model IDs list. If the
file already has other providers, add only the mawen block next to them.
pi, type /model, move to a model marked
[mawen] and press Ctrl+S: it is selected and stays your default.mkdir -p ~/.omp/agent && touch ~/.omp/agent/models.yml && open -t ~/.omp/agent/models.yml
mkdir -p ~/.omp/agent && nano ~/.omp/agent/models.yml
mkdir -Force "$HOME\.omp\agent" | Out-Null; notepad "$HOME\.omp\agent\models.yml"
sk-ntm-…, and save:
providers:
mawen:
baseUrl: https://api.mawen8899.com/v1
api: openai-completions
apiKey: sk-ntm-…
models:
- id: gpt-6-luna
name: Mawen GPT 6 Luna
reasoning: false
input: [text, image]
contextWindow: 200000
maxTokens: 32000
- id: claude-opus-5-5
name: Mawen Opus 5.5
reasoning: false
input: [text, image]
contextWindow: 200000
maxTokens: 32000
For another model, add a block like these; the IDs are in the Model IDs list. If the
file already has a providers: line, add only the mawen block under
it.
omp models mawen must list your models.omp. On the first launch, press Esc at
Set up your providers; at Choose your default model, type mawen and
pick a model. To change it later, type /model, find the model and assign it to
Default.hermes config edit. It lives here:
~/.hermes/config.yaml
Windows%LOCALAPPDATA%\hermes\config.yaml
model: line at the far left of the file. Delete it and all the indented
lines under it, paste this in its place with your own key instead of sk-ntm-…, and
save:
model:
provider: custom:mawen
default: gpt-6-luna
providers:
mawen:
name: Mawen API
api: https://api.mawen8899.com/v1
api_key: sk-ntm-…
transport: chat_completions
default_model: gpt-6-luna
discover_models: false
models:
gpt-6-luna:
context_length: 200000
supports_vision: true
claude-opus-5-5:
context_length: 200000
supports_vision: true
Only one model: and one providers: line may start at the far left
of the file; lines with spaces or # in front do not count. With a second one,
Hermes cannot read the file and your settings do not apply. For another model, add it under
models: the same way; the IDs are in the Model IDs list.
hermes chat --oneshot -q "Reply with exactly OK". A reply means it
works.hermes. /model opens the list:
Mawen API, then the model. That choice lasts for the session; to keep it, type
/model claude-opus-5-5 --global.openclaw setup --baseline first.touch mawen.patch.json && open -t mawen.patch.json
nano mawen.patch.json
notepad mawen.patch.json
sk-ntm-…, and save:
{
"models": {
"mode": "merge",
"providers": {
"mawen": {
"baseUrl": "https://api.mawen8899.com/v1",
"apiKey": "sk-ntm-…",
"api": "openai-completions",
"models": [
{
"id": "gpt-6-luna",
"name": "Mawen GPT 6 Luna",
"input": ["text", "image"],
"contextWindow": 200000,
"maxTokens": 32000
},
{
"id": "claude-opus-5-5",
"name": "Mawen Opus 5.5",
"input": ["text", "image"],
"contextWindow": 200000,
"maxTokens": 32000
}
]
}
}
},
"agents": {
"defaults": {
"model": { "primary": "mawen/gpt-6-luna" },
"models": {
"mawen/gpt-6-luna": { "alias": "mw-luna" },
"mawen/claude-opus-5-5": { "alias": "mw-opus" }
}
}
}
}
For another model, add a block to the models list and a line with its alias
under agents; the IDs are in the Model IDs list.
openclaw config patch --file ./mawen.patch.json. This
adds these lines and leaves your other settings as they are. Then delete
mawen.patch.json: your key is in it.openclaw chat. Switch models with /model mw-opus or
/model mw-luna. To change the default:
openclaw models set mawen/claude-opus-5-5.kimi --version: it must start with 2. Version 1.x is the old tool and reads
a different file.mkdir -p ~/.kimi-code && touch ~/.kimi-code/config.toml && open -t ~/.kimi-code/config.toml
mkdir -p ~/.kimi-code && nano ~/.kimi-code/config.toml
mkdir -Force "$HOME\.kimi-code" | Out-Null; notepad "$HOME\.kimi-code\config.toml"
sk-ntm-…, and save:
default_model = "mawen/gpt-6-luna"
[providers.mawen]
type = "openai"
base_url = "https://api.mawen8899.com/v1"
api_key = "sk-ntm-…"
[models."mawen/gpt-6-luna"]
provider = "mawen"
model = "gpt-6-luna"
display_name = "Mawen GPT 6 Luna"
max_context_size = 200000
capabilities = ["tool_use", "image_in"]
[models."mawen/claude-opus-5-5"]
provider = "mawen"
model = "claude-opus-5-5"
display_name = "Mawen Opus 5.5"
max_context_size = 200000
capabilities = ["tool_use", "image_in"]
The default_model line must stay at the very top, above the first line that
starts with [, and only once. For another model, add a block like these; the IDs
are in the Model IDs list.
kimi in your project folder. You do not need /login: that is for
Kimi accounts only. Switch models with /model.
On Windows, Git for Windows must be installed first: Kimi Code does not run
without it.npx @deepseek-ai/dsh webnpx.cmd @deepseek-ai/dsh web
(it needs Node.js 24.9 or newer); it opens in your browser. Click Continue on Preview Notice, then Configure later on
Add an API key to get started. In the desktop app, go straight to step 2.mawen, Display name → Mawen API.https://api.mawen8899.com/v1, API protocol →
OpenAI Chat Completions.sk-ntm-…Any application that speaks the OpenAI or the Anthropic API works: give it the address, the key and a model ID.
OpenAI format: https://api.mawen8899.com/v1
Anthropic format: https://api.mawen8899.com (without /v1)
Authorization: Bearer sk-ntm-…
# OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(base_url="https://api.mawen8899.com/v1", api_key="sk-ntm-…")
# curl
curl https://api.mawen8899.com/v1/chat/completions \
-H "Authorization: Bearer sk-ntm-…" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"Hello"}],"stream":true}'
Both formats accept x-api-key and Authorization: Bearer, and both
draw from the same balance.
Your balance is held in tokens, and every model draws from the same pool — but not at the same rate. Each model has a coefficient: the tokens a request uses are multiplied by that number before they come off your balance. A request that uses 50,000 tokens costs 100,000 tokens on a ×2 model and 500,000 on a ×10 one.
The cheapest are claude-haiku-5-5, deepseek-v4-flash and mimo-v2.6-flash (×1), ideal for short, simple tasks. For everyday work claude-sonnet-4-6 and gpt-6-luna are the most economical. Keep claude-opus-5-5 and gpt-6-astra for the genuinely hard problems; the fable family is the most capable and the fastest to spend.
claude-opus-4-8 works. opus-4.8 and Opus 4.8 do not —
they come back as “model does not exist”.
Your very first message will use several thousand tokens. That is normal: coding agents attach their own instructions, their tool definitions and your project context to every request.
/clear in
Claude Code, a new session in Codex. This one habit saves more than all the others together.No. Your key is the whole thing: no account to create, nothing to sign in to. You never sign in to chatgpt.com or claude.ai and you never hand a password to anyone.
No. Mawen API is an independent gateway that speaks the OpenAI and Anthropic API formats exactly — which is why your tools work without any change. Your usage is not billed by OpenAI or Anthropic, and the service is not affiliated with them.
Yes. The same key is accepted in both formats and both draw from the same token balance.
Anthropic-format tools use https://api.mawen8899.com; OpenAI-format tools add
/v1.
Requests stop with a 402 error. Order more tokens; if you receive a new key, put it where the old one was — the address and the models stay the same.
The model ID is not exactly right. Copy it from the model table:
claude-opus-4-8, not opus-4.8; gpt-5.6-luna, not
GPT 5.6 Luna.
An exported variable lives only in the terminal you typed it in. Make it permanent; step 3
of the Codex card walks you through it.
On Windows you run the SetEnvironmentVariable command once.
On macOS you open ~/.zshrc from Finder
(⌘ Cmd + Shift + G) and add the export line at the bottom.
On Linux you add the export line to the bottom of
~/.bashrc.
Then open a new terminal.
Three things add up: your tool sends its own system instructions with every request, it re-sends the conversation so far, and the cost is multiplied by the model's coefficient. Every request, with its tokens, is in your key's history in the box at the top.
Don't. Anyone holding your key spends its tokens. Never put it in a public repository, a screenshot or a shared file. If you think it has leaked, message us: we switch it off and move what is left to a new key.
Remove the address and key you added, then close the application completely and reopen it. Your projects and your other settings are untouched.
Stuck somewhere? Message us — tell us which step you are on and send the error message word for word.