Integrations
Works with the tools you already use.
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.
| Setting | Value | Notes |
|---|---|---|
| Base URL | https://neurongate.net/v1 | Some tools call this API base, endpoint or base path. Tools that add /v1 themselves want https://neurongate.net. |
| API key | sk-ng-… | Create one under API keys. Sent as Authorization: Bearer sk-ng-… or an X-API-Key header. |
| Model | provider/model | For example anthropic/claude-sonnet-5.5. Ids are listed in the model catalog. |
01
Your tool
SDK, framework, IDE or app
02
OpenAI-format request
POST /v1/chat/completions
03
NeuronGate
Key, limits, balance, routing
04
Model provider
OpenAI, Anthropic, Google…
SDKs and HTTP
Frameworks
Coding assistants
Chat interfaces
Automation
Anything else
Keep keys out of code
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
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
Open the models settings
In recent versions: Settings → Models, then the API keys section. - 2
Enter your key and override the base URL
Paste yoursk-ng-…key into the OpenAI API key field, enable the option to override the OpenAI base URL, and set it tohttps://neurongate.net/v1. - 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
Continue
Continue reads models from config.yaml. Use the openai provider with an apiBase.
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
- applyChat 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
Add an OpenAI connection
In recent versions: Admin Panel → Settings → Connections, then add an OpenAI API connection. - 2
Enter the URL and key
URLhttps://neurongate.net/v1, keysk-ng-…. Save, and the model picker fills with the catalog.
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:mainLibreChat
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.
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.
| Tool | Where | What to enter |
|---|---|---|
| n8n | Credentials → 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. |
| Dify | Settings → Model Provider → OpenAI-API-compatible | Model 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. |
| Flowise | ChatOpenAI 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
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.
| Form | Example | Use when |
|---|---|---|
| Pinned id | anthropic/claude-sonnet-5.5 | You want the same model until you change it: evaluations, production prompts. |
| Latest alias | ~anthropic/claude-sonnet-latest | You 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.
| Field | Notes |
|---|---|
model | Required. A catalog id. |
messages | Required, at least one. Roles: system, user, assistant, tool. Content can be text or an array with image parts for vision models. |
stream | Server-sent events in OpenAI chunk format. |
max_tokens | Capped at the model's output limit. Use this rather than max_completion_tokens. |
temperature, top_p, top_k | temperature from 0 to 2. Some models fix sampling and ignore these. |
frequency_penalty, presence_penalty, stop, seed | Passed to the provider when it supports them. |
tools, tool_choice | Function calling, on models that support tools. |
response_format | JSON mode / structured output, on models that support it. |
stream_options | Accepted with streaming requests. |
n | Only 1. One completion per request. |
user | Your 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": {
"status_code": 402,
"detail": "Insufficient balance. Please add funds to continue.",
"request_id": "4f1c2b9e-…"
}
}| Status | Message | Cause and fix |
|---|---|---|
| 401 | API key required | No key sent. Use Authorization: Bearer sk-ng-… or the X-API-Key header. |
| 401 | Invalid or inactive API key | The key is mistyped or was revoked. Create a new one under API keys. |
| 403 | email_not_verified | Confirm your email address before using the API; you can request a new link from the sign-in page. |
| 402 | Insufficient balance | Your balance can't cover the request's maximum cost. Top up, or lower max_tokens so less needs to be reserved. |
| 402 | api_key_monthly_cap_reached | This key hit its monthly spend cap. Raise the cap on the key or use another key. |
| 400 | model_not_allowed | The key has a model allowlist that doesn't include this model. |
| 404 | Model '…' not found or inactive | Check the id against /models, including the provider prefix. Retired models return this too. |
| 404 | Not Found on /v1/v1/… | The tool appends /v1 itself. Set the base URL to https://neurongate.net instead. |
| 422 | Request validation failed | The 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. |
| 429 | Daily or monthly spend limit | An account-level spend limit was hit. It resets with the period. |
| 502 | upstream_error | The model's provider failed the request. Retry, or try another model. |
| — | Stream arrives all at once | Something 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.