API Documentation

API Usage Guide

Pick your key type → 3 steps → go.

OpenAI · Anthropic compatible api.nghimmo.com

Which key did you buy?

Connection

Base URLhttps://api.nghimmo.com
Keysk-xxxxxxxxxxxx
No /v1. Cursor Pro is the exception — add /v1.

Models

Strongest, hard tasks. Latest: nghi/claude-opus-5.5.

nghi/claude-opus-5.5
nghi/claude-opus-5
nghi/claude-opus-4.8
nghi/claude-opus-4.7
nghi/claude-opus-4.6

Fable — agent coding. Latest: nghi/claude-fable-5.1.

nghi/claude-fable-5.1
nghi/claude-fable-5

Daily use. Latest: nghi/claude-sonnet-5.5 (faster). Default: nghi/claude-sonnet-5.

nghi/claude-sonnet-5.5
nghi/claude-sonnet-5

Light work, cheaper tokens.

nghi/claude-haiku-4.5

Setup

  1. Install Claude Desktop: claude.com/download — not Microsoft Store.
  2. Download the tool → choose Desktop → paste key → Apply:

    macOS Windows Linux

  3. Reopen the app → Continue with Gateway.

If your OS blocks the tool: macOS right-click → Open · Windows → More info → Run anyway. On Linux use the Linux tab (Claude Desktop rarely ships for Linux).

From v1.3.3, the tool checks for updates every launch. If a newer build exists it downloads, replaces itself, and reopens. Still on an older build? Download once from the links above — later versions update automatically.
Desktop uses [1m] models (1M context). CLI is separate — pick CLI mode in the tool.
Mac — tool OK but Gateway not showing
  1. Install Claude from the .dmg at claude.com/download — not the App Store.
  2. Cmd+Q to fully quit Claude before running the tool.
  3. If double-click fails, use Terminal:
cd ~/Downloads
xattr -d com.apple.quarantine ClaudeKeyTool.command 2>/dev/null
chmod +x ClaudeKeyTool.command
bash ClaudeKeyTool.command

Verify config was written:

ls ~/Library/Application\ Support/Claude-3p/configLibrary/
cat ~/Library/Application\ Support/Claude-3p/configLibrary/_meta.json

Open Claude → choose Continue with Gateway (do not sign in to claude.ai). Tool log: ~/Library/Logs/claude-key-tool.log

  1. npm install -g @anthropic-ai/claude-code
  2. Run ClaudeKeyTool → choose CLI → paste key → Apply:

    macOS Windows Linux

CLI writes models without [1m] (some Claude Code builds break with [1m] in env). For 1M: /model nghi/claude-opus-5[1m] if your CLI supports it.
Manual setup

Edit ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nghimmo.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxx",
    "ANTHROPIC_MODEL": "nghi/claude-sonnet-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "nghi/claude-opus-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "nghi/claude-sonnet-5",
    "ANTHROPIC_SMALL_FAST_MODEL": "nghi/claude-haiku-4.5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "nghi/claude-haiku-4.5",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
    "CLAUDE_CODE_USE_GATEWAY": "1",
    "CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK": "1",
    "API_TIMEOUT_MS": "600000"
  }
}
Leave ANTHROPIC_API_KEY empty — use ANTHROPIC_AUTH_TOKEN only. 10-minute timeout (API_TIMEOUT_MS=600000). GATEWAY_MODEL_DISCOVERY loads models from the gateway.
CLI tool writes models without [1m] by default (avoids bugs in some Claude Code builds). For 1M UI: /model nghi/claude-opus-5[1m] then restart CLI. Backend strips [1m] when received.
On Linux prefer Claude Code CLI or the VS Code / Cursor extension. Official Claude Desktop usually has no Linux build.
  1. Install Node.js 18+, then:
    npm install -g @anthropic-ai/claude-code
  2. Download the Linux script and run it in Terminal:

    Linux (.sh)

    chmod +x ClaudeKeyTool.sh
    ./ClaudeKeyTool.sh sk-xxxxxxxxxxxx
  3. Run claude. To switch models: /model nghi/claude-sonnet-5[1m]

