Requesty
Back|JUN '26INTEGRATIONS / AGENTS
5 MIN READ|

How to Build and Trace Multi-Model n8n AI Agents with Requesty

Thibault Jaigu
Thibault Jaigu
CEO & Co-Founder
Published

Building automation workflows with n8n is one of the most effective ways to orchestrate AI agents. But as workflows grow, a familiar set of challenges emerges: hardcoding API keys for multiple providers, managing rate limits, losing trace visibility across complex agent steps, and handling schema validation failures.

While you could previously connect n8n to Requesty using the generic OpenAI node, we wanted to build something tailored for production-grade workflows.

Today, we are releasing the official @requesty/n8n-nodes-requesty community node. It integrates directly with n8n’s AI sub-ecosystem, giving your workflows native access to 300+ models while unlocking key production features: native web search, reasoning control, strict server-side structured outputs, and automatic execution tracing.

Let's look at how it works and how to set it up.


Setting Up the Requesty Chat Model Node

Getting started takes less than two minutes.

1. Install the Community Node

In your n8n instance, navigate to Settings > Community Nodes and install:

Shell
@requesty/n8n-nodes-requesty

2. Configure Credentials

  1. Generate an API key in your Requesty Dashboard.
  2. In n8n, create a new Requesty API credential and paste your API key. By default, this connects to our public gateway (https://router.requesty.ai/v1), but you can also configure a custom Base URL if you run a self-hosted Requesty deployment.

3. Drag and Drop onto the Canvas

The community node registers as a Requesty Chat Model. It plugs directly into n8n’s Advanced AI nodes, such as the AI Agent, Basic LLM Chain, or Advanced Output Parser.

Once connected, the model list is populated dynamically from our gateway. You can select your model from the dropdown or pass any model ID (like anthropic/claude-3-5-sonnet or openai/gpt-4o) as a dynamic expression.


1. Automatic Trace Correlation (Zero-Config)

When debugging complex n8n agent chains—where a single workflow run might trigger 10 distinct LLM calls—matching individual API logs to the original n8n execution is historically painful.

The Requesty community node solves this out of the box. Every time a node executes, it retrieves n8n's internal executionId and injects it as requesty.trace_id in the API payload:

typescript
const executionId = this.getExecutionId();
if (executionId) {
	additionalParams = {
		...additionalParams,
		requesty: { trace_id: executionId },
	};
}

When you open the Requesty Live Logs or Analytics Dashboard, you can search or filter directly by your n8n execution ID. You can see the exact prompt, latency, tokens consumed, and cost associated with that specific workflow run across all the models it invoked.


2. Granular Cost & Agent Attribution via Custom Headers

In production environments, you need to understand which bots, environments, or teams are driving your LLM spend.

Under the node's Options → Custom Headers, you can add arbitrary headers to tag and track traffic. Requesty recognizes specific tracing headers:

Header NameRecommended ValueDescription
X-Requesty-Agentcustomer-support-botIdentifies the specific agent or workflow
X-Requesty-Environmentproduction or stagingIsolates development vs live traffic
X-Requesty-Teamcustomer-successAttributes spend to a business unit or department

These headers override default node attributions and feed directly into Requesty’s cost-attribution dashboards. Instead of seeing a massive block of generalized API calls, you can view pie charts breaking down usage by team, environment, and individual agent.


3. Strict Structured Outputs with JSON Schema

Enforcing that an LLM outputs structured JSON that matches an exact schema is a foundational requirement for reliable workflow automation. Standard prompt engineering is notoriously unreliable and leads to parser crashes.

The Requesty node leverages Requesty’s server-side Responses API to enforce strict JSON schemas. Unlike other integrations that append format instructions to the user prompt, Requesty passes your schema to the model provider's native schema-enforcement engine (like OpenAI’s Structured Outputs or Gemini's schema constraints) at the routing layer.

In the node parameters:

  1. Set Response Format to JSON Schema.
  2. Provide your schema in the JSON Schema editor. You can supply either a bare JSON Schema or a wrapped schema object.
JSON
{
  "name": "contact_extraction",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "name": { "type": "string" },
      "email": { "type": "string" },
      "priority": { "type": "string", "enum": ["high", "medium", "low"] }
    },
    "required": ["name", "email", "priority"],
    "additionalProperties": false
  }
}

Because Requesty standardizes structured outputs across different models, you can switch the underlying model from openai/gpt-4o-mini to anthropic/claude-3-5-sonnet or google/gemini-1.5-pro without changing a single line of schema validation logic.


AI agents are only as good as the information they have access to. In standard setups, giving a model search capabilities means provisioning Google/Bing search APIs, configuring custom search nodes, and managing additional API quotas.

With the Requesty community node, you can enable native web search with a single toggle:

  1. Add Option → Enable Web Search.
  2. Select the Web Search Context Size (low, medium, or high) to control how much background context is fetched per query.

Behind the scenes, Requesty attaches a highly optimized native web search tool directly to the request body. If the agent needs real-time information (such as checking current stock prices, weather, or news), it executes the search securely through the gateway, fetches the most relevant markdown results, and synthesizes the final answer.


5. Precise Reasoning Control

For complex logic—such as evaluating code, debugging server logs, or performing multi-step math—reasoning models like DeepSeek-R1 or OpenAI's o1 and o3-mini are invaluable. However, reasoning is expensive and introduces latency.

To let you balance quality and speed, the node exposes Reasoning Effort under Options:

  • Default: Let the provider model decide its reasoning depth.
  • Low: Optimize for speed and lower token consumption (ideal for simpler reasoning tasks).
  • Medium: Balanced speed and accuracy.
  • High: Allocate maximum reasoning tokens for complex algorithmic challenges.

This gives you fine-grained control over how reasoning-capable models execute inside your n8n agent.


Multi-Model Resiliency

The true power of this integration is the freedom to combine models dynamically. By placing Requesty at the center of your n8n AI workflows, you can build a resilient, multi-provider architecture:

  1. Intelligent Fallbacks: If Anthropic's API experiences temporary latency or downtime, Requesty automatically routes the request to an equivalent-tier model like Gemini or GPT-4o, keeping your automated pipelines running.
  2. Geographic Compliance: Enforce that data stays within specific regions (such as EU-only endpoints) directly at the routing layer without changing your n8n flow configurations.
  3. No Infrastructure Lock-In: Test new model releases the day they drop simply by changing the model name parameter in n8n.

You can learn more about configuring fallback routing policies in our guide on designing fallback retries with jitter and read about unified schema management in our deep dive on structured outputs across LLM providers.

To start building, install @requesty/n8n-nodes-requesty in your n8n instance and head over to the Requesty Dashboard to generate your API key.

Frequently asked questions

What is the official n8n community node for Requesty?
The official community node is `@requesty/n8n-nodes-requesty`. It allows n8n workflows to access 300+ LLMs through the Requesty gateway with built-in tracing, native web search, reasoning controls, and strict structured outputs.
How do I trace n8n workflow executions in the Requesty dashboard?
The Requesty node automatically maps the n8n Execution ID to `requesty.trace_id`. In addition, you can set custom headers like `X-Requesty-Agent`, `X-Requesty-Environment`, and `X-Requesty-Team` to filter and analyze logs.
Does the Requesty n8n node support structured output?
Yes. By selecting the JSON Schema response format, the node leverages Requesty's Responses API (`text.format`) to enforce strict JSON schemas server-side, ensuring perfect structured outputs across different LLM providers.
Related reading