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.

nghi/claude-opus-5
nghi/claude-opus-5-thinking
nghi/claude-opus-4.8
nghi/claude-opus-4.8-thinking
nghi/claude-opus-4.7
nghi/claude-opus-4.7-thinking
nghi/claude-opus-4.6
nghi/claude-opus-4.6-thinking
nghi/claude-opus-4.5
nghi/claude-opus-4.5-thinking

Daily use. Default: nghi/claude-sonnet-5.

nghi/claude-sonnet-5
nghi/claude-sonnet-4.6
nghi/claude-sonnet-4.6-thinking
nghi/claude-sonnet-4.5
nghi/claude-sonnet-4.5-thinking
nghi/claude-sonnet-4
nghi/claude-sonnet-4-thinking

Light work, cheaper tokens.

nghi/claude-haiku-4.5
nghi/claude-haiku-4.5-thinking

Server picks a model.

nghi/auto

Setup

  1. Install Claude Desktop: claude.com/download — not Microsoft Store.
  2. Download the tool, 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).

New key: paste → Apply. Remove: Reset.
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 (same tool — configures Claude Code too):

    macOS Windows Linux

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[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_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) so long thinking is not cut off. GATEWAY_MODEL_DISCOVERY loads models from the gateway. DISABLE_REFUSAL_FALLBACK prevents falling back to Anthropic.com.
Claude Code CLI does not read context from the server — it defaults to /200k. You must append [1m] to the model name (e.g. nghi/claude-opus-5[1m]) or run /model nghi/claude-opus-5[1m], then restart CLI. Backend already accepts 1M.
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_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-sonnet-5","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 → paste key → Apply:

    macOS Windows Linux

  3. Ctrl+Shift+PReload Window.
  1. Ctrl+Shift+JModels
  2. Enable Override OpenAI Base URLhttps://api.nghimmo.com/v1
  3. Paste key → Verify → add nghi/claude-sonnet-5
Turn off all of Cursor's default models.
  1. Chatbox → Settings → Model Provider → Claude
  2. API Host https://api.nghimmo.com/v1 · Key sk-...
  3. Add nghi/claude-sonnet-5Test 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+JModels
  2. Enable Override OpenAI Base URLhttps://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.5Default — stable
nghi/gpt-5.6-solStrongest, token-hungry
nghi/gpt-5.6-terraBalanced
nghi/gpt-5.6-lunaFast, cheap
nghi/gpt-5.4Large context
nghi/gpt-5.4-miniSmall tasks, subagents
nghi/codex-auto-reviewAutomatic code review
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.

Manual setup (~/.codex)

~/.codex/auth.json:

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

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

model = "gpt-5.6-sol"
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+JModels
  2. Enable Override OpenAI Base URLhttps://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 URLhttps://api.nghimmo.com/v1
KeyCursor API Key (create in admin → API Cursor tab)
Use a Cursor key (created in admin), not a Claude/Grok/Codex key. Routes through Cursor OAuth — Grok Bot weekly quota applies.
Note: composer-2.5 is Cursor's agent model and only works well inside Cursor IDE; other clients (VS Code/Copilot/Cline) doing code tasks often 400 → prefer nghi/grok-4.6.

Models

Composer

ModelNote
nghi/composer-2.5Default Composer (Cursor IDE only)
nghi/composer-2.5-fastFast Composer (Cursor IDE only)

Grok (23 models)

Grok 4.6 is the latest in Cursor. Default: nghi/grok-4.6. Recommended for non-Cursor clients.

ModelNote
nghi/grok-4.6Latest — Cursor Grok 4.6 (recommended)
nghi/grok-4.6-fastGrok 4.6 Fast
nghi/grok-4.5Grok 4.5
nghi/grok-4.5-highGrok 4.5 High
nghi/grok-4.5-mediumGrok 4.5 Medium
nghi/grok-4.5-lowGrok 4.5 Low
nghi/grok-4.3Grok 4.3
nghi/grok-4.20Grok 4.20
nghi/grok-4.2Grok 4.2 (4.20 Beta)
nghi/grok-4.1-thinkingGrok 4.1 Thinking
nghi/grok-4.1-expertGrok 4.1 Expert
nghi/grok-4.1-fastGrok 4.1 Fast
nghi/grok-4.1-miniGrok 4.1 Mini (Thinking)
nghi/grok-4-heavyGrok 4 Heavy (SuperGrok)
nghi/grok-4-thinkingGrok 4 Thinking
nghi/grok-4-fast-reasoningGrok 4 Fast Reasoning
nghi/grok-4-miniGrok 4 Mini (Thinking)
nghi/grok-4Grok 4
nghi/grok-3-thinkingGrok 3 Thinking
nghi/grok-3-miniGrok 3 Mini (Thinking)
nghi/grok-3Grok 3
nghi/grok-code-fast-1Grok Code Fast 1
All 25 models route through the Cursor account. Incorrect model name = error. For code tasks on non-Cursor clients, prefer Grok, avoid Composer.

Setup

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

Base URL : https://api.nghimmo.com/v1
API Key  : (Cursor key from admin)
Model    : nghi/grok-4.6

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

models:
  - name: Cursor Grok 4.6
    provider: openai
    model: nghi/grok-4.6
    apiBase: https://api.nghimmo.com/v1
    apiKey: (Cursor key from admin)

Composer (nghi/composer-2.5) only works well inside Cursor IDE. Other clients should use Grok.

cURL / Python / any OpenAI SDK:

curl https://api.nghimmo.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_CURSOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nghi/grok-4.6","messages":[{"role":"user","content":"Hello"}]}'

Save Tokens

Tokens Left

Paste your key on the check page.

Check key