VS Code / Cursor / Codium on Linux: install the Claude Code extension → run the same script → Ctrl+Shift+P → Reload Window.

Manual setup (no script)

Edit ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nghimmo.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxx",
    "ANTHROPIC_MODEL": "nghi/claude-sonnet-5[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "nghi/claude-opus-5[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "nghi/claude-sonnet-5[1m]",
    "ANTHROPIC_SMALL_FAST_MODEL": "nghi/claude-haiku-4.5[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "nghi/claude-haiku-4.5[1m]",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
    "CLAUDE_CODE_USE_GATEWAY": "1",
    "CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK": "1",
    "API_TIMEOUT_MS": "600000"
  }
}
Quick curl test
curl https://api.nghimmo.com/v1/messages \
  -H "x-api-key: sk-xxxxxxxxxxxx" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"nghi/claude-opus-4.8","max_tokens":64,"messages":[{"role":"user","content":"ping"}]}'
Remove config: ./ClaudeKeyTool.sh --reset
  1. Install the Claude Code extension in VS Code / Cursor / Antigravity.
  2. Run ClaudeKeyTool → choose CLI mode (not Desktop) → paste key → Apply:

    macOS Windows Linux

  3. Fully quit Antigravity/VS Code and reopen, or Cmd+Shift+P / Ctrl+Shift+P → Reload Window.
Antigravity on Mac: tool 1.3.4+ clears the Antigravity extension cache. Older builds: re-download the tool, choose CLI, then Reload Window.
Mac Antigravity — key still not applied
cat ~/.claude/settings.json | grep -E 'ANTHROPIC_BASE_URL|ANTHROPIC_AUTH_TOKEN'
rm -rf ~/Library/Application\ Support/Antigravity/User/globalStorage/anthropic.claude-code
# then Reload Window in Antigravity
Claude keys must not use Override OpenAI Base URL — the OpenAI endpoint is rejected. Use the Claude Code CLI / VS Code extension tabs (Anthropic /v1/messages), or Chatbox with provider Claude.

Override OpenAI Base URL is only for Codex / DeepSeek keys.

  1. Chatbox → Settings → Model Provider → Claude
  2. API Host https://api.nghimmo.com/v1 · Key sk-...
  3. Add nghi/claude-opus-4.8 → Test Model

Connection

Base URLhttps://api.nghimmo.com/v1
Keysk-xxxxxxxxxxxx
Always with /v1. Grok keys don't run Claude Code.

Models

Send no model and you get nghi/grok-4.5.

ModelUse for
nghi/grok-4.5Strongest — code, agents
nghi/grok-4.31M context, cheaper
nghi/grok-4.20-0309-reasoningWith reasoning
nghi/grok-4.20-0309-non-reasoningFast, cheap
nghi/grok-4.20-multi-agent-0309Deep research
nghi/grok-build-0.1Code / agent
nghi/grok-composer-2.5-fastFast coding in Cursor
nghi/grok-4.5-latest
nghi/grok-build-latest
Aliases of grok-4.5
nghi/grok-3-mini
nghi/grok-3-mini-fast
Legacy
These 11 only. A wrong name errors out. No image/video models.

Setup

  1. Ctrl+Shift+J → Models
  2. Enable Override OpenAI Base URL → https://api.nghimmo.com/v1
  3. Paste key → Verify → add nghi/grok-4.5
Turn off all of Cursor's default models.

Cline / Roo Code: Settings → API Provider OpenAI Compatible → fill in:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/grok-4.5

Continue: edit ~/.continue/config.yaml:

models:
  - name: Nghimmo Grok
    provider: openai
    model: nghi/grok-4.5
    apiBase: https://api.nghimmo.com/v1
    apiKey: sk-xxxxxxxxxxxx

