HydraLabs / API documentation
Model catalog

NEURION API

Get started with Neurion.

Bring reasoning, code and function calling to your own application. Two models. One OpenAI-compatible API.

import OpenAI from "openai";
import { randomUUID } from "node:crypto";

const client = new OpenAI({
  apiKey: process.env.NEURION_API_KEY,
  baseURL: "https://inference.hydralabs.ai/v1",
  maxRetries: 0,
});
const response = await client.chat.completions.create({
  model: "neurion-pro",
  messages: [{ role: "user", content: "Say hello in one sentence." }],
  reasoning_effort: "high",
}, { headers: { "Idempotency-Key": randomUUID() } });
console.log(response.choices[0].message.content);
Base URLhttps://inference.hydralabs.ai/v1

Your first request#

Create a workspace, add API credits and create a key. Then connect your SDK with the base URL above.

  1. Create a key

    Open API keys in your workspace. Copy a newly created key once and store it securely.

  2. Add API credits

    Regular top-ups start at $10 USD plus tax. Eligible new API customers can separately pay $1 and receive $5 bonus credit: $6 total, once per account. View API Billing.

  3. Send your first request

    Set NEURION_API_KEY in your server environment. For cURL, set REQUEST_UUID to a fresh UUID for each distinct inference.

import os
from uuid import uuid4
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["NEURION_API_KEY"],
    base_url="https://inference.hydralabs.ai/v1",
    max_retries=0,
)
response = client.chat.completions.create(
    model="neurion-pro",
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
    reasoning_effort="high",
    extra_headers={"Idempotency-Key": str(uuid4())},
)
print(response.choices[0].message.content)

Install the SDK with pip install openai or npm install openai. Disable automatic SDK inference retries as shown. The examples perform no request until you run them.

Use your Neurion API key from your server. Desktop sessions and Clerk cookies do not authenticate public API requests.

Models & pricing#

Choose either public model ID. Prices below are in USD per 1 million tokens; API credits are shared across both models.

Neurion Pro

neurion-pro

Reasoning for chat, coding and tool-driven applications.

Input
$1.00
Cached input
$0.10
Output
$3.00
Try in playground

Kimi K3.1 Pro Abliterated

kimi-k3.1-pro-abliterated

A reasoning endpoint for demanding text and coding workflows.

Input
$2.00
Cached input
$0.18
Output
$8.00
Try in playground

Cached input is included in input. Reasoning is included in output. Neither is charged twice. A model name in the API identifies the endpoint you select; your client may maintain its own model registry.

API reference#

All endpoint paths below are relative to https://inference.hydralabs.ai. Send JSON requests with a Bearer API key.

Endpoints
Method / pathUseRequest shape
GET /v1/modelsRead available models, limits and reasoning metadata. No inference charge.Authorization header
POST /v1/chat/completionsMessages, function tools, structured output and streaming.model + messages
POST /v1/responsesText input, instructions, function tools and streaming.model + input; store:false
Request parameters
ParameterChat CompletionsResponses
Modelmodel: neurion-promodel: neurion-pro
Inputmessages: [{role, content}]input: text or supported message/tool items
Reasoning effortreasoning_effort: low | high | maxreasoning: {effort: low | high | max}
Output ceilingmax_tokens or max_completion_tokensmax_output_tokens
Streamingstream: truestream: true
Function toolstools: [{type:"function", function:{name, parameters}}]tools: [{type:"function", name, parameters}]
StorageNo server transcript storestore:false; previous_response_id unsupported

Images, audio, built-in server tools, strict function schemas, background execution, store:true and previous_response_id are unsupported. Omit function-tool strict or set it to false. Strict JSON-schema response output is supported. Invalid options return a parameter error before model dispatch.

Streaming#

Enable stream:true and consume Server-Sent Events until a terminal result. Do not treat the first text or a closed connection as a completed answer.

curl --no-buffer "https://inference.hydralabs.ai/v1/chat/completions" \
  -H "Authorization: Bearer $NEURION_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $REQUEST_UUID" \
  -d '{"model":"neurion-pro","messages":[{"role":"user","content":"Say hello in one sentence."}],"reasoning_effort":"high","stream":true}'
Stream events
ProtocolContentCompletion
Chat Completionschoices[].delta.content; delta.reasoning_content; delta.tool_callsfinish_reason, usage when requested, then data: [DONE]
Responsesresponse.output_text.delta; reasoning and function argument eventsresponse.completed, response.incomplete or response.failed

