🇻🇳 VI 🇬🇧 EN

🚀 API Usage Guide

Nghimmo API - Compatible with Cursor / Cline / Claude Code

📌 General Information

Item Value
Base URL https://api.nghimmo.com/v1
API Key sk-xxxxxxxxxxxx (provided to you)
Token check page api.nghimmo.com/check
Format support OpenAI & Anthropic compatible

🤖 Available Models

Most powerful — for hard tasks needing deep reasoning.

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

Balanced quality and cost — recommended for daily use.

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

Fast, cheap on tokens — for light work (typos, renames, quick questions).

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

GPT-style names (still run Claude under the hood) and nghi/auto (auto-select).

nghi/gpt-4o
nghi/gpt-4
nghi/auto

⚡ Setup Guide by IDE

Pick the tab matching the tool you use. Every setup shares:

Fastest way: download the file below, copy it into your code folder and double-click. Enter your API Key and you're ready to go (nothing else to install).

⬇️ Download for Windows (.bat) 🍎 Download for Mac (.command)

Steps (Windows)

  1. Download CLAUDE-CODE-CLI.bat above.
  2. Copy it into your project folder (where you want to code).
  3. Double-click the file.
  4. Enter your API Key (sk-...) and press Enter.
  5. Claude Code opens in that folder, ready to use.

Steps (Mac)

  1. Download CLAUDE-CODE-CLI.command above.
  2. Copy it into your project folder (where you want to code).
  3. First time only: grant execute permission by opening Terminal in that folder and run:
    chmod +x CLAUDE-CODE-CLI.command
  4. Double-click the file. If macOS blocks it, right-click → OpenOpen.
  5. Enter your API Key (sk-...) and press Enter. Claude Code opens in that folder.
The .command file automatically points to Nghimmo server for that session, no need to edit settings.json. If you prefer permanent configuration, see below.

Manual configuration for Mac / Linux (optional)

Create file ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nghimmo.com",
    "ANTHROPIC_API_KEY": "sk-xxxxxxxxxxxx",
    "ANTHROPIC_MODEL": "nghi/claude-opus-4.8",
    "ANTHROPIC_SMALL_FAST_MODEL": "nghi/claude-haiku-4.5"
  }
}
Important:
  • ANTHROPIC_BASE_URL has no /v1 suffix
  • ANTHROPIC_SMALL_FAST_MODEL is required — missing it will break Bash / Auto mode
  • Models must have nghi/ prefix

Or use environment variables (Windows CMD)

set ANTHROPIC_BASE_URL=https://api.nghimmo.com
set ANTHROPIC_API_KEY=sk-xxxxxxxxxxxx
set ANTHROPIC_MODEL=nghi/claude-opus-4.8
set ANTHROPIC_SMALL_FAST_MODEL=nghi/claude-haiku-4.5
claude

Usage tips

Requires Node.js and Claude Code installed first: npm install -g @anthropic-ai/claude-code

For users with the Claude Code extension in VS Code, Cursor or Antigravity. Install the extension once, then download the file matching your tool and double-click it to auto-open.

📌 Common step (do once): Install the Claude Code extension (by Anthropic) from the Marketplace of your tool (available in VS Code / Cursor / Antigravity).

1️⃣ VS Code

⬇️ Windows (.bat) 🍎 Mac (.command)

2️⃣ Cursor

⬇️ Windows (.bat) 🍎 Mac (.command)

3️⃣ Antigravity

⬇️ Windows (.bat) 🍎 Mac (.command)

Steps (Windows)

  1. Install the Claude Code extension in your tool (VS Code / Cursor / Antigravity).
  2. Download the correct .bat file above (matching your tool).
  3. Close every running instance of that tool.
  4. Double-click the .bat file, enter your API Key (sk-...) and press Enter.
  5. The tool opens automatically; click the Claude Code icon in the side bar to start.

