Integrations

Works with the tools you already use.

NeuronGate speaks the OpenAI chat completions format, so anything that can talk to OpenAI can talk to 200+ models through it. Point the tool at https://neurongate.net/v1, give it a NeuronGate key, and pick a model id.

The settings every tool needs

Every integration on this page comes down to the same three values. Where a tool asks for an "OpenAI-compatible" or "custom OpenAI" provider, these are what go in the fields.

Connection settings
SettingValueNotes
Base URLhttps://neurongate.net/v1Some tools call this API base, endpoint or base path. Tools that add /v1 themselves want https://neurongate.net.
API keysk-ng-…Create one under API keys. Sent as Authorization: Bearer sk-ng-… or an X-API-Key header.
Modelprovider/modelFor example anthropic/claude-sonnet-5.5. Ids are listed in the model catalog.
  1. 01

    Your tool

    SDK, framework, IDE or app

  2. 02

    OpenAI-format request

    POST /v1/chat/completions

  3. 03

    NeuronGate

    Key, limits, balance, routing

  4. 04

    Model provider

    OpenAI, Anthropic, Google…

Every integration follows the same path: your tool sends an OpenAI-format request, NeuronGate checks the key and balance, then forwards it to the model's provider.

SDKs and HTTP

OpenAI Python and Node SDKs, or plain HTTP from any language.

Frameworks

LangChain, LlamaIndex, Vercel AI SDK, LiteLLM, CrewAI, AutoGen.

Coding assistants

Cursor and Continue with a custom OpenAI endpoint.

Chat interfaces

Open WebUI and LibreChat for a team chat front end.

Automation

n8n, Dify and Flowise workflows and agents.

Anything else

If it has an OpenAI base URL setting, the three values above are all it needs.

Keep keys out of code

The examples read the key from a NEURONGATE_API_KEY environment variable. Create a separate key per tool or project so you can cap and revoke them independently.

Official OpenAI SDKs

SDKs and HTTP

The OpenAI SDKs take a base URL in their constructor. Nothing else changes: streaming, tool definitions and image inputs use the same request shapes you already know.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://neurongate.net/v1",
    api_key=os.environ["NEURONGATE_API_KEY"],
)

