{
  "name": "OpenAI responses API adapter for LLM and AI agent workflows",
  "nodes": [
    {
      "id": "8531ff8a-b247-4baa-a85b-11512fc2bb60",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -320,
        -500
      ]
    },
    {
      "id": "a039b516-a74a-4ea6-8583-abec9bf2a1f8",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -120,
        -500
      ]
    },
    {
      "id": "454a16ea-9bcf-4cb8-a62d-95a1aedea974",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -320,
        160
      ]
    },
    {
      "id": "3fca113b-f259-4495-a52c-89f3c09748c0",
      "name": "OpenAI Models",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -100,
        160
      ]
    },
    {
      "id": "bee5a8d3-e18a-4756-99ea-7d14fa08e2f5",
      "name": "POST ChatCompletions",
      "type": "n8n-nodes-base.webhook",
      "position": [
        460,
        240
      ]
    },
    {
      "id": "974fd565-c1cf-468a-827f-391bd013e145",
      "name": "Models Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        120,
        160
      ]
    },
    {
      "id": "6a4bfb20-5562-4500-9ee2-521f848d3825",
      "name": "Remap to Response API Schema",
      "type": "n8n-nodes-base.code",
      "position": [
        680,
        240
      ]
    },
    {
      "id": "5f4f22c9-f333-469c-a915-8f5da6443e53",
      "name": "OpenAI Responses API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        900,
        240
      ]
    },
    {
      "id": "5242a76d-9649-469b-ba91-e33d0f42850e",
      "name": "Is Agent?",
      "type": "n8n-nodes-base.if",
      "position": [
        1100,
        240
      ]
    },
    {
      "id": "4ecc0ec2-4637-48d9-9157-0a6dc39bab9e",
      "name": "n8n Webhook",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -140,
        -320
      ]
    },
    {
      "id": "d050bfc1-ce7a-4ae2-b4b1-763be76b8061",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -740
      ],
      "parameters": {
        "width": 700,
        "height": 580,
        "content": "## 1. Create a New Custom OpenAI Credential\n[Learn more about OpenAI Credentials](https://docs.n8n.io/integrations/builtin/credentials/openai/)\n\nTo use Github Models with our existing n8n nodes, one a"
      }
    },
    {
      "id": "7703f756-652b-44e4-81b3-021323b08e18",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -380
      ],
      "parameters": {
        "width": 540,
        "height": 240,
        "content": "### LLM Models via N8N Webhooks\n1. Create a new OpenAI Credential and call it \"n8n-responses-api\"\n2. Enter API key as anything you like eg. \"12345\"\n3. Enter Base URL as \"https://<your_n8n_url>/webhook"
      }
    },
    {
      "id": "a6bc3bcc-d1e9-4d7a-947b-faeddda59507",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -40
      ],
      "parameters": {
        "width": 740,
        "height": 420,
        "content": "## 2. Listing All Available Models \n[Read more about the Webhook Trigger node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)\n\nOur first endpoint is for listing all model"
      }
    },
    {
      "id": "54e0b20a-1a3d-4068-b76a-9b6d10fa0fc2",
      "name": "Format Completion Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1320,
        340
      ]
    },
    {
      "id": "a7f2daa8-b4be-4571-b210-3d7ffd7481a3",
      "name": "JSON Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1520,
        340
      ]
    },
    {
      "id": "4d64850a-3125-47eb-a892-1beddbb371fb",
      "name": "Text Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1520,
        140
      ]
    },
    {
      "id": "a9352379-8001-4ff2-a76a-cd927e9f47a2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -40
      ],
      "parameters": {
        "width": 1360,
        "height": 580,
        "content": "## 3. Remap OpenAI Responses API for Langchain Compatibility\n[Learn more about the HTTP request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nOpenAI's Response"
      }
    },
    {
      "id": "cd8859ef-9d74-4272-a580-d0db59ce1a43",
      "name": "Format Stream Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1320,
        140
      ]
    },
    {
      "id": "e1cb299d-3301-41d9-aa99-9b740105f377",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -740
      ],
      "parameters": {
        "width": 420,
        "height": 1180,
        "content": "## Try It Out!\n### This n8n template demonstrates how to use OpenAI's Responses API with existing LLM and AI Agent nodes.\n\nThough I would recommend just waiting for official support, if you're impatie"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "OpenAI Models",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Agent?": {
      "main": [
        [
          {
            "node": "Format Stream Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Completion Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n Webhook": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Models": {
      "main": [
        [
          {
            "node": "Models Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Responses API": {
      "main": [
        [
          {
            "node": "Is Agent?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST ChatCompletions": {
      "main": [
        [
          {
            "node": "Remap to Response API Schema",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Stream Response": {
      "main": [
        [
          {
            "node": "Text Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Completion Response": {
      "main": [
        [
          {
            "node": "JSON Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remap to Response API Schema": {
      "main": [
        [
          {
            "node": "OpenAI Responses API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}