← Documentation

API Reference

Tangle Router exposes an OpenAI-compatible REST API. All endpoints accept and return JSON.

Base URL

https://router.tangle.tools/v1

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer sk-tan-your-key-here

Blueprint 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-Blueprint

On-chain Blueprint ID (uint) — route to operators under this Blueprint

X-Tangle-Service

On-chain service instance ID (uint) — route to a specific service

X-Tangle-Operator

Operator address (0x...) or slug — pin to a specific operator

Endpoints

POST/v1/chat/completions

Create a chat completion. Streams by default.

POST/v1/responses

OpenAI Responses API — agentic, tool-using completions.

POST/v1/messages

Anthropic Messages API — Claude-compatible completions.

GET/v1/models

List all available models across operators.

GET/v1/byok

List encrypted bring-your-own-key provider credentials.

POST/v1/byok

Create an encrypted bring-your-own-key provider credential.

GET/v1/byok/00000000-0000-4000-8000-000000000000

Get a bring-your-own-key provider credential by ID.

GET/v1/workspaces

List enterprise workspaces for the management key.

POST/v1/workspaces

Create an enterprise workspace.

GET/v1/workspaces/default

Get a workspace by ID or slug.

GET/v1/organization/members

List organization members available to workspaces.

GET/v1/observability/destinations

List workspace-scoped observability destinations.

POST/v1/observability/destinations

Create an encrypted observability destination.

GET/v1/observability/destinations/00000000-0000-4000-8000-000000000000

Get an observability destination by ID.

POST/v1/presets/default/chat/completions

Create or version a reusable chat-completions preset.

POST/v1/embeddings

Generate text embeddings.

POST/v1/rerank

Rerank documents against a query.

POST/v1/images/generations

Generate images from text prompts.

POST/v1/audio/speech

Generate speech from text (TTS).

POST/v1/batch

Submit a batch of requests for parallel processing.

GET/v1/batch

List submitted batches.

GET/v1/operators

List active operators on the network.