stream = client.chat.completions.create(
    model="anthropic/claude-sonnet-5.5",
    messages=[{"role": "user", "content": "Explain idempotency keys in two sentences."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Non-streaming requests can carry an Idempotency-Key header. A retry with the same key and body returns the stored response instead of running (and billing) the request twice.

Agent and LLM frameworks

Frameworks either wrap the OpenAI SDK or have an "OpenAI-compatible" class. Use that class and pass the base URL; the model string is the NeuronGate id.

# pip install langchain-openai
import os
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="anthropic/claude-sonnet-5.5",
    base_url="https://neurongate.net/v1",
    api_key=os.environ["NEURONGATE_API_KEY"],
)
print(llm.invoke("Summarise the CAP theorem.").content)

Check capabilities per model

Tool calling and image input depend on the model, not on NeuronGate. The catalog marks which models support tools and vision, and GET /v1/models?tools=true returns only models with tool support.

Coding assistants

Editors that let you bring your own OpenAI key can use NeuronGate by overriding the base URL. Menu names move between releases; the fields below are what to look for.

Cursor

  1. 1

    Open the models settings

    In recent versions: Settings → Models, then the API keys section.
  2. 2

    Enter your key and override the base URL

    Paste your sk-ng-… key into the OpenAI API key field, enable the option to override the OpenAI base URL, and set it to https://neurongate.net/v1.
  3. 3

    Add the model ids you want

    Add a custom model named exactly as in the catalog, e.g. anthropic/claude-sonnet-5.5, and select it in chat.

Note

Cursor sends bring-your-own-key requests from its own servers, so the endpoint has to be publicly reachable. NeuronGate is, so no tunnel or extra setup is needed.

Continue

Continue reads models from config.yaml. Use the openai provider with an apiBase.

~/.continue/config.yaml
name: NeuronGate
version: 0.0.1
schema: v1
models:
  - name: Claude Sonnet (NeuronGate)
    provider: openai
    model: anthropic/claude-sonnet-5.5
    apiBase: https://neurongate.net/v1
    apiKey: ${{ secrets.NEURONGATE_API_KEY }}
    roles:
      - chat
      - edit
      - apply

Chat interfaces

Self-hosted chat front ends give a team one place to use every model. Both of these read the model list from /v1/models, so new releases appear without editing config.

Open WebUI

  1. 1

    Add an OpenAI connection

    In recent versions: Admin Panel → Settings → Connections, then add an OpenAI API connection.
  2. 2

    Enter the URL and key

    URL https://neurongate.net/v1, key sk-ng-…. Save, and the model picker fills with the catalog.
Or configure it at startup
docker run -d -p 3000:8080 \
  -e OPENAI_API_BASE_URL=https://neurongate.net/v1 \
  -e OPENAI_API_KEY=$NEURONGATE_API_KEY \
  -v open-webui:/app/backend/data \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

LibreChat

Add NeuronGate as a custom endpoint in librechat.yaml. With fetch: true LibreChat loads the full model list; default is what shows before that and if fetching fails.

librechat.yaml
version: 1.2.1  # keep the config version your LibreChat release expects
endpoints:
  custom:
    - name: "NeuronGate"
      apiKey: "${NEURONGATE_API_KEY}"
      baseURL: "https://neurongate.net/v1"
      models:
        default: ["anthropic/claude-sonnet-5.5", "openai/gpt-6-sol"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "NeuronGate"

Automation platforms

Low-code tools usually have an OpenAI credential or an "OpenAI-compatible" provider with a URL field.

Automation platform settings
ToolWhereWhat to enter
n8nCredentials → OpenAI API (recent versions have a Base URL field)API key sk-ng-…, Base URL https://neurongate.net/v1. In the OpenAI Chat Model node, choose the model by id.
DifySettings → Model Provider → OpenAI-API-compatibleModel name anthropic/claude-sonnet-5.5, API key, endpoint URL https://neurongate.net/v1, type LLM in chat mode, and the model's context size from the catalog.
FlowiseChatOpenAI Custom node (or ChatOpenAI → Additional Parameters)OpenAI credential with your key, Model Name anthropic/claude-sonnet-5.5, BasePath https://neurongate.net/v1.

Chat completions only

NeuronGate doesn't serve embeddings, image generation or speech. Workflows that need embeddings (for example a vector store node) should keep those on a separate provider and use NeuronGate for generation.

Choosing a model id

Ids have the form provider/model and are listed with their prices, context windows and capabilities in the model catalog and at GET /v1/models.

Model id forms
FormExampleUse when
Pinned idanthropic/claude-sonnet-5.5You want the same model until you change it: evaluations, production prompts.
Latest alias~anthropic/claude-sonnet-latestYou always want the newest release in a family. The alias moves when the provider ships a new version.

Configure the id as a setting rather than in code, so switching models is a config change. Providers release often; see how routing works for what happens when a model is retired.

Supported parameters

POST /v1/chat/completions accepts the fields below. Any other field is rejected with a 422 that names it, rather than being silently ignored.

Accepted request fields
FieldNotes
modelRequired. A catalog id.
messagesRequired, at least one. Roles: system, user, assistant, tool. Content can be text or an array with image parts for vision models.
streamServer-sent events in OpenAI chunk format.
max_tokensCapped at the model's output limit. Use this rather than max_completion_tokens.
temperature, top_p, top_ktemperature from 0 to 2. Some models fix sampling and ignore these.
frequency_penalty, presence_penalty, stop, seedPassed to the provider when it supports them.
tools, tool_choiceFunction calling, on models that support tools.
response_formatJSON mode / structured output, on models that support it.
stream_optionsAccepted with streaming requests.
nOnly 1. One completion per request.
userYour end-user identifier, passed through for attribution.

Troubleshooting

Errors come back as JSON with the HTTP status, a detail message and a request_id you can quote to support. SDKs raise their usual exception for the status code.

Error response
{
  "error": {
    "status_code": 402,
    "detail": "Insufficient balance. Please add funds to continue.",
    "request_id": "4f1c2b9e-…"
  }
}
Common errors
StatusMessageCause and fix
401API key requiredNo key sent. Use Authorization: Bearer sk-ng-… or the X-API-Key header.
401Invalid or inactive API keyThe key is mistyped or was revoked. Create a new one under API keys.
403email_not_verifiedConfirm your email address before using the API; you can request a new link from the sign-in page.
402Insufficient balanceYour balance can't cover the request's maximum cost. Top up, or lower max_tokens so less needs to be reserved.
402api_key_monthly_cap_reachedThis key hit its monthly spend cap. Raise the cap on the key or use another key.
400model_not_allowedThe key has a model allowlist that doesn't include this model.
404Model '…' not found or inactiveCheck the id against /models, including the provider prefix. Retired models return this too.
404Not Found on /v1/v1/…The tool appends /v1 itself. Set the base URL to https://neurongate.net instead.
422Request validation failedThe request has a field NeuronGate doesn't accept (often max_completion_tokens, parallel_tool_calls or logprobs) or n > 1. The response lists the field; disable that option in the tool.
429Daily or monthly spend limitAn account-level spend limit was hit. It resets with the period.
502upstream_errorThe model's provider failed the request. Retry, or try another model.
—Stream arrives all at onceSomething between you and NeuronGate (a reverse proxy, serverless platform or corporate gateway) is buffering the response. Disable response buffering for the stream.

FAQ

Do I need a different SDK for Anthropic, Google or Meta models?

No. Every model in the catalog is called through the same OpenAI-compatible chat completions endpoint. Keep the OpenAI SDK (or any tool that speaks its format) and change the model string, for example from openai/gpt-6-sol to anthropic/claude-sonnet-5.5.

Which endpoints does NeuronGate expose?

POST /v1/chat/completions for generation (streaming and non-streaming), GET /v1/models for the catalog and GET /v1/models/{id} for a single model. Embeddings, image generation and audio endpoints are not offered, so tools that need them must point those features at another provider.

Can I use one API key across several tools?

You can, but a key per tool is easier to manage: each key can have its own monthly spend cap and model allowlist, its usage shows up separately in your logs, and you can revoke one without touching the others.

My tool only asks for a host, not a base URL. What do I enter?

Tools that append /v1 themselves want https://neurongate.net. Tools that append /chat/completions want https://neurongate.net/v1. If requests fail with a 404 on a path containing /v1/v1, remove the /v1 you entered.

Why does my request fail with 422 when it works against OpenAI?

NeuronGate accepts a fixed list of request fields and rejects anything else instead of silently dropping it. The error lists the offending field; the usual ones are max_completion_tokens, parallel_tool_calls and logprobs. Turn that option off in the tool, or use max_tokens.