OpenTail.Stingray.Server 1.0.10

Prefix Reserved
dotnet add package OpenTail.Stingray.Server --version 1.0.10
                    
NuGet\Install-Package OpenTail.Stingray.Server -Version 1.0.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenTail.Stingray.Server" Version="1.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenTail.Stingray.Server" Version="1.0.10" />
                    
Directory.Packages.props
<PackageReference Include="OpenTail.Stingray.Server" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenTail.Stingray.Server --version 1.0.10
                    
#r "nuget: OpenTail.Stingray.Server, 1.0.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenTail.Stingray.Server@1.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenTail.Stingray.Server&version=1.0.10
                    
Install as a Cake Addin
#tool nuget:?package=OpenTail.Stingray.Server&version=1.0.10
                    
Install as a Cake Tool

OpenTail.Stingray.Server

ASP.NET Core endpoints, options, and DI extensions that expose OpenTail.Stingray as a drop-in OpenAI- and Anthropic-compatible HTTP API. Bring your own host (Kestrel, IIS, YARP, …); this package only ships the routes, request/response shapes, and DI wiring.

For the bare inference library, use OpenTail.Stingray. For the standalone CLI, use OpenTail.Stingray.Cli.

Built by opentail.net.

Install

dotnet add package OpenTail.Stingray.Server

This transitively pulls in OpenTail.Stingray (the bundled inference engine + CPU/Vulkan/CUDA backends). You must be on the Microsoft.NET.Sdk.Web SDK — the package's Microsoft.AspNetCore.App framework reference is propagated.

Quick start

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOpenTailStingray(opt =>
{
    opt.ModelPath = "models/SmolLM2-1.7B-Instruct-Q4_K_M.gguf";
    opt.NGpuLayers = -1; // -1 = planner sizes the GPU/CPU split (all layers when they fit); 0 = pure CPU
});

var app = builder.Build();
app.MapOpenTailStingray();
app.Run();

Deployment safety

OpenTail.Stingray.Server supplies inference routes; it deliberately does not choose an authentication scheme for the host. The bundled demo host therefore listens only on 127.0.0.1:8080 and admits one generation at a time by default.

Do not bind it directly to a LAN or public interface without an authentication boundary. For remote use, place it behind an authenticated reverse proxy, or add your application's authentication/authorization middleware and protect the mapped routes before calling Run(). Set OpenTail.Stingray:MaxQueuedRequests (or STINGRAY_MAX_QUEUE) to bound how many requests may wait behind the active batch. The server returns HTTP 429 once MaxBatchSize + MaxQueuedRequests is reached, rather than retaining unbounded HTTP connections. The default is 16 waiting requests. MaxConcurrentRequests (or STINGRAY_MAX_CONCURRENT) remains available as a legacy fixed in-flight cap and takes precedence when explicitly set.

Bind from configuration instead:

// appsettings.json: { "OpenTail.Stingray": { "ModelPath": "...", "NGpuLayers": -1 } }
builder.Services.AddOpenTailStingray(builder.Configuration);

Complete API Surface

Endpoint Wire-compatible with Capabilities
POST /v1/chat/completions OpenAI Chat Completions Streaming SSE, Tool Calling, Structured JSON, Multimodal Vision
POST /v1/audio/transcriptions OpenAI Audio Transcriptions SRT, VTT, verbose_json; Runs the installed catalog model with real weights (model: whisper-base, whisper-1, transcribe or omitted). A model that is not installed answers 503 and says to run stingray setup transcribe; see the parameter audit F8
POST /v1/audio/translations OpenAI Audio Translations Whisper Speech Translation
POST /v1/audio/speech OpenAI Audio Speech Kokoro, Piper, MeloTTS, Chatterbox, F5-TTS with clause streaming
POST /v1/images/generations OpenAI Image Generations Not implemented: answers 501. The route validates the request, then says to use stingray image. (Before 2026-11-01 it returned a placeholder gradient with a 200; it never called a diffusion pipeline.) Connecting the real pipelines is open work.
POST /v1/images/edits OpenAI Image Edits Not implemented: answers 501, as above.
POST /v1/embeddings, POST /api/embed OpenAI Embeddings, Ollama Embed Dense text embeddings (STINGRAY_EMBEDDING_MODEL)
POST /v1/rerank Cohere Rerank Cross-encoder sequence reranking (STINGRAY_RERANK_MODEL)
POST /v1/messages Anthropic Messages Anthropic Messages API parity
POST /v1/responses OpenAI Responses OpenAI Responses endpoint
GET /v1/models OpenAI Models Model enumeration
GET /health, /metrics Observability Liveness + Prometheus metrics
GET /status Diagnostics Versioned runtime status: placement, traffic, latency, cache
GET /capabilities Diagnostics Read-only protocol/configuration diagnostics
POST/GET/DELETE /v1/sessions Sessions Opt-in CPU-dense GGUF named-session lifecycle
GET /v1/sessions/{id}/operations/{operationId} Operations Bounded idempotent-result reconnect lookup

The embedding and rerank endpoints load only the models named by STINGRAY_EMBEDDING_MODEL / STINGRAY_RERANK_MODEL; the request's model field is treated as a name. Set STINGRAY_ENCODER_REQUEST_PATHS=1 to let a request name a checkpoint path instead. Each path a request names is loaded and stays resident for the life of the process, so enable it only for trusted clients.

With Models configured (multi-model), /health, /metrics, /status and /capabilities never load or pin a model. model is the default alias (the first entry, used when a request names none), models lists every alias, request and queue counters are summed over the resident models, and per-model facts describe the default model (resolved values once it is resident). /tokenize, /detokenize and /props need a single engine and are single-model only.

Streaming (SSE) is enabled for every chat/completion endpoint, and the JSON pipeline is wired through a source-generated JsonSerializerContext so the package is AOT-friendly even though the project itself is not AOT-published.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.10 122 11/26/2026
1.0.9 197 10/12/2026
1.0.8 122 10/10/2026
1.0.7 157 9/1/2026
1.0.6 147 8/19/2026
1.0.5 134 8/19/2026
1.0.4 147 8/12/2026
1.0.3 145 8/8/2026
1.0.2 138 8/6/2026