Start building with Neiroport

Models and API formats through one Neiroport key

NEIROPORT

Connect in 30 seconds

All models work through Neiroport without a VPN, from any country. Choose a model identifier in the catalogue, create a key and set the service Base URL in your SDK

OpenAIAnthropicGeminiSSE
BASE URL · OPENAI SDKhttps://neiroport.com/v1Authorization: Bearer NEIROPORT_API_KEY
1

Create a key

Create a key in the console and save its secret immediately.

2

Fund the balance

Available balance and key budget must cover the request.

3

Send a request

Use an SDK example and the exact catalogue model identifier.

Before your first request

Use this service’s Base URL; include /v1 for the OpenAI SDK.

Use the exact model ID and variant from the catalogue.

Use an active Neiroport key that permits the selected model.

Ensure sufficient balance and key budget; otherwise the request is rejected before running the model.

Provide request_id from the response or usage history when contacting support.

Your first SDK call

Examples use an identifier from the current catalogue. Choose the available variant you need.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.NEIROPORT_API_KEY,
  baseURL: "https://neiroport.com/v1"
});

const response = await client.chat.completions.create({
  model: "qwen3.6-27b",
  messages: [{ role: "user", content: "Hello!" }],
  max_tokens: 1024
});

console.log(response.choices[0].message.content);

Agents in IDEs

Connect Neiroport to an agent that reads project files, applies changes and runs commands. Use OpenCode through ACP or a terminal, Continue Agent or Cline Act, with a model route that supports tools.

Agent

The client reads files, applies edits and runs commands requested by the model. Use an agent client and a model route that supports tools. Configure action permissions in the client.

1. Prepare your key and model

  1. Create an Neiroport key in API keys, or reveal an existing key and copy its full value.
  2. In Model suppliers, select the same key, your model and an available route variant. Save the selection. The key must allow that model and have a sufficient spending limit.
  3. Check that your balance is positive. Copy the exact model ID from the catalogue or the key's /v1/models list. For an agent, choose a variant that supports tool calling.
Provider typeOpenAI-compatible
Base URL / API Basehttps://neiroport.com/v1
API keyorb_…Your key from the Neiroport dashboard
Updates the examples below; configure model access on the key
Maximum output8192tokens, or fewer if the model has a lower limit

gpt-4o-mini is an example, not the only model. Enter your variant's exact ID to update the configurations. These guides use text input and disable image attachments. Base URL already includes /v1; do not append it again.

2. Choose your editor and client

Editor / IDEConnection methodMode
VS CodeAgent / Act - project tasks
Cursor, WindsurfInside the Cline extension
PyCharm, IntelliJ IDEA, WebStorm, GoLand, Rider, PhpStorm, CLion, RubyMine, RustRoverAgent through ACP or Cline
ZedFiles and terminal tasks
NeovimFiles and terminal tasks
Visual Studio, Eclipse, Sublime Text, Emacs, Python IDLE and othersPlugin dependent; OpenCode in a terminal

The Cursor and Windsurf guide uses the separate Cline extension. BYOK in an editor's built-in chat does not enable every paid feature. Plugin compatibility depends on the IDE version and edition; Cline for JetBrains is in Early Access.

OpenCode · terminal and ACP

Use one Neiroport profile in the terminal and ACP editors. Configure OpenCode first, then connect it to your editor.

  1. Install OpenCode using its official guide. With Node.js installed, you can use the command below. Open a terminal in your project directory.
  2. Save the configuration in ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json). Terminal and ACP share this profile. limit.context: 32768 is a conservative example; adjust it to your model's limit. Keep output within both 8192 and the model's limit.
