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/modelsList all available models across operators.
/v1/embeddingsGenerate text embeddings.
/v1/rerankRerank documents by relevance to a query.
/v1/images/generationsGenerate images from text prompts.
/v1/images/editsEdit or inpaint an existing image.
/v1/audio/speechGenerate speech from text (TTS).
/v1/audio/transcriptionsTranscribe audio to text (STT).
/v1/video/generateGenerate video from text or image prompts.
/v1/video/:jobIdPoll video generation job status.
/v1/fine_tuning/jobsCreate a fine-tuning job (LoRA, QLoRA, full).
/v1/fine_tuning/jobsList fine-tuning jobs.
/v1/batchSubmit batch of requests for parallel processing.
/v1/operatorsList active operators on the network.