TokenSense node reference
Parameter and operation reference for n8n-nodes-tokensense 0.1.20. Defaults below are unchanged to preserve existing workflows.
Release status checked 4 October 2026: npm 0.1.20 is published for self-hosted installations. n8n has approved 0.1.20 for Cloud; 0.1.18 remains live there until n8n publishes the update. See the release note.
TokenSense Chat Model
Sub-node for AI Agent workflows. Attach as the language model.
| Parameter | Type | Default | Description |
|---|---|---|---|
| Model | options | gpt-4.1-mini | Model identifier (loaded dynamically from TokenSense) |
| Temperature | number | 0.7 | Sampling temperature (0–2) |
| Max Tokens | number | 0 | Maximum tokens (0 = model default) |
| Streaming | boolean | true | Whether to stream the response |
| Project | string | — | Project name for cost tracking |
| Workflow Tag | string | — | Tag for dashboard attribution (auto-detected if empty) |
| Provider Override | options | auto | Force a specific provider (auto, openai, anthropic, google, mistral, xai); Moonshot models use auto routing |
TokenSense AI
General-purpose node with five resource types and eight operations.
Chat — Chat Completion
| Parameter | Type | Default | Description |
|---|---|---|---|
| Model | options | gpt-4.1-mini | Model identifier (loaded from TokenSense) |
| System Prompt | string | — | Optional system message |
| User Message | string | — | The message to send (required) |
| Temperature | number | 0.7 | Sampling temperature (0–2) |
| Max Tokens | number | 0 | Maximum tokens (0 = model default) |
| JSON Mode | boolean | false | Force model to respond with valid JSON |
| Project | string | — | Project tag for attribution |
| Workflow Tag | string | — | Dashboard attribution (auto-detected if empty) |
| Provider Override | options | auto | Force a specific provider |
Chat — Native Anthropic
| Parameter | Type | Default | Description |
|---|---|---|---|
| Model | options | claude-sonnet-4-6 | In 0.1.20: Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 4.5, and compatible older choices. Existing selections remain unchanged. |
| System Prompt | string | — | Optional system prompt |
| User Message | string | — | The message to send (required) |
| Max Tokens | number | 1024 | Maximum generated tokens including thinking; a small limit may leave no visible text |
| Temperature | number | 1.0 | Sampling temperature (0–1); omitted for Claude models that fix sampling |
| Project | string | — | Project tag |
| Workflow Tag | string | — | Dashboard attribution (auto-detected if empty) |
Chat — Native Gemini
| Parameter | Type | Default | Description |
|---|---|---|---|
| Model | options | gemini-3-flash-preview | In 0.1.20: Gemini 3.8 Flash, stable 3.1 Flash-Lite, 3.5 Flash-Lite, Pro Preview, and compatible older choices. Existing selections remain unchanged. |
| User Message | string | — | The message to send (required) |
| System Instruction | string | — | Optional system instruction |
| Temperature | number | 1.0 | Sampling temperature (0–2) |
| Max Output Tokens | number | 0 | Maximum response tokens (0 = model default) |
| Project | string | — | Project tag |
| Workflow Tag | string | — | Dashboard attribution (auto-detected if empty) |
Image — Image Generation
| Parameter | Type | Default | Description |
|---|---|---|---|
| Prompt | string | — | Image description |
| Model | options | gpt-image-2 | Current additions: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gemini-3.1-flash-image, gemini-3.1-flash-lite-image, gemini-3-pro-image, flux-3. Older GPT Image and FLUX 2 choices remain. DALL-E choices are labelled deprecated; Imagen 4 is retired. |
| Size | string | 1024x1024 | Output dimensions; Gemini image compatibility requests require 1024x1024 |
| Quality | string | standard | auto, low, medium, high; xhigh and max for Image 2.5. Saved standard maps to auto and hd to high for GPT Image. Quality is omitted for Gemini images and FLUX 3. |
| Number of Images | number | 1 | Images to generate (1–10 in the node); Gemini images and FLUX 3 require 1 |
| Project | string | — | Project tag |
Embedding — Text Embedding
| Parameter | Type | Default | Description |
|---|---|---|---|
| Input | string | string[] | — | Text to embed |
| Model | options | text-embedding-3-small | Embedding model — options: text-embedding-3-large, text-embedding-3-small, text-embedding-ada-002 |
| Dimensions | number | — | Output dimensions (if supported) |
| Project | string | — | Project tag |
Audio — Text-to-Speech
| Parameter | Type | Default | Description |
|---|---|---|---|
| Input | string | — | Text to speak |
| Model | options | tts-1 | TTS model — options: tts-1, tts-1-hd, gpt-4o-mini-tts |
| Voice | options | alloy | Voice preset — options: alloy, ash, ballad, cedar, coral, echo, fable, marin, nova, onyx, sage, shimmer, verse |
| Response Format | options | mp3 | Audio format — options: mp3, opus, aac, flac, wav, pcm |
| Speed | number | 1.0 | Playback speed (0.25–4.0) |
| Project | string | — | Project tag |
Audio — Speech-to-Text
| Parameter | Type | Default | Description |
|---|---|---|---|
| Binary Property | string | data | Name of the binary property containing the audio file |
| Model | options | whisper-1 | STT model — options: whisper-1, gpt-transcribe, gpt-4o-transcribe, gpt-4o-mini-transcribe |
| Language | string | — | ISO language code (optional) |
| Response Format | options | json | Output format (json/text/srt/verbose_json/vtt); current GPT transcription models require json through TokenSense |
| Project | string | — | Project 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.
Model compatibility
Model access depends on your provider account and key. GPT 6.1 Sol and GPT 6 Astra tool requests require the Responses API. The Chat Model node uses Chat Completions: choose a Chat-compatible model for agents, or use an HTTP Request node against /v1/responses. Text requests without tools can use GPT 6.1 Sol through Chat Completions.
Gemini 3.8 Flash accepts low, medium, or high thinking. TokenSense maps minimal to low and removes obsolete sampling controls for this model. Claude Fable 5.1, Opus 5.5, Sonnet 5.5, and Opus 4.7 fix sampling; their thinking tokens count toward the output limit. Check x-tokensense-adapted on gateway responses when diagnosing changes. Retired IDs return model_retired; saved workflows are not silently migrated.
When cost is unavailable
In 0.1.20, Image Generation and Speech-to-Text expose pricingAvailable, billingReason, and cost. Text-to-Speech exposes pricing metadata when the gateway supplies its billing headers. A false or absent availability flag and an empty cost are not a zero-dollar bill.
Mini TTS returns binary audio without the usage needed to calculate its token bill. Its reason is binary_audio_usage_unavailable. Image costs can also be unavailable when the provider omits billable text/image usage dimensions. Keep these requests separate from fully priced totals rather than substituting zero.
These output fields are operation-specific. Native Gemini retains its native usage data and cost header mapping; do not assume every node operation has the same JSON shape. See usage patterns.
Metadata fields
The nodes send these attribution fields with AI requests:
| Field | Source | Description |
|---|---|---|
workflow_tag | Workflow Tag field (falls back to workflow name) | Identifies the workflow |
step | Automatic (from node name) | Identifies the step within the workflow |
execution_id | Automatic (from n8n execution ID) | Identifies the specific run |
source | Automatic | Always "n8n-community-node" |
Related
- Usage patterns — when to use each node type
- Troubleshooting — common errors
