API Reference
Tangle Router exposes an OpenAI-compatible REST API. All endpoints accept and return JSON.
Base URL
https://router.tangle.tools/v1Authentication
Pass your API key in the Authorization header:
Authorization: Bearer sk-tan-your-key-hereBlueprint Routing
Route requests to Tangle operators running specific Blueprints. Pass as headers or in the request body.
X-Tangle-Routing"operator" | "provider" | "auto" — control routing target
X-Tangle-BlueprintOn-chain Blueprint ID (uint) — route to operators under this Blueprint
X-Tangle-ServiceOn-chain service instance ID (uint) — route to a specific service
X-Tangle-OperatorOperator address (0x...) or slug — pin to a specific operator
Endpoints
/v1/chat/completionsCreate a chat completion. Streams by default.
/v1/responsesOpenAI Responses API — agentic, tool-using completions.
/v1/messagesAnthropic Messages API — Claude-compatible completions.
/v1/modelsList all available models across operators.
/v1/byokList encrypted bring-your-own-key provider credentials.
/v1/byokCreate an encrypted bring-your-own-key provider credential.
/v1/byok/00000000-0000-4000-8000-000000000000Get a bring-your-own-key provider credential by ID.
/v1/workspacesList enterprise workspaces for the management key.
/v1/workspacesCreate an enterprise workspace.
/v1/workspaces/defaultGet a workspace by ID or slug.
/v1/organization/membersList organization members available to workspaces.
/v1/observability/destinationsList workspace-scoped observability destinations.
/v1/observability/destinationsCreate an encrypted observability destination.
/v1/observability/destinations/00000000-0000-4000-8000-000000000000Get an observability destination by ID.
/v1/presets/default/chat/completionsCreate or version a reusable chat-completions preset.
/v1/embeddingsGenerate text embeddings.
/v1/rerankRerank documents against a query.
/v1/images/generationsGenerate images from text prompts.
/v1/audio/speechGenerate speech from text (TTS).
/v1/batchSubmit a batch of requests for parallel processing.
/v1/batchList submitted batches.
/v1/operatorsList active operators on the network.