Active streams have no fixed total duration. An upstream connection with no received bytes for 3 minutes is stopped. Preserve a partial answer, its request ID and retry guidance when a stream is interrupted.

Reasoning & effort#

Thinking stays enabled. Choose low for lighter work, high for the default balance, or max for the most reasoning effort.

Reasoning settings
SettingBehavior
Native valueslow, high, max · default high
Standard-client aliasesminimal → low; medium → high; xhigh → max
Disabled reasoningnone is unsupported
Chat outputreasoning_content on assistant messages and deltas
Responses outputModel reasoning through summary_text parts and standard reasoning summary events

Model-provided reasoning is returned openly to the API caller and counts within output tokens. Responses reasoning text is the model reasoning itself, not a separate summarization request. Replay it with the assistant/tool-call history for continuity.

Legacy encrypted input compatibility

Previously issued encrypted continuations retain their original account/transcript verification and 24-hour expiry. This does not add a server transcript store.

Function calling#

The model selects a function and returns arguments. Your application validates those arguments, executes the function and sends its result back.

  1. Declare a function tool with a regular JSON schema.
  2. Preserve the entire returned assistant message, including reasoning and tool-call IDs.
  3. Execute only the function your application allows. Send its result with the matching tool_call_id.
  4. Continue with a distinct request UUID. Repeat until the model returns an answer or your application stops the task.
tools = [{"type": "function", "function": {
    "name": "get_weather",
    "description": "Get the current temperature for a city",
    "parameters": {"type": "object", "properties": {
        "city": {"type": "string"}
    }, "required": ["city"]},
    "strict": False
}}]

messages = [{"role": "user", "content": "Weather in Paris?"}]
first = client.chat.completions.create(
    model="neurion-pro", messages=messages, tools=tools,
    reasoning_effort="high",
    extra_headers={"Idempotency-Key": str(uuid4())},
)
message = first.choices[0].message
messages.append(message.model_dump(exclude_none=True))
# Your application validates arguments and executes the function.
for call in message.tool_calls or []:
    result = run_your_function(call.function.name, call.function.arguments)
    messages.append({"role": "tool", "tool_call_id": call.id,
                     "content": result})
# A new UUID identifies this distinct, tool-result inference.
answer = client.chat.completions.create(
    model="neurion-pro", messages=messages, tools=tools,
    extra_headers={"Idempotency-Key": str(uuid4())},
)
print(answer.choices[0].message.content)

This fragment uses the Python client and imports from the quickstart. Implement run_your_function yourself: it must validate arguments and return a string. It is not a built-in Neurion function.

The model uses sequential tool calls. parallel_tool_calls:true permits additional calls but does not force the model to issue them. This API does not execute shell commands, browse sites or run CyberBot tools.

Connect your application#

Use an OpenAI-compatible custom provider. Model discovery and effort menus depend on your client; the API cannot create a picker in an application that ignores model metadata.

Connect your application

Model ID: neurion-pro · Display name: Neurion Pro · Effort: low, high, max · Default: high.

Model-list loading and effort menus depend on your application. GET /v1/models returns the model name, limits and effort metadata; applications that ignore these extensions need their own model configuration. No API credits are spent to read the model list.

Connect a custom HydraLabs provider, then merge this provider section into opencode.json. It declares Neurion Pro plus low, high and max variants. Select neurion/neurion-pro in /models, then cycle variants with your configured variant_cycle shortcut. Store the key through /connect; do not add it to this example.

OpenCode configuration guide
OpenCode provider and effort variants

Merge the provider section into your existing opencode.json. Preserve other providers and store your API key through /connect.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "neurion": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "HydraLabs",
      "options": {
        "baseURL": "https://inference.hydralabs.ai/v1"
      },
      "models": {
        "neurion-pro": {
          "name": "Neurion Pro",
          "reasoning": true,
          "limit": {
            "context": 1048576,
            "output": 393216
          },
          "options": {
            "reasoningEffort": "high"
          },
          "variants": {
            "low": {
              "reasoningEffort": "low"
            },
            "high": {
              "reasoningEffort": "high"
            },
            "max": {
              "reasoningEffort": "max"
            }
          }
        }
      }
    }
  }
}
Connection values

Reference values for your application settings; this is not a native application configuration file. Enter your API key only in your application's secure credential field.