LobeChat, NextChat, Open WebUI… — any OpenAI-compatible app:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/grok-4.5
  1. Chatbox → Settings → Model Provider → OpenAI API Compatible
  2. API Host https://api.nghimmo.com/v1 · Key sk-...
  3. Add nghi/grok-4.5 → Test

Connection

Base URLhttps://api.nghimmo.com/v1
Keysk-xxxxxxxxxxxx
Always with /v1. Codex keys don't run Claude Code.

Models

ModelUse for
nghi/gpt-5.6-solStrongest, token-hungry
nghi/gpt-5.6-terraBalanced — coding / agents
nghi/gpt-5.6-lunaFast, cheap
nghi/gpt-5.5Default — stable
Codex keys reject Claude and Grok models.

Setup

  1. Install ChatGPT from Microsoft Store (by OpenAI).
  2. Download the tool → Desktop → paste key → Sign in:

    macOS Windows Linux

  3. Quit ChatGPT fully, reopen → use ChatGPT Work / Codex.
Remove: tool → Reset. On Linux use the Linux tab (Codex CLI).
Microsoft Store — ChatGPT by OpenAI
On Linux use Codex CLI or the Codex VS Code extension. ChatGPT Desktop usually has no Linux build.
  1. Install Codex CLI (per OpenAI / npm docs for your CLI build).
  2. Download the script and run:

    Linux (.sh)

    chmod +x CodexKeyTool.sh
    ./CodexKeyTool.sh sk-xxxxxxxxxxxx
    codex

Codex extension (VS Code) on Linux: install the extension → run the script above → fully quit VS Code and reopen.

Error Missing environment variable: 'OPENAI_API_KEY': re-download CodexKeyTool.sh (v≥1.0.1) → run again with your key → fully quit VS Code/terminal and reopen. The script writes the env into shell rc files and ~/.config/environment.d/.
Manual setup (~/.codex)

~/.codex/auth.json:

{
  "auth_mode": "apikey",
  "OPENAI_API_KEY": "sk-xxxxxxxxxxxx"
}

Also export the env var (Codex requires a real environment variable):

echo 'export OPENAI_API_KEY="sk-xxxxxxxxxxxx"' >> ~/.bashrc
source ~/.bashrc

~/.codex/config.toml (short form):

model = "gpt-5.6-terra"
model_provider = "Nghimmo"
sandbox_mode = "danger-full-access"
approval_policy = "never"

[model_providers.Nghimmo]
name = "Nghimmo"
base_url = "https://api.nghimmo.com/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
Quick curl test
curl https://api.nghimmo.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "content-type: application/json" \
  -d '{"model":"nghi/gpt-5.5","messages":[{"role":"user","content":"ping"}]}'
Remove: ./CodexKeyTool.sh --reset
  1. Ctrl+Shift+J → Models
  2. Enable Override OpenAI Base URL → https://api.nghimmo.com/v1
  3. Paste key → Verify → add nghi/gpt-5.5
Turn off all of Cursor's default models.

Codex extension (OpenAI) in VS Code:

  1. Install the Codex extension (OpenAI) in VS Code.
  2. Download the tool → choose CLI → paste key → Sign in:

    Windows macOS Linux

  3. Fully quit VS Code → reopen → start a new Codex chat.
Update Agent sandbox on Windows: open %USERPROFILE%\.codex\config.toml, ensure sandbox = "unelevated" under [windows], then re-run the tool or edit manually.

Cline / Roo Code: Settings → API Provider OpenAI Compatible → fill in:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/gpt-5.5

Continue: edit ~/.continue/config.yaml:

models:
  - name: Nghimmo Codex
    provider: openai
    model: nghi/gpt-5.5
    apiBase: https://api.nghimmo.com/v1
    apiKey: sk-xxxxxxxxxxxx

