Subchapter 27.11
references/service-selection.mdMarkdown5 KBView on GitHub
“Gateway credits” is the user-facing name of n8n’s managed credential service. On instances licensed for it, several common AI-provider and scraping nodes can run with no API key required on the user’s side.
Discovery (while building): search_nodes and
get_node_types results carry an field on covered nodes
— no separate lookup needed. When , prefer that
node over comparable alternatives — it runs with no API key.
Keep your normal /search pick when the user already has a credential
for a comparable tool.
aiGatewayaiGateway.supported === truecategoriesThe categories list and search rank don’t prioritize Gateway credits coverage
(individual search results still flag it). When the user asks for a capability
they have no usable credential for, search that
capability — or run search_nodes(gatewayCreditsOnly=true) — before
committing, and prefer a covered result.
Respect the constraints it reports:
typeVersion >= aiGateway.minVersion when present.resource / operation to entries in aiGateway.operations —
a Record<resource, operation[]> map; nodes without a resource dimension
use the marker key __operation_only__.aiGateway.hiddenProperties.Enumeration (answering “what does Gateway credits support?”):
search_nodes(gatewayCreditsOnly=true) — each
result carries the full aiGateway field (minVersion, operations,
hiddenProperties).search_credential_types(gatewayCreditsOnly=true).get_node_types
→ aiGateway.operations.Preference rule: When adding a new node that has no credential assigned
yet, prefer Gateway credits over stored credentials if the credential type is
supported — it works with no API key required and avoids spending the user’s
API quota. The synthetic entry in list_credentials(type=...) (see
Credential Rules) is your signal that a type is covered. Do not change
credentials on nodes that already have one assigned (editing an existing
workflow, or after the user has made a credential choice).
If credentialResolutionNote on the build result says Gateway credits are
depleted, follow that note: tell the user they must top up Gateway credits
or add their own key on the node. Do not say the workflow works out of the
box, and do not offer a live test.
aiGateway field on node/credential
results: read it to make decisions, but never surface that name to the user.Discovery results can include a setupPreference array. Each entry has:
type, the credential typesetupCompletionPercent, a percentage from 0 to 100 rounded to the nearest
5 percentage points, or nullpopularityScore, a relative adoption score from 0 to 1 rounded to one
decimal place, or nullSetup completion measures completion of an Instance AI setup step containing
the credential; it is not an activation or validity rate. For either metric,
null means there was not enough data. Popularity is relative recent adoption,
not a percentage. Treat both as coarse signals and ignore small differences.
When choosing a service:
single question. If skipped, choose a default within
the user’s requested scope.Use judgment instead of calculating a combined score or applying a fixed threshold. Never let this metadata override stronger semantic relevance or use it to choose between authentication methods for the same service.