Steps (Mac)

  1. Install the Claude Code extension in your tool (VS Code / Cursor / Antigravity).
  2. Download the correct .command file above, copy it to your project folder.
  3. First time only: grant execute permission via Terminal (change filename to match your tool):
    chmod +x MO-CLAUDE-VSCODE.command
  4. Close every running instance of that tool.
  5. Double-click the .command file. If macOS blocks it, right-click → OpenOpen.
  6. Enter your API Key (sk-...) and press Enter. The tool opens automatically; click the Claude Code icon in the side bar to start.
You must close every window of the tool (VS Code / Cursor / Antigravity) before running the file. If a window is already running, the new environment variables won't take effect and Claude Code won't point to the Nghimmo server.

Cursor uses the OpenAI format. Configure it under Settings → Models.

Steps

  1. Open Cursor, go to Settings → Models (or press Ctrl + Shift + J).
  2. Scroll down to OpenAI API Key.
  3. Enable Override OpenAI Base URL and paste:
https://api.nghimmo.com/v1
  1. Paste your API Key sk-... into the OpenAI API Key field.
  2. Click Verify to confirm, then enable the key.
  3. Add a model manually, e.g. nghi/claude-sonnet-4.6, then select it to use.
Cursor only routes through your custom base URL when you add a model manually and disable Cursor's default models.

Cline is a VS Code extension. It supports both OpenAI and Anthropic formats.

Method 1 - OpenAI Compatible (recommended)

  1. Open Cline, click the Settings (⚙️) icon at the top.
  2. Set API Provider to OpenAI Compatible.
  3. Base URL:
https://api.nghimmo.com/v1
  1. API Key: paste sk-...
  2. Model ID: enter e.g. nghi/claude-sonnet-4.6
  3. Click Done and start chatting.

Method 2 - Anthropic

  1. Set API Provider to Anthropic.
  2. Enable Use custom base URL, paste https://api.nghimmo.com
  3. API Key: paste sk-..., pick a model and use it.

Roo Code (a fork of Cline) is also a VS Code extension, configured the same way.

Steps

  1. Open Roo Code, click the Settings (⚙️) icon.
  2. Set API Provider to OpenAI Compatible.
  3. Base URL:
https://api.nghimmo.com/v1
  1. API Key: paste sk-...
  2. Model: enter nghi/claude-sonnet-4.6 (or another model).
  3. Save and start chatting.

Continue (a VS Code / JetBrains extension) is configured via config.json.

Steps

  1. Open Continue, click the Settings (⚙️) icon to open config.json.
  2. Add a model to the models array as below:
{
  "models": [
    {
      "title": "Nghimmo Sonnet",
      "provider": "openai",
      "model": "nghi/claude-sonnet-4.6",
      "apiBase": "https://api.nghimmo.com/v1",
      "apiKey": "sk-xxxxxxxxxxxx"
    }
  ]
}
  1. Save the file, select "Nghimmo Sonnet" in the chat bar and use it.

Any app that supports OpenAI or Anthropic compatible APIs works (ChatBox, LobeChat, NextChat, Open WebUI...).

OpenAI format

Base URL : https://api.nghimmo.com/v1
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/claude-sonnet-4.6

Anthropic format

Base URL : https://api.nghimmo.com
API Key  : sk-xxxxxxxxxxxx
Model    : nghi/claude-sonnet-4.6
If the app requires the full endpoint: /v1/chat/completions (OpenAI) or /v1/messages (Anthropic).

💰 Tips to Save Tokens

Tokens are mostly consumed by context (history + attached files), not by the answer itself. Every message resends the whole conversation — the longer the session, the more each turn costs. Use the tips below to make your quota last longer.

1. Manage your chat sessions

2. Limit files & extra context

3. Pick the right model

💡 The server automatically strips old reasoning (thinking) and condenses history when context gets too large, but the best savings still come from proactively using /clear and /compact.
If you see a "Context too long" error: type /compact or /clear and retry. This is a client-side issue (context exceeded the model limit), not a server error.

🔍 Check Remaining Tokens

Visit the page below, paste your API Key and click "Check" to see:

🔑 Open key checker