Templates / Generate HTTP API requests from natural language with GPT-4.1 Mini

Generate HTTP API requests from natural language with GPT-4.1 Mini

Ready for 3.0

by NodeFlow Studio ✓ · 27 views · created 2026-07-21 · Engineering, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (6)

AI AgentOpenAI Chat ModelHTTP Request

What it does

Quick overview This n8n workflow turns plain-English requests into live HTTP API calls. An AI agent (GPT-4.1 Mini) reads your request, decides the method, URL, headers, query parameters, and body, then executes it via the HTTP request tool and returns the full response—no manual API configuration needed. How it works 1. Runs when you manually execute the workflow. 2. Reads your natural-language request describing the target API call (endpoint, intent, and any provided parameters). 3. Uses an OpenAI chat model to interpret the request and decide the HTTP method, URL, headers, query parameters, and JSON body. 4. Executes the generated request using n8n’s HTTP Request tool and captures the full response (status, headers, and body). 5. Outputs the API response data for you to review or use in downstream steps. Setup 1. Add an OpenAI API credential for the chat model used by the AI Agent. 2. Update the text in the User Request step with the API request you want to run, including any required IDs, tokens, or auth details your target API needs. 3. If the target API requires authentication, ensure you provide valid credentials in the request description or adapt the workflow to source them securely (for example from n8n credentials or environment variables). Requirements - n8n instance with LangChain nodes enabled - OpenAI API key/credential - Target API's own credentials (key/token), supplied by the user per request Customization - Swap gpt-4.1-mini for any other chat model supported by n8n's AI Agent node Additional info The HTTP Request tool node uses JSON.stringify() wrapping on query/header/body fields to avoid n8n's object-serialization bug with $fromAI() outputs

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.