LobeChat, NextChat, Open WebUI… — any OpenAI-compatible app:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/gpt-5.5
  1. Chatbox → Settings → Model Provider → OpenAI API Compatible
  2. API Host https://api.nghimmo.com/v1 · Key sk-...
  3. Add nghi/gpt-5.5 → Test

Connection

Base URL — Claude Codehttps://api.nghimmo.com
Base URL — OpenAI compatiblehttps://api.nghimmo.com/v1
Keysk-xxxxxxxxxxxx
One key works in both formats: Anthropic (Claude Code, Claude Code extension) and OpenAI (Cline, Roo Code, Continue, Cursor, Chatbox…). Claude Code has no /v1, OpenAI apps add /v1.
/v1/responses is not supported → Codex CLI / Codex extension will not work.

Model

ModelNotes
nghi/deepseek-v4.1-flashDeepSeek V4.1 Flash — fast, code + chat (default)
nghi/glm-5.3-flashGLM 5.3 Flash — fast, code + chat
nghi/glm-5.3-flashGLM 5.3 Flash — fast, code + chat
Only the 2 models above. Switch in Claude Code: /model nghi/glm-5.3-flash. A wrong model name returns an error listing the valid models (see GET /v1/models).

Setup

  1. Claude Desktop: install from claude.com/download. Claude Code CLI: npm install -g @anthropic-ai/claude-code.
  2. Download DeepSeekKeyTool → paste your DeepSeek key → Apply (one step for Desktop + CLI):

    Windows macOS Linux

  3. Claude Desktop: reopen → Continue with Gateway. Claude Code: run claude. VS Code / Cursor / Antigravity: Ctrl+Shift+P → Reload Window.

If the OS blocks the tool: Windows → More info → Run anyway · macOS right-click → Open · Linux: chmod +x DeepSeekKeyTool.sh && ./DeepSeekKeyTool.sh (CLI only).

The tool only accepts DeepSeek keys. Claude keys use ClaudeKeyTool (Claude key section).
  1. npm install -g @anthropic-ai/claude-code
  2. Edit ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json):
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.nghimmo.com",
        "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxx",
        "ANTHROPIC_MODEL": "nghi/deepseek-v4.1-flash",
        "ANTHROPIC_DEFAULT_OPUS_MODEL": "nghi/deepseek-v4.1-flash",
        "ANTHROPIC_DEFAULT_SONNET_MODEL": "nghi/deepseek-v4.1-flash",
        "ANTHROPIC_DEFAULT_HAIKU_MODEL": "nghi/deepseek-v4.1-flash",
        "ANTHROPIC_SMALL_FAST_MODEL": "nghi/deepseek-v4.1-flash",
        "API_TIMEOUT_MS": "600000"
      }
    }
  3. Run claude. The Claude Code extension in VS Code / Cursor / Antigravity uses the same file → Ctrl+Shift+P → Reload Window.
Leave ANTHROPIC_API_KEY empty — use ANTHROPIC_AUTH_TOKEN only. Base URL has no /v1.

Cline / Roo Code: Settings → API Provider OpenAI Compatible → fill in:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/deepseek-v4.1-flash

Continue: edit ~/.continue/config.yaml:

models:
  - name: Nghimmo DeepSeek
    provider: openai
    model: nghi/deepseek-v4.1-flash
    apiBase: https://api.nghimmo.com/v1
    apiKey: sk-xxxxxxxxxxxx
  1. Ctrl+Shift+J → Models
  2. Enable Override OpenAI Base URL → https://api.nghimmo.com/v1
  3. Paste key → Verify → add model nghi/deepseek-v4.1-flash
Turn off all of Cursor's default models.

LobeChat, NextChat, Open WebUI, Chatbox (provider OpenAI API Compatible)… — any OpenAI-compatible app:

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/deepseek-v4.1-flash

Quick test with cURL:

curl https://api.nghimmo.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"nghi/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'

Save Tokens

Tokens Left

Paste your key on the check page.

Check key