> ## Documentation Index
> Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

> Requesty community nodes for n8n: chat models and image generation

[n8n](https://n8n.io) is a workflow automation platform where you build AI agents and pipelines visually. The Requesty community node package gives you two nodes: the **Requesty Chat Model** node drives any AI workflow with 600+ models through Requesty's unified gateway, and the **Requesty Image Generation** node creates images from text prompts, all with a single API key.

Using the Requesty integration, you can:

* Access **600+ models** from OpenAI, Anthropic, Google, Meta, Mistral, Cohere, and many other providers through one API key.
* **Generate images** from text prompts, in any workflow or as an AI Agent tool.
* Enforce **strict JSON Schema** server side for real structured output, not prompt engineered.
* Give the model a **native web search** tool for up to date information.
* Tune **reasoning effort** for reasoning capable models.
* Apply [fallback policies](https://docs.requesty.ai/features/fallback-policies.md), [load balancing](https://docs.requesty.ai/features/load-balancing-policies.md), and [latency routing](https://docs.requesty.ai/features/latency-routing.md) to keep your workflows responsive.
* Track and manage your spend in a single location.

## Prerequisites

* A running n8n instance (Cloud or self hosted).
* A Requesty API key from the [API Keys page](https://app.requesty.ai/api-keys).

## Installation

Follow the [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n documentation.

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

```
@requesty/n8n-nodes-requesty
```

## Credentials

1. Sign up at [app.requesty.ai](https://app.requesty.ai/sign-up).
2. Generate an API key on the [API Keys page](https://app.requesty.ai/api-keys).
3. In n8n, create a new **Requesty API** credential and paste your key.

## Usage

### Chat models

The **Requesty Chat Model** node connects to any model available through Requesty's unified gateway. Use it anywhere n8n accepts a chat model, such as the AI Agent node, Basic LLM Chain, or any AI workflow.

Once your API key is saved, the **Model** dropdown auto populates with all available models. You can also set a model ID directly using an expression, for example `anthropic/claude-sonnet-4-6` or `openai/gpt-5.4`. To route through a policy, use the `policy/policy-name` format such as `policy/reliable-coding`. See [Routing Policies](https://docs.requesty.ai/features/fallback-policies.md) for how to create a policy that automatically falls back between models.

#### Configuration options

| Option | Default | Description |
| - | - | - |
| Response Format | Text | Text, JSON Object, or JSON Schema (strict structured output) |
| JSON Schema | (example) | The schema the response must match when Response Format is JSON Schema |
| Reasoning Effort | Default | Reasoning level (low, medium, high) for reasoning capable models |
| Base URL | (gateway) | Override the gateway URL for self hosted Requesty deployments |
| Enable Web Search | off | Give the model a native web search tool for up to date information |
| Web Search Context Size | medium | How much context the web search retrieves per query |
| Sampling Temperature | 0.7 | Controls randomness (0 is deterministic, 2 is very random) |
| Maximum Tokens | unlimited | Maximum number of tokens to generate |
| Top P | 1 | Nucleus sampling probability mass |
| Frequency Penalty | 0 | Penalizes token repetition |
| Presence Penalty | 0 | Penalizes already seen tokens |

### Image generation

The **Requesty Image Generation** node turns a text prompt into an image using models available through the gateway, such as `azure/openai/gpt-image-1`. Use it as a regular node in any workflow, or attach it to an AI Agent as a tool.

By default the node outputs binary image data, so you get a preview right in the n8n output panel and can pass the image to downstream nodes like Write Binary File or HTTP Request. Enable **Return Image URLs** to receive URLs in the JSON output instead.

#### Configuration options

| Option | Default | Description |
| - | - | - |
| Model | `azure/openai/gpt-image-1` | The model to use for image generation |
| Prompt | (required) | A text description of the desired image |
| Size | `1024x1024` | Image dimensions: `1024x1024`, `1536x1024`, or `1024x1536` |
| Quality | auto | Image quality: auto, high, medium, or low |
| Number of Images | 1 | How many images to generate (1 to 10) |
| Background | auto | Background type: auto, transparent, or opaque |
| Output Format | png | File format: png, jpeg, or webp |
| Return Image URLs | off | Return URLs instead of binary image data |
| Base URL | (gateway) | Override the gateway URL for self hosted deployments |
| Custom Headers | (none) | Extra HTTP headers for tagging and tracking |

#### Using image generation as an AI Agent tool

The node can act as a tool that an AI Agent calls on its own when a user asks for an image:

1. Set the environment variable `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` on your n8n instance.
2. Add the **Requesty Image Generation** node to your workflow.
3. Connect it to the AI Agent's **Tools** input.
4. The agent decides when to generate images and writes the prompt itself.

When used as a tool, enable **Return Image URLs** so the agent receives URLs it can reference in its response.

### Key features

* **600+ models**: Access models from OpenAI, Anthropic, Google, Meta, Mistral, Cohere, and more.
* **Image generation**: Create images from text prompts, in workflows or as an AI Agent tool.
* **Responses API**: Built on the Responses API, unlocking richer capabilities than plain chat completions.
* **Structured output**: Enforce a strict JSON Schema server side ([structured outputs](https://docs.requesty.ai/features/structured-outputs.md)).
* **Native web search**: Let the model search the web for current information ([web search](https://docs.requesty.ai/features/web-search.md)).
* **Reasoning control**: Tune reasoning effort for reasoning capable models ([reasoning](https://docs.requesty.ai/features/reasoning.md)).
* **Intelligent routing**: Automatic fallbacks and load balancing across providers.
* **Self hosted friendly**: Point the nodes at your own Requesty deployment via the Base URL option.

## Verification

Add the **Requesty Chat Model** node to a workflow (for example connected to an AI Agent), run it, and confirm you get a response. For images, add the **Requesty Image Generation** node with a prompt and run it, then check the output panel for the image preview. Finally, open the [Requesty analytics dashboard](https://app.requesty.ai/analytics) to confirm the requests were logged.

## Resources

* [Requesty community nodes on npm](https://www.npmjs.com/package/@requesty/n8n-nodes-requesty)
* [n8n-requesty on GitHub](https://github.com/requestyai/n8n-requesty)
* [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/installation/)
* [Requesty Model Library](https://app.requesty.ai/model-list)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.