spendex-ai-router

Smart AI router — automatically picks the best & cheapest LLM for every prompt. BYOK, tracks costs, enforces budgets. Supports 25+ providers.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "spendex-ai-router" with this command: npx skills add ldws123/spendex-ai-router

Spendex AI Router

Stop overpaying for AI. Spendex analyzes every prompt and routes it to the best model at the lowest cost — automatically.

Bring Your Own Keys — connect your existing OpenAI, Anthropic, Google, Mistral, DeepSeek, Groq, Together, Fireworks, Cohere keys in the Spendex dashboard. Spendex routes between them intelligently.

Setup

  1. Create a free account at https://spendex.ai
  2. Connect your provider API keys in the dashboard (OpenAI, Anthropic, Google, etc.)
  3. Copy your Spendex API key (spx_...) from the dashboard
  4. Set it as an environment variable: export SPENDEX_API_KEY="spx_your_key_here"

Chat Completion

When the user asks you to generate text, answer questions, write code, or any task that requires an LLM — route the request through Spendex instead of calling providers directly.

Spendex automatically classifies prompt complexity (simple/medium/complex) and picks the best model+provider combo for cost and quality.

curl -s -X POST "https://app.spendexai.com/v1/chat/completions" \
  -H "Authorization: Bearer $SPENDEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"messages\": [{\"role\": \"user\", \"content\": \"USER_PROMPT_HERE\"}],
    \"stream\": false
  }" | jq '{
    content: .choices[0].message.content,
    model: .model,
    cost: .usage.cost,
    saved: .usage.saved,
    classification: .usage.classification,
    provider: .usage.provider
  }'

Replace USER_PROMPT_HERE with the actual user message.

The response includes:

  • content — the AI response
  • model — which model was selected by the router
  • cost — exact cost in USD
  • saved — money saved vs. using the most expensive model
  • classification — prompt complexity (simple / medium / complex)
  • provider — which provider served the request

Check Credit Balance

Show the user how much credit they have left.

curl -s "https://app.spendexai.com/api/credits/balance" \
  -H "Authorization: Bearer $SPENDEX_API_KEY" | jq '.'

Check Budgets

Show active budgets and how much has been spent vs. the limit.

curl -s "https://app.spendexai.com/api/budgets" \
  -H "Authorization: Bearer $SPENDEX_API_KEY" | jq '.'

Check Usage Stats

Show recent usage broken down by model and provider.

curl -s "https://app.spendexai.com/api/usage/realtime?stats=true" \
  -H "Authorization: Bearer $SPENDEX_API_KEY" | jq '.'

Check Cost Savings

Show how much money Spendex has saved compared to always using the most expensive model.

curl -s "https://app.spendexai.com/api/analytics/savings" \
  -H "Authorization: Bearer $SPENDEX_API_KEY" | jq '.'

Tips

  • You can add a "model" field to force a specific model (e.g. "model": "gpt-4o"), but leaving it empty lets Spendex pick the optimal one.
  • For conversations with history, include the full message array in "messages".
  • Spendex deduplicates identical requests to avoid double-billing.
  • If the user asks "how much am I spending?", use the balance + usage + savings endpoints to give a full picture.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Reivo

Track AI agent costs in real-time, set budget limits, and auto-detect runaway loops. Smart routing reduces costs 40-60%. Works with OpenAI, Anthropic, and Go...

Registry SourceRecently Updated
2421Profile unavailable
Automation

Openclaw Router

Intelligent Model Routing - Save 60% on AI Costs / 智能路由系统 - 节省 60% 成本

Registry SourceRecently Updated
4420Profile unavailable
Automation

RelayPlane

Agent ops layer for OpenClaw — observability, governance, and cost optimization with automatic failover. Never breaks your setup.

Registry SourceRecently Updated
2.8K5Profile unavailable
General

Ai Cv Weekly

Pluggable AI report engine generating multi-preset, multi-source briefings with smart scoring, deduplication, LLM editing, quality control, rendering, and em...

Registry SourceRecently Updated
2680Profile unavailable