NexGate

AI Coding Assistants

Use NexGate with Cursor, Windsurf, Claude Code, Continue.dev, and other OpenAI-compatible coding tools.

Overview

NexGate works with AI coding tools that let you configure an OpenAI-compatible base URL, API key, and model.

Note

Some tools do not support custom OpenAI-compatible endpoints. When a tool does not expose base URL settings, use a tool or extension that does.

OpenAI-compatible

Use https://api.nexgate.app/v1 as the base URL.

Track coding cost

Every coding request appears in usage logs with model, tokens, cost, and status.

Pick a model

Choose any model from the catalog or /api/models.

Keep keys private

Store ng- keys in local settings or server-side secrets, not in source control.

Quick setup

Sign in at nexgate.app, open the dashboard, and generate a key.

Use https://api.nexgate.app/v1 as the base URL.

Use any supported model ID, such as gpt-5.5. See the model catalog.

Check the usage dashboard or CSV export after a coding session.

Configuration by tool

  1. Open Cursor settings.
  2. Go to model or OpenAI API settings.
  3. Set base URL to https://api.nexgate.app/v1.
  4. Set API key to ng-your-key.
  5. Set model to gpt-5.5 or another direct model ID.
  1. Open Windsurf settings.
  2. Select a custom OpenAI-compatible endpoint.
  3. Set endpoint to https://api.nexgate.app/v1.
  4. Set API key to ng-your-key.
  5. Set model to gpt-5.5 or another direct model ID.
  1. Open model provider settings.
  2. Select OpenAI-compatible API if available.
  3. Set base URL to https://api.nexgate.app/v1.
  4. Set API key to ng-your-key.
  5. Use gpt-5.5 or another supported model.
{
  "models": [
    {
      "title": "NexGate GPT-4.1 Mini",
      "provider": "openai",
      "model": "gpt-5.5",
      "apiKey": "ng-your-key",
      "apiBase": "https://api.nexgate.app/v1"
    }
  ]
}

Warning

GitHub Copilot does not support arbitrary custom model endpoints by default. Use only Copilot extensions or companion tools that explicitly support OpenAI-compatible endpoint configuration.

ModelBest forInput/1MOutput/1M
gpt-5.5Best overall quality for coding, planning, and reviews$5.00$30.00
gpt-5.4-miniBalanced lower-cost default for agent workflows$0.40$1.60
deepseek-v4-proFrontier DeepSeek with enhanced reasoning$1.93$3.83
deepseek-v3.2Efficient coding & general chat$0.28$0.42
deepseek-v4-flashLow-cost lightweight tasks$0.14$0.28
grok-4-3xAI Grok 4.3 flagship model$1.25$2.50
grok-4-1-fast-reasoningFast reasoning at low cost$0.20$0.50
kimi-k2.6Very long context agent chat (256K)$0.95$4.00
llama-4-maverickOpen model, long context (512K)$0.18$0.70

Tip

Reserve expensive frontier models for requests that need deeper reasoning, broader context, or higher review quality.

SDK examples

from openai import OpenAI

client = OpenAI(
    api_key="ng-your-key",
    base_url="https://api.nexgate.app/v1",
)

def generate_code(prompt: str) -> str:
    response = client.chat.completions.create(
        model="gpt-5.5",
        messages=[
            {"role": "system", "content": "You are an expert programmer."},
            {"role": "user", "content": prompt},
        ],
        max_tokens=1000,
    )
    return response.choices[0].message.content or ""
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "ng-your-key",
  baseURL: "https://api.nexgate.app/v1",
});

async function generateCode(prompt: string): Promise<string> {
  const response = await client.chat.completions.create({
    model: "gpt-5.5",
    messages: [
      { role: "system", content: "You are an expert programmer." },
      { role: "user", content: prompt },
    ],
    max_tokens: 1000,
  });

  return response.choices[0].message.content ?? "";
}
package main

import (
  "context"
  "github.com/sashabaranov/go-openai"
)

func main() {
  cfg := openai.DefaultConfig("ng-your-key")
  cfg.BaseURL = "https://api.nexgate.app/v1"
  client := openai.NewClientWithConfig(cfg)

  resp, _ := client.CreateChatCompletion(
    context.Background(),
    openai.ChatCompletionRequest{
      Model: "gpt-5.5",
      Messages: []openai.ChatCompletionMessage{
        {Role: openai.ChatMessageRoleUser, Content: "Hello!"},
      },
    },
  )
  println(resp.Choices[0].Message.Content)
}

Cost controls

Troubleshooting

ErrorFix
401 authentication_errorCheck the API key and make sure it starts with ng-
400 invalid_request_errorCheck model ID, request body size, and parameter limits
402 insufficient_creditsAdd credits before retrying
429 rate_limit_errorRaise the hourly spend safety limit or wait for the window to clear
Slow responsesTry deepseek-v4-flash, llama-4-scout, or another faster model

What's next?

On this page