TensoRoute

TensoRoute Developer Guide

A clear and straightforward guide on how to integrate TensoRoute API into your IDE, configure streaming, choose models, and handle common errors.

1. What is TensoRoute?

TensoRoute provides direct, low-latency API access to top Claude models at rates 3–4x below official pricing. You only pay for the tokens you actually use, with no recurring subscriptions or expiring credits.

Key Highlights:

2. Available Models

You can specify any of the following model IDs in your requests:

Model Model ID Best Used For
Claude Opus 5.5 claude-opus-5.5 Complex architectural logic, large-scale refactoring, multi-file codebases
Claude Opus 5 claude-opus-5 Deep analytical reasoning, mathematical logic, code audits
Claude Sonnet 5.5 claude-sonnet-5.5 Fast coding beast, daily software engineering, agentic tools
Claude Sonnet 5 claude-sonnet-5 High precision, rapid instruction following, general assistant tasks

3. Quickstart: 3-Step Setup

  1. Get your API key: Your key starts with sk- (e.g. sk-60367cda5c76bb...).
  2. Set your Base URL:
    • For OpenAI-compatible tools (Cursor, Cherry Studio, Python): use https://tensoroute.space/v1
    • For Anthropic-compatible tools (Cline native, Claude Code): use https://tensoroute.space
  3. Enter your Model ID (such as claude-sonnet-5.5) and start building!

4. IDE Integration Examples

Cline (VS Code Extension — Recommended)

  1. Click the Cline gear icon to open Settings.
  2. API Provider: Select Anthropic or OpenAI Compatible.
  3. Base URL: https://tensoroute.space (if Anthropic) or https://tensoroute.space/v1 (if OpenAI).
  4. API Key: Paste your sk-... key.
  5. Model ID: Enter claude-sonnet-5.5 or claude-opus-5.5.

Cursor

  1. Open Cursor Settings → Models.
  2. Turn on Override OpenAI Base URL.
  3. Set Base URL to https://tensoroute.space/v1.
  4. Set OpenAI API Key to your sk-... key.
  5. Add claude-sonnet-5.5 or claude-opus-5.5 to your active model list.

Cherry Studio

  1. Open Settings → Providers.
  2. Add a new provider: OpenAI Compatible.
  3. API Base URL: https://tensoroute.space/v1.
  4. API Key: your sk-... key.
  5. Add models: claude-sonnet-5.5, claude-opus-5.5.

Python (OpenAI SDK Streaming Example)

test_stream.py
from openai import OpenAI

client = OpenAI(
    base_url="https://tensoroute.space/v1",
    api_key="sk-YOUR_KEY_HERE"
)

stream = client.chat.completions.create(
    model="claude-sonnet-5.5",
    messages=[{"role": "user", "content": "Write a clean binary search in Go."}],
    stream=True
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

cURL (Fast Terminal Test)

bash
curl https://tensoroute.space/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-YOUR_KEY_HERE" \
  -d '{
    "model": "claude-sonnet-5.5",
    "stream": true,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

5. Common Errors & Troubleshooting

1. 401 Unauthorized / API key required

Cause: The request is missing the Authorization: Bearer sk-... header, or the key was entered incorrectly.
Fix: Ensure the key begins with sk- and there are no extra leading/trailing whitespace characters.

2. 402 Payment Required / Key is frozen

Cause: Your token balance has reached zero, or the key has been temporarily suspended.
Fix: Visit https://tensoroute.space/check, paste your key, and check remaining tokens. Contact your provider for a balance top-up.

3. 404 Not Found / Connection Refused

Cause: Incorrect Base URL path.
Fix: When using OpenAI-compatible libraries, ensure the URL ends with /v1 (e.g. https://tensoroute.space/v1). Do not include /chat/completions in the Base URL as the client library appends it automatically.

4. "The server is temporarily busy. Please retry in a moment."

Cause: Short-lived upstream cluster load spike.
Fix: Wait 2–3 seconds and re-submit your prompt. Requests resume smoothly without any loss of tokens.

6. Key & Token Balance Checker

You can check your active token balance, total usage, and past request history at any time without logging in:

Open Key Checker →