{
  "provider": "HydraLabs",
  "api_format": "OpenAI compatible",
  "base_url": "https://inference.hydralabs.ai/v1",
  "model": "neurion-pro",
  "display_name": "Neurion Pro",
  "supported_reasoning_efforts": [
    "low",
    "high",
    "max"
  ],
  "default_reasoning_effort": "high",
  "context_length": 1048576,
  "max_input_tokens": 655360,
  "max_output_tokens": 393216,
  "input_modalities": [
    "text"
  ],
  "output_modalities": [
    "text"
  ]
}

For explicit effort selection, Chat Completions uses reasoning_effort; Responses uses reasoning.effort. Native levels are low, high and max. Standard-client aliases map minimal to low, medium to high and xhigh to max; none is unsupported because thinking stays enabled. Model reasoning is returned to your application.

For agent/tool tasks, replay assistant messages and their matching tool results in order. Chat uses reasoning_content for model reasoning; Responses uses reasoning text parts. OpenAI-compatible adapters can retain this reasoning. Some native OpenAI Chat adapters ignore the extension; use an OpenAI-compatible adapter or Responses to display it. Model discovery does not force an effort picker into applications that use their own model registry.

Context & request limits#

The same context and output capacities apply to both API endpoints. A client may set a lower limit in its own settings.

API limits
LimitValue
Total context1,048,576 tokens
Maximum input655,360 tokens
Maximum output393,216 tokens including thinking
Default output393,216 tokens
JSON body16 MiB
Function tools / calls64
Per-key rate60 requests / minute
Per-IP rate120 requests / minute, approximate per edge location

The requested output default is 393,216 tokens. The effective maximum input and output must fit the context and your funded output ceiling. x-neurion-max-output-tokens reports that effective ceiling; x-neurion-requested-max-output-tokens preserves your requested maximum.

Credits, caching & charges#

API credits fund your API calls. Desktop subscriptions have a separate allowance and do not fund third-party API clients.

What is charged?

Confirmed input, cached input and output are charged once at the request’s recorded model tariff. Cache hits depend on matching input prefixes and are not guaranteed. Keep stable instructions and tool definitions before new conversation content; changing an early prefix can reduce reuse.

What does “held” mean?

Before dispatch, a temporary authorization uses the request’s text, tools and a conservative input bound. Available credit bounds the output ceiling. Unused funds are released automatically after measured usage is confirmed. Concurrent requests share available credit; missing usage stays pending and is never estimated as zero.

Adding credits

Minimum regular credit purchase: $10 USD, plus applicable tax at checkout. No recurring charge or automatic replenishment. Eligible first funding has a separate $1 purchase and $5 promotional bonus; regular deposits receive no additional bonus. Credit purchases are non-refundable except where required by law.

Errors & safe recovery#

Read the HTTP status, public error code, parameter and request ID together. A short failure message alone does not tell you whether another inference is safe.

API error status codes
StatusMeaningWhat to do
400Invalid requestCheck error.param and supported parameters. Fix the request before sending again.
401Authentication failedCheck the Bearer header and that the key is active in the selected workspace.
402Insufficient creditsCheck available API credits. Desktop allowances do not fund API requests.
409Request conflictReuse an idempotency key only for the exact same request. Check the existing attempt first.
424Admitted attempt incompleteDo not automatically repeat the inference. Preserve the request ID and check its status/usage.
429Rate limit before admissionBack off and respect Retry-After when present. Reduce parallel requests.
503Dependency unavailable before admissionCheck the returned retry guidance before trying later. Never infer retry safety from the status alone.

Idempotency and uncertain replies

Use a fresh UUID in Idempotency-Key for every distinct inference. If the network reply is uncertain, reuse that UUID with exactly the same request rather than blindly starting a second paid attempt. Already admitted results are not replayed from stored content.

Respect x-should-retry:false. The gateway does not retry inference. Configure your SDK to disable automatic inference retries. Keep the HydraLabs x-request-id when contacting support@hydralabs.ai; never send your API key or private prompt.

Data & security#

Use the API from a trusted server or a client with protected credential storage.

  • Send keys only in the authorization header. Never put them in URLs, public frontend bundles or screenshots.
  • Revoke an exposed key in API keys. A revoked key no longer authorizes new requests.
  • HydraLabs API request logs contain metadata, not prompts, responses, tool payloads or raw thinking. This describes these logs; your client has its own storage settings.
  • Responses supports store:false. Keep the needed conversation history in your application.

Privacy policy · Terms · Machine-readable site index