Voidnet
How the Voidnet routes requests from buyers to publisher servers.
The Voidnet is the central routing layer of the Voidnet Console platform. You send it a request; it authenticates you, enforces your subscription and usage limits, and proxies the request to the publisher's server. You never connect to a publisher directly.
Buyer (API key or JWT) → Voidnet → Publisher's serverWhat the gateway does
- Authenticates your credential (API key or JWT).
- Checks your purchase of the app and your tier's meter.
- Enforces rate limits (per-minute, per-day, monthly meter).
- Routes the request to the publisher's server.
- Returns the publisher's response, or a gateway error if something fails.
You do not need to know the publisher's server URL. The gateway resolves it from the username/appname in your request path.
Endpoint
All app requests go through one endpoint. The adapter in the path selects the protocol:
POST /v1-beta/{adapter}/{username}/{appname}| Parameter | Value |
|---|---|
adapter | mcp or llm — see Void Apps |
username | Publisher's public username |
appname | App name, unique per publisher |
Authorization | Bearer <vnb-sk-...>, Bearer <vai-sk-...>, or Bearer <JWT> (scope mcp:tools or llm:completions) |
MCP-Protocol-Version | 2026-07-28 (required for mcp only) |
Mcp-Method | JSON-RPC method name (required for mcp only) |
Mcp-Name | Tool/resource/prompt name (required for mcp only) |
MCP — Stateless 2026-07-28:
- Only
POSTis supported.GETandDELETEreturn405 Method Not Allowed. - SSE streams are per-request on POST; close = cancel. No
Last-Event-ID, noMcp-Session-Id.
LLM — OpenAI compatible:
POST /v1-beta/llm/{username}/{appname}
Authorization: Bearer vnb-sk-...
Content-Type: application/json
Body: {"model":"Qwen/Qwen2.5-7B-Instruct","messages":[{"role":"user","content":"hi"}],"stream":false}- One model per app — the
modelyou send must match the app's published model exactly. stream:trueis supported (SSE); the gateway injectsstream_options.include_usage:truewhen missing, and streams without a final usage chunk fail loudly instead of going unbilled. Multimodal inputs (image_url,audio) are rejected — TEXT only.- Your LLM server must expose
POST {serverUrl}/v1/chat/completionsand accept anyAuthorization: Bearer <token>header.
Plus operational endpoints:
| Method | Path | Purpose |
|---|---|---|
GET | /health | Health check (db + redis) |
POST | /oauth/token | Issue JWT access tokens (client_credentials, authorization_code, refresh_token) |
GET | /.well-known/oauth-authorization-server | OAuth metadata (RFC 8414) |
GET | /.well-known/oauth-protected-resource | OAuth metadata (RFC 9728) |
GET | /.well-known/jwks.json | Public signing keys |
GET | /authorize | OAuth 2.1 authorization code + PKCE (interactive clients) |
For the full request/response schema of every operation, see the API Reference — it is generated from the gateway source and cannot drift.
Authentication
Two credential types, both in the Authorization: Bearer header. The gateway auto-detects which you're using:
- API keys (
vnb-sk-*,vai-sk-*) — long-lived, generated in the Console. - JWT access tokens — short-lived (1 hour), obtained from
POST /oauth/token. Use these in production.
A 3-segment (dot-separated) value is treated as a JWT; a vnb-sk-/vai-sk- prefix is treated as an API key.
Errors
All gateway errors use one shape (OAuth endpoints are the exception — see Error Reference):
{
"error": {
"code": "error_code",
"message": "Human-readable description",
"status": 429
}
}