MantAPI API documentation
One endpoint for Claude, GPT, Gemini, Grok and more. MantAPI is OpenAI-compatible, so most SDKs, CLIs and desktop clients work by pointing them at one base URL.
| Base URL | https://www.usmanta.com |
|---|---|
| OpenAI-compatible | https://www.usmanta.com/v1 |
| Auth header | Authorization: Bearer YOUR_KEY |
/v1. Claude Code, Gemini CLI and Codex CLI use the root base URL (no /v1).Quick start
Get an API key
Access is invite-only — contact sales, then copy your key from the dashboard.
Set the base URL
Point your client at https://www.usmanta.com/v1.
Call any model
Send a request; switch models by changing one field.
curl https://www.usmanta.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.4","messages":[{"role":"user","content":"Hello"}]}'Platform overview
Which address to use per client. Most use /v1; the three official CLIs use the root host.
| Client | Protocol | Address |
|---|---|---|
| HTTP / OpenAI SDK | OpenAI | …/v1 |
| Claude Code | Anthropic | root |
| Gemini CLI | Gemini | root |
| Codex CLI | OpenAI Responses | root |
| OpenCode / OpenClaw / Hermes | OpenAI | …/v1 |
| Cherry Studio | OpenAI | …/v1 |
| WorkBuddy | OpenAI | …/v1/chat/completions |
| DeskClaw | OpenAI | …/v1 |
Host list
Primary host. Use it as the base for every example on this page.
https://www.usmanta.comHTTP examples
Chat completions and model listing over plain HTTP.
curl https://www.usmanta.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello"}
]
}'curl https://www.usmanta.com/v1/models \
-H "Authorization: Bearer YOUR_KEY"JavaScript SDK
Use the official openai npm package with a custom baseURL.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.API_KEY,
baseURL: "https://www.usmanta.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-5.4",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0]?.message?.content);Python SDK
Use the official openai package with a custom base_url.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KEY",
base_url="https://www.usmanta.com/v1",
)
response = client.chat.completions.create(
model="gpt-5.4",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Claude Code Verified
Set environment variables to the root host (no /v1), then restart the terminal.
export ANTHROPIC_BASE_URL="https://www.usmanta.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1env in ~/.claude/settings.json instead.Gemini CLI Verified
Point the Gemini CLI at the root host.
export GOOGLE_GEMINI_BASE_URL="https://www.usmanta.com"
export GEMINI_API_KEY="YOUR_KEY"
export GEMINI_MODEL="gemini-2.5-flash"Codex CLI Verified
Configure a custom provider in ~/.codex/config.toml and put the key in ~/.codex/auth.json.
model_provider = "OpenAI"
model = "gpt-5.4"
disable_response_storage = true
network_access = "enabled"
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://www.usmanta.com"
wire_api = "responses"
requires_openai_auth = true{ "OPENAI_API_KEY": "YOUR_KEY" }Codex desktop — one-click install Verified
Installs Codex CLI and configures it for MantAPI in one script — works for both the ChatGPT Codex desktop app and the CLI.
testkey in the script with your own MantAPI key (from the dashboard) before running.#!/usr/bin/env bash
set -euo pipefail
# ⚠️ Replace "testkey" with your own MantAPI key / 把 testkey 换成你自己的 MantAPI Key
MANTAPI_KEY='testkey'
CODEX_DIR="$HOME/.codex"
mkdir -p "$CODEX_DIR"
# Install / update Codex CLI (skip errors if you only use the desktop app)
if command -v npm >/dev/null 2>&1; then
npm install -g @openai/codex || echo "Codex CLI install failed. Run: npm install -g @openai/codex"
else
echo "npm not found. Install Node.js LTS (nodejs.org) for the CLI, or ignore for desktop-only."
fi
# Back up existing config
[ -f "$CODEX_DIR/config.toml" ] && cp "$CODEX_DIR/config.toml" "$CODEX_DIR/config.toml.bak.$(date +%Y%m%d%H%M%S)"
[ -f "$CODEX_DIR/auth.json" ] && cp "$CODEX_DIR/auth.json" "$CODEX_DIR/auth.json.bak.$(date +%Y%m%d%H%M%S)"
cat > "$CODEX_DIR/config.toml" <<'EOF'
model_provider = "mantapi"
model = "gpt-5.4"
model_reasoning_effort = "high"
preferred_auth_method = "apikey"
[model_providers.mantapi]
name = "MantAPI"
base_url = "https://www.usmanta.com/v1"
wire_api = "responses"
EOF
chmod 600 "$CODEX_DIR/config.toml"
printf '{\n "auth_mode": "apikey",\n "OPENAI_API_KEY": "%s"\n}\n' "$MANTAPI_KEY" > "$CODEX_DIR/auth.json"
chmod 600 "$CODEX_DIR/auth.json"
echo "MantAPI Codex configured ($CODEX_DIR). Fully quit & restart Codex / your terminal."
[ "$MANTAPI_KEY" = "testkey" ] && echo "WARNING: still using placeholder 'testkey' — edit ~/.codex/auth.json with your own key."Save as install-codex.sh and run bash install-codex.sh, or paste it straight into your terminal.
CC-Switch Verified
A Claude Code endpoint switcher. Map each provider group to its client and host:
OpenAI → Codex → https://www.usmanta.com
Anthropic/Claude → Claude Code → https://www.usmanta.com
Gemini → Gemini CLI → https://www.usmanta.com
Antigravity → Claude Code / Gemini CLI → https://www.usmanta.com/antigravityOpenCode Verified
Add a custom provider in opencode.json.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openai": {
"options": {
"baseURL": "https://www.usmanta.com/v1",
"apiKey": "YOUR_KEY"
}
}
}
}OpenClaw Verified
Define a custom provider in ~/.openclaw/openclaw.json. The key must live in the env block.
{
"env": { "MANTA_API_KEY": "YOUR_KEY" },
"agents": {
"defaults": { "model": { "primary": "manta/gpt-5.4" } }
},
"models": {
"mode": "merge",
"providers": {
"manta": {
"baseUrl": "https://www.usmanta.com/v1",
"apiKey": "${MANTA_API_KEY}",
"api": "openai-responses",
"models": [{ "id": "gpt-5.4", "name": "GPT-5.4" }]
}
}
}
}Hermes Verified
Configure a custom endpoint via ~/.hermes/config.yaml or interactively with hermes model.
model:
default: gpt-5.4
provider: custom
base_url: https://www.usmanta.com/v1
api_key: YOUR_KEYCherry Studio Verified
Desktop LLM client. Add a custom OpenAI provider:
- Settings → Model Providers → Add custom provider
- API Key:
YOUR_KEY - API Host:
https://www.usmanta.com/v1(only up to /v1 — the rest is auto-appended) - Manually add model IDs (e.g.
gpt-5.4), then click "Check connection"
WorkBuddy Verified
Add a model in ~/.codebuddy/models.json. Use the full endpoint path and save as UTF-8 without BOM.
{
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4 (MantAPI)",
"vendor": "OpenAI",
"url": "https://www.usmanta.com/v1/chat/completions",
"apiKey": "YOUR_KEY",
"maxInputTokens": 128000,
"maxOutputTokens": 8192,
"supportsToolCall": true
}
],
"availableModels": ["gpt-5.4"]
}DeskClaw Community
DeskClaw is a desktop wrapper around OpenClaw. It ships with bundled models and has no documented in-app "custom endpoint" field. If your build reads the standard OpenClaw config, use the OpenClaw method above (~/.openclaw/openclaw.json).
Enable the Codex plugin (Codex++)
- Install the official Codex app, then install Codex++ from its releases.
- Create / copy an API key from the dashboard.
- Open the Codex++ tool → Relay config.
- Add config: Base URL
https://www.usmanta.com/v1, API Key, modelgpt-5.4. - Save, launch Codex via Codex++, confirm Provider =
CodexPlusPlus.
FAQ
| Symptom | Fix |
|---|---|
401 / invalid_api_key | Copy the full key from the dashboard — no extra spaces or line breaks. |
403 | Insufficient balance, key disabled, or model not in your group. |
404 | Wrong host or path. HTTP/SDK use /v1; Claude Code & Gemini CLI use the root host. |
| CC-Switch import does nothing | Make sure CC-Switch is installed and the ccswitch:// protocol is registered. |
| CLI change not taking effect | Restart the process; env vars only apply to newly started sessions. |
Get access
Access is invite-only
We onboard new teams through our sales team — usually within one business day. Get in touch and we'll set up your account and API keys.
Talk to sales →
MantAPI