Docs

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 URLhttps://www.usmanta.com
OpenAI-compatiblehttps://www.usmanta.com/v1
Auth headerAuthorization: Bearer YOUR_KEY
Rule of thumb: HTTP / SDKs / most clients use /v1. Claude Code, Gemini CLI and Codex CLI use the root base URL (no /v1).
Claude
OpenAI
Gemini
Grok

Quick start

1

Get an API key

Access is invite-only — contact sales, then copy your key from the dashboard.

2

Set the base URL

Point your client at https://www.usmanta.com/v1.

3

Call any model

Send a request; switch models by changing one field.

cURL
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.

ClientProtocolAddress
HTTP / OpenAI SDKOpenAI…/v1
Claude CodeAnthropicroot
Gemini CLIGeminiroot
Codex CLIOpenAI Responsesroot
OpenCode / OpenClaw / HermesOpenAI…/v1
Cherry StudioOpenAI…/v1
WorkBuddyOpenAI…/v1/chat/completions
DeskClawOpenAI…/v1

Host list

Primary host. Use it as the base for every example on this page.

Host
https://www.usmanta.com

HTTP examples

Chat completions and model listing over plain HTTP.

POST /v1/chat/completions
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"}
    ]
  }'
GET /v1/models
curl https://www.usmanta.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

JavaScript SDK

Use the official openai npm package with a custom baseURL.

JavaScript
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.

Python
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.

Shell
export ANTHROPIC_BASE_URL="https://www.usmanta.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
macOS apps launched from the Dock don't inherit shell exports — put these under env in ~/.claude/settings.json instead.

Gemini CLI Verified

Point the Gemini CLI at the root host.

Shell
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.

~/.codex/config.toml
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
~/.codex/auth.json
{ "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.

⚠️ Replace testkey in the script with your own MantAPI key (from the dashboard) before running.
install-codex.sh
#!/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:

Mapping
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/antigravity

OpenCode Verified

Add a custom provider in opencode.json.

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.

~/.openclaw/openclaw.json
{
  "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.

~/.hermes/config.yaml
model:
  default: gpt-5.4
  provider: custom
  base_url: https://www.usmanta.com/v1
  api_key: YOUR_KEY

Cherry Studio Verified

Desktop LLM client. Add a custom OpenAI provider:

  1. Settings → Model Providers → Add custom provider
  2. API Key: YOUR_KEY
  3. API Host: https://www.usmanta.com/v1 (only up to /v1 — the rest is auto-appended)
  4. 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.

~/.codebuddy/models.json
{
  "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).

Not officially documented — verify on your DeskClaw version whether it reads ~/.openclaw/openclaw.json.

Enable the Codex plugin (Codex++)

  1. Install the official Codex app, then install Codex++ from its releases.
  2. Create / copy an API key from the dashboard.
  3. Open the Codex++ tool → Relay config.
  4. Add config: Base URL https://www.usmanta.com/v1, API Key, model gpt-5.4.
  5. Save, launch Codex via Codex++, confirm Provider = CodexPlusPlus.

FAQ

SymptomFix
401 / invalid_api_keyCopy the full key from the dashboard — no extra spaces or line breaks.
403Insufficient balance, key disabled, or model not in your group.
404Wrong host or path. HTTP/SDK use /v1; Claude Code & Gemini CLI use the root host.
CC-Switch import does nothingMake sure CC-Switch is installed and the ccswitch:// protocol is registered.
CLI change not taking effectRestart 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 →