Install with Node.js
npm install -g opencode-ai
OpenCode · opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "neiroport/gpt-4o-mini",
  "provider": {
    "neiroport": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Neiroport",
      "options": {
        "baseURL": "https://neiroport.com/v1"
      },
      "models": {
        "gpt-4o-mini": {
          "name": "gpt-4o-mini",
          "tool_call": true,
          "modalities": {
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 32768,
            "output": 8192
          }
        }
      }
    }
  }
}
  1. Run opencode. Inside it, use /connect → Other, enter provider ID neiroport and paste your Neiroport key. The key is stored separately from the project configuration.
  2. In /models select neiroport/gpt-4o-mini. The provider ID must match neiroport in the configuration. For another model, configure its route on your key, add its ID to models and update model.

In the OpenCode terminal you can discuss code and delegate project changes. Use Continue Chat for a conversation without tools. With ACP, the editor starts opencode acp; Neiroport supplies the model, while OpenCode handles files and commands on your computer.

JetBrains · PyCharm / IntelliJ IDEA / WebStorm / others

In AI Chat, choose Install From ACP Registry → OpenCode, or use Settings → Tools → AI Assistant → Agents. Select OpenCode in the agent selector after installation. To add an existing binary manually, Add Custom Agent opens ~/.jetbrains/acp.json: merge the example below and replace FULL_PATH_TO_OPENCODE with the absolute executable path.

JetBrains · acp.json
{
  "agent_servers": {
    "Neiroport / OpenCode": {
      "command": "FULL_PATH_TO_OPENCODE",
      "args": [
        "acp"
      ]
    }
  }
}

On Windows, use native OpenCode for JetBrains ACP: running ACP agents from WSL is currently unsupported. Restart the agent session after configuring its key and model.

Zed · ACP

Open Command Palette → zed: acp registry and install OpenCode. Run agent: new thread and select OpenCode. For an existing binary, add agent_servers to Zed's settings through the settings menu:

Zed · settings.json
{
  "agent_servers": {
    "Neiroport / OpenCode": {
      "type": "custom",
      "command": "opencode",
      "args": [
        "acp"
      ]
    }
  }
}

If opencode is absent from the editor process's PATH, use its absolute executable path. Set the model and key in the shared OpenCode profile above.

Neovim · Avante.nvim / ACP

Install Avante.nvim with ACP support. Add acp_providers to your existing plugin's setup options. Run :AvanteSwitchProvider, select opencode and open :AvanteChat. Use :AvanteModels for model selection.

Avante.nvim · setup options
acp_providers = {
  opencode = {
    command = "opencode",
    args = { "acp" },
  },
},
Avante installation and commands ↗

3. Verify the connection

Ask the agent to find and explain a file, then make a small edit and run a test. Confirm that Neiroport and your intended model are selected. One agent task may involve several billable requests; review them in the dashboard usage log.

Connection errors and fixes
Empty model list
Configure an available route on the same key in the dashboard, then refresh the client's model list. Connection testing and model assignment are separate steps.
401 · invalid_api_key
Use the full Neiroport client key; check whitespace and expiry.
402 · insufficient_balance / key_budget
Check your balance and the key's spending limit. Listing models does not check the balance required for generation.
403 / 404 · model
Check the exact ID, allowed models and selected route. For a 404 without an Neiroport error code, check Base URL: include /v1 exactly once.
400 · invalid_output_limit / context_limit
Reduce Max Output Tokens to 8192 or your model's lower limit. Trim conversation history and project context for context_limit.
502 / 503
Check the error code and request_id in the usage log. Verify route availability and tools support on the selected variant. Agent tasks require a route that supports tool calling.
Agent unavailable / tools
Check your plugin version's Agent support, capabilities/tool calling and route. Update a changed key separately in every client, including OpenCode.

Three API formats

Choose a request format supported by the model. All supported protocols use your Neiroport key and the service API URL.

OpenAI

/v1/chat/completions

Bearer NEIROPORT_API_KEY

Chat · Responses · Images · Embeddings

Anthropic

/v1/messages

x-api-key: NEIROPORT_API_KEY

anthropic-version: 2023-06-01

Gemini

