Documentation

Point your OpenAI/Anthropic SDK at NeuralRing — with a sovereignty pin.

Quickstart

Point the genuine OpenAI SDK at NeuralRing. Only the base URL, key, and model slug change — plus the optional sovereignty pin, which selects in-jurisdiction endpoints first and can never be loosened by a price/speed preference. The Anthropic SDK works the same way against /api/v1/messages.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://neuralring.eu/api/v1",           // NeuralRing public API base
  apiKey: process.env.NEURALRING_API_KEY, // org-scoped key (Bearer)
});

const res = await client.chat.completions.create({
  model: "mistralai/mistral-small-2501",
  messages: [{ role: "user", content: "Hello, sovereign world" }],
  // NeuralRing extension: the sovereignty pin is applied FIRST and never loosened.
  // @ts-expect-error NeuralRing routing extension
  sovereignty: { jurisdiction: ["DE"], min_assurance: "self_attested" },
});
console.log(res.choices[0].message.content);

Get a key + credits from the chat playground (dev flow) or via POST /api/v1/auth/signup → /keys → /credits/topup.

API reference

One OpenAI-compatible base URL: https://neuralring.eu/api/v1 — the inference hot path and the control plane share one public origin. Bearer auth on every authenticated route.

POST/api/v1/chat/completionsOpenAI-compatible (stream + non-stream). Body extensions: models[], provider{}, sovereignty{}, locale. Variants: model:floor|:nitro|:thinking|:extended|:sovereign. Meta: neuralring/auto.
POST/api/v1/messagesAnthropic Messages compatible. fallbacks[] (≤3, model-only; OpenRouter-exact errors).
GET/api/v1/modelsCatalog + sovereignty + SEAL block. Filters: jurisdiction, min_tier, min_assurance, min_seal, capability, language.
GET/api/v1/models/:slug/endpointsEvery endpoint serving a model, each with its own sovereignty profile + SEAL.
GET/api/v1/providersSovereign provider directory with profiles + live health.
GET/api/v1/attestations/:requestIdSigned, hash-chained attestation for a request. Also /export and /public-key.
POST/api/v1/auth/signup · signinSelf-hosted auth → session token.
POST/api/v1/keysCreate an org-scoped API key (spend cap + model + jurisdiction filters).
POST/api/v1/credits/topupManual credit top-up (no funds move; ledger + invoice).
GET/api/v1/byokBring-your-own provider keys (AES-256-GCM at rest).

Concepts

Sovereignty tiering & the assurance ladder

Tier 0–3 is computed deterministically from facts (operating entity, ultimate parent, data-center region, key custody, log residency). The assurance ladder — self-attested → verified → certified — says how substantiated those facts are. They are separate signals: a Tier-0 endpoint can still be only self_attested, and the UI never paints it green. Only certified is a confident state.

What an attestation proves (and doesn't)

Every request emits a content-free, Ed25519-signed, hash-chained record split into observed (what NeuralRing did) and claimed (the endpoint's declarations, only as strong as its assurance). It proves the route, the metered tokens, and the policy satisfied — not that inference physically ran in a given country. Full text in ATTESTATION.md.

SEAL overlay

An evidence-grounded mapping onto the EU Cloud Sovereignty Framework grade (0–4, 8 objectives, overall = lowest). Shown as an indicative credential — never an official assessment — capped at SEAL-3, with unknown objectives shown honestly and null rendered “— · indicative”. A hard min_seal gate counts official+verified SEAL only. See SEAL.md.

Variants, Auto Router & BYOK

Variant suffixes (:floor :nitro :thinking :extended :sovereign) re-rank or shrink the pinned-eligible set — never widen it. neuralring/auto picks among pinned-eligible models with an explainable decision. BYOK lets you route to a provider with your own key (encrypted at rest), prioritized vs fallback.

More docs

Full machine-readable surface: openapi.json.