n8n Integration
n8n is a workflow automation platform that lets you connect AI models with hundreds of apps and services. The AnyAPI community node gives you direct access to 300+ AI models inside n8n — no code required.Overview
The AnyAPI node for n8n supports:Chat Completions
Send messages to GPT-4o, Claude, Gemini, Llama, and more
Web Search
Ground model responses with real-time web search
Image Generation
Create images with DALL-E, Stable Diffusion, and others
Embeddings
Generate text embeddings for semantic search and RAG
Advanced Capabilities
- Function Calling — Let models call external tools and APIs
- Reasoning — Extended thinking for complex tasks (o1, Claude with thinking)
- Prompt Caching — Reduce latency and cost on repeated prompts
- Streaming — Stream responses for real-time output
- Assistant Prefill — Guide model output by prefilling the response
- URL Context — Fetch and include web page content as context
Installation
- Open any workflow in n8n
- Click + to open the nodes panel
- Search for AnyAPI
- Click Install on the community node
For self-hosted n8n, you can also install via Settings > Community Nodes and enter
n8n-nodes-anyapi.ai.Setup
Create Credentials
- Add an AnyAPI node to your workflow
- Click Credential to connect with > Create New Credential
- Enter your API key from the AnyAPI Dashboard
- Base URL defaults to
https://api.anyapi.ai/v1 - Click Test to verify the connection
Quick Start
Chat Completion
The simplest workflow — send a message and get a response:- Add a Manual Trigger node
- Add an AnyAPI node and connect it
- Set Resource to Chat, Operation to Complete
- Choose a model (e.g.
openai/gpt-4o) - Add a message with Role User and your prompt
- Click Test workflow
Example: Scheduled Summary
Generate a daily summary of your data on a schedule:Example: Webhook AI Endpoint
Expose an AI-powered API endpoint:Resources
Chat Completions
| Parameter | Description |
|---|---|
| Model | Model ID (e.g. openai/gpt-4o, anthropic/claude-sonnet-4-20250514, google/gemini-2.0-flash) |
| Messages | List of messages with role (System, User, Assistant) and content |
| Simplified Output | Return only the message content instead of the full API response |
Chat Options
Temperature
Temperature
Sampling temperature from 0 to 2. Lower values make output more focused and deterministic, higher values make it more creative.
Max Tokens
Max Tokens
Maximum number of tokens to generate in the response.
Web Search
Web Search
Enable web search grounding. The model can search the web for up-to-date information. Configure Web Search Context Size (Low, Medium, High) to control how much context is included.
URL Context
URL Context
Provide a URL to fetch and include as context. Useful for summarizing web pages or using web content as reference.
Function Calling
Function Calling
Pass a JSON array of tool definitions. The model can decide to call these tools based on the conversation.
Tool Choice
Tool Choice
Control how the model uses tools: Auto (model decides), None (no tool use), Required (must use a tool).
Parallel Function Calling
Parallel Function Calling
Allow the model to call multiple functions in a single turn. Enabled by default.
Reasoning
Reasoning
Enable extended thinking for complex tasks. Supported by models like
openai/o1, anthropic/claude-sonnet-4-20250514 with thinking. Set Reasoning Budget to control max tokens for thinking steps.Prompt Caching
Prompt Caching
Cache repeated prompts to reduce latency and cost. Especially useful for system prompts and few-shot examples that don’t change between requests.
Streaming
Streaming
Stream the response. n8n will collect the full streamed response and return it as a single output.
Assistant Prefill
Assistant Prefill
Start the assistant’s response with specific text. The model will continue from where you left off. Supported by Anthropic models.
JSON Mode
JSON Mode
Force the model to output valid JSON. Useful when you need structured data for downstream nodes.
Trace ID
Trace ID
Custom trace ID for tracking requests in the AnyAPI Dashboard. Useful for debugging workflows.
Embeddings
| Parameter | Description |
|---|---|
| Model | Embedding model ID (e.g. openai/text-embedding-3-small) |
| Input Text | Text to generate embeddings for |
Image Generation
| Parameter | Description |
|---|---|
| Model | Image model ID (e.g. google/gemini-2.5-flash-image) |
| Prompt | Text description of the image |
| Size | Image dimensions (256x256 to 1792x1024) |
| Quality | Standard or HD |
| Number of Images | How many images to generate (1-10) |
Model Listing
Returns all available models on AnyAPI. Useful for dynamic model selection in workflows.Workflow Examples
AI Content Pipeline
Automate content creation with multiple AI steps:RAG with Web Search
Answer questions using both your data and the web:Image Generation Bot
Generate images on demand via Slack:Multi-Model Comparison
Compare responses from different models:Troubleshooting
Credential Test Fails
- Verify your API key is correct at dash.anyapi.ai
- Check the Base URL is
https://api.anyapi.ai/v1 - Ensure your account has available credits
Model Not Found
- Use the full model ID with provider prefix:
openai/gpt-4o, not justgpt-4o - Use the Model > List operation to see all available models
Unsupported Feature Error
Not all models support all features. If you get an error like “unsupported tool type”, try a different model. For example, web search works with OpenAI and Anthropic models but may not work with all providers.Next Steps
Hermes Agent
Autonomous coding agent with 21 messaging adapters
OpenClaw
AI coding agent with multi-model fallbacks
Web Search
Learn more about web search grounding
Tool Calling
Deep dive into function calling