/v1beta/models/{model}:generateContent

x-goog-api-key: NEIROPORT_API_KEY

contents · parts · generationConfig
Anthropic · cURL
curl https://neiroport.com/v1/messages \
  -H "x-api-key: $NEIROPORT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-fable-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}'
Gemini · cURL
curl "https://neiroport.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "x-goog-api-key: $NEIROPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Hello!"
        }
      ]
    }
  ],
  "generationConfig": {
    "maxOutputTokens": 1024
  }
}'

Model catalogue and variants

The catalogue updates automatically. Identifiers and suffixes are preserved: variants have distinct model IDs and tariffs. Your preference determines the route.

129 models and variants
GET /v1/models
curl https://neiroport.com/v1/models \
  -H "Authorization: Bearer $NEIROPORT_API_KEY"

Routing preferences

Compare offers in Model suppliers and pin a supplier separately for each model and client key. Displayed prices include markup. Pins take priority over automatic routing and apply in SDK calls without extra parameters.

Pinned routes do not fall back to other suppliers. If a tariff changes or a supplier becomes unavailable, the request is rejected before dispatch; select a supplier again or restore automatic routing. Select the same client key in the playground to test its route.

Choose a preference when creating an API key; you can change it later without replacing the key. All calls using this key follow the selected preference. The playground has a separate preference selector.

Lowest price first

Price has the greatest weight. At similar prices, success rate and response speed are also considered.

Fastest response first

Prefer routes with faster responses. Price remains a selection criterion.

Stability first

Prefer higher request success rates and fewer failures

Best overall quality

Combine success rate, response speed and route price

Guaranteed routes only

Use only guaranteed routes. Reject the request if none are available.

Prices and availability may differ by preference. The catalogue shows the selected preference’s tariff. Global and individual markup apply across all preferences; unconfirmed tariffs cannot be used for generation. The guaranteed preference uses only guaranteed routes.

Model details show API formats, billing type, input, output, cache read and write, or a per-request price. Reference prices are not active tariffs until confirmed.

Endpoint reference

Relative paths use the /v1 Base URL. Gemini /v1beta paths start at the service root. Methods marked “Unavailable” are not currently connected in Neiroport.

Text and agents

POST
/chat/completions

Conversation; JSON response or SSE.

Gateway
POST
/responses

Responses API with explicit input and output limit.

Gateway
POST
/messages

Native Anthropic Messages format.

Gateway
POST
/v1beta/models/{model}:generateContent

Native Google Gemini format.

Gateway
POST
/completions

Text prompt completion.

Gateway

Multimodal and retrieval

POST
/images/generations

Image generation; per-request billing.

Gateway
POST
/images/edits

Image editing, multipart/form-data.

Unavailable
POST
/embeddings

Text embeddings.

Gateway
POST
/rerank

Rank documents against a query.

Gateway
POST
/audio/transcriptions

Transcribe an audio file.

Unavailable
POST
/audio/speech

Speech synthesis; binary audio response.

Unavailable

Models, tasks and realtime

GET
/models

Models available to your key.

Gateway
GET
/models/{model}

Details for one model identifier.

Gateway
WS
/realtime

Realtime WebSocket connection.

Unavailable
POST
/mj/submit/imagine

Create a Midjourney task.

Unavailable
GET
/mj/task/{id}/fetch

Read Midjourney task status.

Unavailable
POST
/suno/submit/{action}

Submit a Suno music task.

Unavailable
Responses
curl https://neiroport.com/v1/responses \
  -H "Authorization: Bearer $NEIROPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3.6-27b",
  "input": "Hello!",
  "max_output_tokens": 1024,
  "store": false
}'
Embeddings
curl https://neiroport.com/v1/embeddings \
  -H "Authorization: Bearer $NEIROPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-embedding-2-preview",
  "input": "Text to embed"
}'
Images
curl https://neiroport.com/v1/images/generations \
  -H "Authorization: Bearer $NEIROPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google-imagen-4",
  "prompt": "A quiet mountain lake",
  "n": 1,
  "size": "1024x1024"
}'

