# Tokenlab Cost Routing

> Choose TokenLab models and fallback chains using public pricing, task fit, latency expectations, and native endpoint needs before writing production routing code.

- **Type:** Skill
- **Install:** `agentstack add skill-hedging8563-tokenlab-skills-tokenlab-cost-routing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [hedging8563](https://agentstack.voostack.com/s/hedging8563)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [hedging8563](https://github.com/hedging8563)
- **Source:** https://github.com/hedging8563/tokenlab-skills/tree/main/skills/tokenlab-cost-routing
- **Website:** https://tokenlab.sh

## Install

```sh
agentstack add skill-hedging8563-tokenlab-skills-tokenlab-cost-routing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# TokenLab Cost Routing

Use this skill when a user asks how to reduce TokenLab cost, compare model prices, pick fallbacks, or route requests by quality, latency, and budget.

## What this skill should deliver

- A compact routing recommendation with exact public TokenLab model IDs.
- A cost-aware fallback chain for the user's workload.
- A catalog/pricing lookup path that can be rerun.
- A note on which endpoint family each model should use.
- Guardrails for when not to switch models because doing so would change output, safety, or request semantics.

## Preferred approach

1. Identify the workload and constraints:
   - chat, coding, agent loop, image, video, audio, embedding, rerank, translation, or multimodal
   - quality floor
   - latency target
   - budget or cost ceiling
   - native endpoint requirement
2. Read live public catalog signals before recommending:
   - `GET https://api.tokenlab.sh/v1/models`
   - `GET https://api.tokenlab.sh/v1/models?recommended_for=`
   - `GET https://api.tokenlab.sh/v1/models/:model`
   - `GET https://api.tokenlab.sh/v1/models/:model/pricing`
3. Build a chain with roles:
   - primary quality model
   - balanced default
   - fast fallback
   - budget fallback
4. If the user asks for exact cost, compute from live pricing and their estimated token/media volume. State units and assumptions.
5. For non-chat requests, inspect model details before changing parameters or endpoint family.

## Output format

- One sentence stating workload and assumptions.
- A table with `Route role`, `Model ID`, `Endpoint`, `Why`, and `When to fall back`.
- One catalog command and one pricing command.
- A short implementation note for retries, rate limits, and user approval when quality would drop.

## Avoid

- Do not invent prices, discounts, or model counts.
- Do not choose a cheaper model if that would silently remove required native behavior, tools, media support, safety constraints, or structured output guarantees.
- Do not expose TokenLab internal channel, physical provider, or routing details.
- Do not turn a user-provided model into a different model without saying why.
- Do not hardcode a fallback list without saying when it was checked or how to refresh it.

## Edge Cases

- If catalog or pricing endpoints are unavailable, say that routing cannot be price-verified and provide only an example pattern.
- If the user asks for "cheapest", include capability and reliability tradeoffs.
- If billing risk is high, require explicit user approval before adding automatic fallback to paid media/video generation.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [hedging8563](https://github.com/hedging8563)
- **Source:** [hedging8563/tokenlab-skills](https://github.com/hedging8563/tokenlab-skills)
- **License:** MIT
- **Homepage:** https://tokenlab.sh

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hedging8563-tokenlab-skills-tokenlab-cost-routing
- Seller: https://agentstack.voostack.com/s/hedging8563
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
