Use TokenSense in n8n workflows

Once installed, you have three node types available. This page covers when to use each, plus features that make TokenSense more than a simple proxy.

TokenSense Chat Model

When to use it:Any time you're building an AI Agent workflow and need a language model. Drop it in as the "Language Model" sub-node.

  • Supports streaming responses
  • Supports tool calling with Chat-compatible models; GPT 6.1 Sol and GPT 6 Astra tools require the Responses API
  • Works with n8n's built-in memory nodes
  • All requests are tracked with full attribution (workflow, step, execution)

TokenSense AI

When to use it: General-purpose AI calls outside of the Agent pattern — batch processing, one-shot completions, image generation, embeddings, audio transcription.

Five resource types:

  • Chat — Chat Completion, Native Anthropic, Native Gemini
  • Image — Image Generation (GPT Image, Gemini image models, FLUX)
  • Embedding — Text Embedding
  • Audio — Text-to-Speech, Speech-to-Text
  • Model — List available models

TokenSense AI Tool

When to use it:Multi-agent orchestration. When one AI Agent needs to invoke another AI model as a "tool" — for example, a planning agent that delegates to a coding agent.

The AI Tool node is auto-generated from the TokenSense AI node and shares its parameters. Attach it as a Tool sub-node on your Agent.

Project tagging

Every TokenSense node has a Project field. Setting it tags all requests from that node to a specific project in your dashboard. This is how you keep costs organized when you have multiple clients or teams.

  • Set the same project tag on all nodes in a client's workflow
  • Use consistent naming (e.g., client-acme) across workflows
  • View per-project spend in the dashboard under Projects

Provider Override

When to use it: A/B test providers without rewriting your workflow. Change the model in one field and compare cost/quality/latency.

Example: test the same prompt across three providers:

  • OpenAI gpt-6.1-sol
  • Anthropic claude-sonnet-5-5 (via Native Anthropic)
  • Google gemini-3.8-flash (via Native Gemini)

Test text-only prompts first, then test tool calls and structured outputs separately. Provider Override must match the selected model; it does not translate a model ID into an equivalent model at another lab. Each run logs available usage, cost, and latency. Compare them side-by-side in the dashboard under Usage & Costs.

Cost in the execution view

Cost output depends on the operation and the provider's returned usage. Image Generation and Speech-to-Text in 0.1.20 expose pricingAvailable and billingReason alongside cost. Text-to-Speech includes pricing metadata when billing headers are present. Check availability before treating a value as a complete cost; an empty cost does not mean free usage. Native Gemini keeps its own response shape. See the node reference for details.

For aggregated views across time, projects, and workflows — use the TokenSense dashboard.

Related