Troubleshooting

Use error.code and request_id to diagnose a failure. API errors and an extended compatibility reference are listed separately. Internal routing details are not exposed to clients.

Error response structure
{
  "error": {
    "code": "model_not_found",
    "message": "model_not_found"
  },
  "request_id": "http_xxxxxxxxxxxx"
}
Found: 31 · Total: 31
HTTP 401invalid_api_keyCorrection required
Failure location
auth/key
Description
The key is missing, invalid, revoked or disabled.
Resolution
Check the key, expiry and authentication header. Client requests require a key issued by this service.
HTTP 403model_not_allowedCorrection required
Failure location
auth/model
Description
The key does not permit this model.
Resolution
Check account status, key permissions and restrictions for this model or operation. Retrying with unchanged permissions will fail.
HTTP 403account_disabledCorrection required
Failure location
auth/account
Description
The account is disabled.
Resolution
Check account status, key permissions and restrictions for this model or operation. Retrying with unchanged permissions will fail.
HTTP 402insufficient_balanceCorrection required
Failure location
billing/balance
Description
Available balance cannot cover the request reservation.
Resolution
Check available balance, key budget and selected tariff. Resolve the relevant limit before retrying.
HTTP 402key_budgetCorrection required
Failure location
billing/key_budget
Description
The API key budget cannot cover this request.
Resolution
Check available balance, key budget and selected tariff. Resolve the relevant limit before retrying.
HTTP 404model_not_foundCorrection required
Failure location
routing/model
Description
The model is missing or has not been activated.
Resolution
Check the path, exact model or task identifier and availability. Removed content may no longer be recoverable.
HTTP 400invalid_inputCorrection required
Failure location
request/validation
Description
The request body or required fields are invalid.
Resolution
Check required fields, data format and model capabilities. Correct the request before submitting a new operation.
HTTP 400unsupported_inputCorrection required
Failure location
request/format
Description
This gateway adapter does not support the input format.
Resolution
Check required fields, data format and model capabilities. Correct the request before submitting a new operation.
HTTP 400unsupported_billingCorrection required
Failure location
billing/tariff
Description
No confirmed supported tariff exists for this operation.
Resolution
Check required fields, data format and model capabilities. Correct the request before submitting a new operation.
HTTP 400context_limitCorrection required
Failure location
request/context
Description
The request and output limit exceed the model’s context window.
Resolution
Check required fields, data format and model capabilities. Correct the request before submitting a new operation.
HTTP 400invalid_output_limitCorrection required
Failure location
request/output
Description
The output token limit is invalid.
Resolution
Check required fields, data format and model capabilities. Correct the request before submitting a new operation.
HTTP 409request_already_submittedCorrection required
Failure location
request/idempotency
Description
This Idempotency-Key identifies an operation already submitted.
Resolution
Check the original request_id in usage history. The same Idempotency-Key cannot create a second charge; use a new key for a new operation.

Billing and streaming usage

Tariff

Charges use the published tariff for the selected model and preference. Input, output and cache rates or a fixed per-request price apply. Tariff changes apply to new requests.

Usage

Token tariffs account for input, output, cache reads and writes. Confirmed per-request tariffs charge the configured fixed amount.

History and reservations

The maximum estimate is reserved before dispatch. Actual usage determines the charge. Uncertain outcomes retain a visible reservation for review.

Python · streaming
stream = client.chat.completions.create(
    model="qwen3.6-27b",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=1024,
    stream=True,
    stream_options={"include_usage": True}
)

for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="")
    if chunk.usage:
        print("\nUsage:", chunk.usage)

Send a unique Idempotency-Key with paid POST requests. Reusing it returns 409 and the original request_id. Check usage history before retrying an interrupted stream.