Skip to content

Navigation

← Documentation

Quickstart

Create a key and make your first API request.

Search guides and API reference.

Documentation sections

1. Create an account

Sign up at id.tangle.tools — Tangle accounts (including API keys and billing) live on the platform, not on the router.

2. Get an API key

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

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

3. Make your first request

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

Python

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

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

bash
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.

bash
# 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