TokenSense node reference

Complete parameter and operation reference for all TokenSense n8n nodes.

TokenSense Chat Model

Sub-node for AI Agent workflows. Attach as the language model.

ParameterTypeDefaultDescription
Modeloptionsgpt-4.1-miniModel identifier (loaded dynamically from TokenSense)
Temperaturenumber0.7Sampling temperature (0–2)
Max Tokensnumber0Maximum tokens (0 = model default)
StreamingbooleantrueWhether to stream the response
ProjectstringProject name for cost tracking
Workflow TagstringTag for dashboard attribution (auto-detected if empty)
Provider OverrideoptionsautoForce a specific provider (auto, openai, anthropic, google, mistral, xai)

TokenSense AI

General-purpose node with five resource types and eight operations.

Chat — Chat Completion

ParameterTypeDefaultDescription
Modeloptionsgpt-4.1-miniModel identifier (loaded from TokenSense)
System PromptstringOptional system message
User MessagestringThe message to send (required)
Temperaturenumber0.7Sampling temperature (0–2)
Max Tokensnumber0Maximum tokens (0 = model default)
JSON ModebooleanfalseForce model to respond with valid JSON
ProjectstringProject tag for attribution
Workflow TagstringDashboard attribution (auto-detected if empty)
Provider OverrideoptionsautoForce a specific provider

Chat — Native Anthropic

ParameterTypeDefaultDescription
Modeloptionsclaude-sonnet-4-6Anthropic model — options: claude-3-5-haiku-20241022, claude-haiku-4-5, claude-opus-4-5, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, claude-sonnet-4-5, claude-sonnet-4-6
System PromptstringOptional system prompt
User MessagestringThe message to send (required)
Max Tokensnumber1024Maximum response tokens (required by Anthropic)
Temperaturenumber1.0Sampling temperature (0–1)
ProjectstringProject tag
Workflow TagstringDashboard attribution (auto-detected if empty)

Chat — Native Gemini

ParameterTypeDefaultDescription
Modeloptionsgemini-3.5-flashGemini model — options: gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-flash-lite-preview, gemini-3.1-pro, gemini-3.1-pro-preview, gemini-3.5-flash
User MessagestringThe message to send (required)
System InstructionstringOptional system instruction
Temperaturenumber1.0Sampling temperature (0–2)
Max Output Tokensnumber0Maximum response tokens (0 = model default)
ProjectstringProject tag
Workflow TagstringDashboard attribution (auto-detected if empty)

Image — Image Generation

ParameterTypeDefaultDescription
PromptstringImage description
Modeloptionsgpt-image-2Image model — options: dall-e-2, dall-e-3, flux-2-dev, flux-2-pro, flux-2-schnell, gpt-image-1, gpt-image-1-mini, gpt-image-1.5, gpt-image-2, imagen-4, imagen-4-fast, imagen-4-ultra
Sizestring1024x1024Output dimensions
Qualitystringstandardstandard or hd
Number of Imagesnumber1Images to generate (1–10)
ProjectstringProject tag

Embedding — Text Embedding

ParameterTypeDefaultDescription
Inputstring | string[]Text to embed
Modeloptionstext-embedding-3-smallEmbedding model — options: text-embedding-3-large, text-embedding-3-small, text-embedding-ada-002
DimensionsnumberOutput dimensions (if supported)
ProjectstringProject tag

Audio — Text-to-Speech

ParameterTypeDefaultDescription
InputstringText to speak
Modeloptionstts-1TTS model — options: tts-1, tts-1-hd
VoiceoptionsalloyVoice preset — options: alloy, ash, ballad, cedar, coral, echo, fable, marin, nova, onyx, sage, shimmer, verse
Response Formatoptionsmp3Audio format — options: mp3, opus, aac, flac, wav, pcm
Speednumber1.0Playback speed (0.25–4.0)
ProjectstringProject tag

Audio — Speech-to-Text

ParameterTypeDefaultDescription
Binary PropertystringdataName of the binary property containing the audio file
Modeloptionswhisper-1STT model — options: whisper-1, whisper-1-hd
LanguagestringISO language code (optional)
Response FormatoptionsjsonOutput format (json/text/srt/verbose_json/vtt)
ProjectstringProject tag

Model — List Models

No parameters — returns all models available in your TokenSense workspace.

TokenSense AI Tool

Auto-generated from the TokenSense AI node. Shares the same parameters for each resource/operation. Attach as a Tool sub-node on an AI Agent when you need an agent to invoke another model.

Metadata fields

TokenSense adds these fields to every request and response:

FieldSourceDescription
workflow_tagWorkflow Tag field (falls back to workflow name)Identifies the workflow
stepAutomatic (from node name)Identifies the step within the workflow
execution_idAutomatic (from n8n execution ID)Identifies the specific run
sourceAutomaticAlways "n8n-community-node"

Related