Open ai image generation notw orking

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        -620,
        -160
      ],
      "id": "3abb45e4-38e3-481e-b667-1325a984919a",
      "name": "Telegram Trigger",
      "webhookId": "97954b59-02c2-4a70-a580-4ad906c1bd60",
      "credentials": {
        "telegramApi": {
          "id": "JMD8T4LAIXT70eue",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f16e2015-09f0-4760-ac17-611cf36a0e81",
              "name": "prompt_text",
              "value": "={{ $json.message.text }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -400,
        -140
      ],
      "id": "5da3be9b-9358-46e8-8055-bd6ff8901ec3",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "resource": "image",
        "model": "dall-e-2",
        "prompt": "={{ $json.prompt_text }}",
        "options": {
          "size": "1024x1024",
          "returnImageUrls": true
        }
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -200,
        -120
      ],
      "id": "67eae6ed-0ff1-44ca-a151-629e1cd6f1b3",
      "name": "Generate an image",
      "credentials": {
        "openAiApi": {
          "id": "juz9hkkZ8qAWuUwn",
          "name": "OpenAi account 2"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-3.5-turbo",
          "mode": "list",
          "cachedResultName": "GPT-3.5-TURBO"
        },
        "messages": {
          "values": [
            {}
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -20,
        -40
      ],
      "id": "8d3000dd-abe4-4b72-a461-bd5456f2688c",
      "name": "Message a model",
      "credentials": {
        "openAiApi": {
          "id": "IG1qbvcfcwdUKAii",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a0dc949f-5a34-48a2-8dd5-104cf5c233cf",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a86ee42821dbe0f1770a58ddc0c386bea76a090e78c7ec47f62b1492aa44f386"
  },
  "id": "pVosBmrYEYV0dq3M",
  "tags": []
}
type or paste code here

Hi there, the error is most likely because your open ai organization is not verified

you can only use the generate image if your organization in openAI is verified

you can verify it here
https://platform.openai.com/settings/organization/general

once its verified it should look something like this

and then you can try to retrigger it, and it should work, because ive tried it myself

if this helps,please mark it as the asnwer and give it a like