Set up TokenSense for n8n

Choose your install path below. Both end at the same place — a configured TokenSense credential ready to track costs.

n8n Cloud

Available after verification — currently in review

n8n Cloud requires community nodes to pass a verification review before they can be installed. TokenSense is currently in this review process. Join the waitlist and we'll notify you the day it's available.

Self-hosted n8n

Install TokenSense from the Community Nodes settings:

  1. Go to Settings → Community Nodes in your n8n instance
  2. Click Install a community node
  3. Enter n8n-nodes-tokensense and click Install
TODO: screenshot of n8n community nodes install dialogScreenshot: n8n Community Nodes install dialog

After install, the TokenSense nodes appear in your nodes panel. Next step: configure your credential.

Seeing "isolated-vm" or Python errors during install? See troubleshooting.

Configure your credential

Whether you're on Cloud or self-hosted, credential setup is the same:

  1. Open any TokenSense node and click Create New Credential
  2. Set TokenSense Endpoint to https://api.tokensense.io (no /v1 suffix)
  3. Paste your TokenSense API key from app.tokensense.io/keys
  4. Click Test — you should see a success confirmation

Where do I get my API key?

Go to app.tokensense.io/keys and create a new key. If you haven't signed up yet, see Get Started.

What's my endpoint?

Your TokenSense endpoint is https://api.tokensense.io. Do not append /v1 — the node handles path routing automatically.

Common credential errors

  • 401 Unauthorized — your API key is invalid or expired. Generate a new one.
  • 403 Forbidden — your key doesn't have access to the requested resource. Check project scope.
  • Network error — check your n8n instance can reach api.tokensense.io. See troubleshooting.

Add a TokenSense node to your workflow

Search for "TokenSense" in the n8n nodes panel. You'll see three options:

  • TokenSense AI — general-purpose node for chat, image, embedding, audio, and model operations
  • TokenSense Chat Model — sub-node for AI Agent workflows (attach as the language model)
  • TokenSense AI Tool — for multi-agent orchestration

See Usage for details on each node type.

Next steps