← Documentation

Quickstart

Get up and running with Tangle Router in under 5 minutes.

1. Create an account

Sign up at router.tangle.tools/sign-up with your email.

2. Get an API key

Go to Settings → Keys and create a new API key. Set it as an environment variable:

export TANGLE_API_KEY="sk-tan-..."

3. Make your first request

Tangle Router is OpenAI SDK compatible. Just change the base URL:

Python

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://router.tangle.tools/v1",
    api_key=os.environ["TANGLE_API_KEY"],
)

response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

TypeScript

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://router.tangle.tools/v1',
  apiKey: process.env.TANGLE_API_KEY,
})

const completion = await client.chat.completions.create({
  model: 'anthropic/claude-sonnet-4-6',
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(completion.choices[0].message.content)

cURL

curl https://router.tangle.tools/v1/chat/completions \
  -H "Authorization: Bearer $TANGLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

4. Explore models

Browse the model directory to find the right model for your use case. Each model page shows available operators, pricing, and capabilities.

5. Blueprint routing (optional)

Route requests to specific Tangle operators by Blueprint ID, service ID, or operator address. Use the X-Tangle-Blueprint header to require a specific Blueprint type.

# Route to operators running Blueprint #1
curl https://router.tangle.tools/v1/chat/completions \
  -H "Authorization: Bearer $TANGLE_API_KEY" \
  -H "X-Tangle-Blueprint: 1" \
  -H "Content-Type: application/json" \
  -d '{"model": "meta-llama/llama-3.1-70b", "messages": [...]}'

Next steps