ImageGen icon

ImageGen

Generate images using BING

Overview

This node, named "ImageGen," generates images using Bing's AI image generation capabilities. It takes a textual prompt describing the desired image and returns links to generated images based on that prompt. This node is useful for scenarios where users want to create AI-generated visuals from descriptive text, such as generating concept art, creative illustrations, or visual content for marketing materials.

For example, a user could input the prompt "Wizards cooking in KFC kitchen, CCTV footage" to receive AI-generated images matching that imaginative scene.

Properties

Name Meaning
Cookie An authorization cookie from Bing required to authenticate the request for image generation.
Prompt The textual description or prompt used by the AI model to generate images.

Output

The node outputs a JSON array with a single object containing a property links. This property holds an array of URLs (strings) pointing to the generated images based on the provided prompt.

Example output structure:

[
  {
    "links": [
      "https://example.com/generated-image1.jpg",
      "https://example.com/generated-image2.jpg"
    ]
  }
]

No binary data output is produced by this node.

Dependencies

  • Requires an authorization cookie from Bing to access the image generation service.
  • Depends on an internal helper function (generateImagesLinks) which handles communication with Bing's image generation API.
  • No additional environment variables or n8n credentials are explicitly required beyond providing the Bing authorization cookie.

Troubleshooting

  • Invalid or expired cookie: If the provided Bing authorization cookie is invalid or expired, the node will likely fail to retrieve images. Ensure the cookie is current and correctly copied.
  • Empty or unclear prompt: Providing an empty or vague prompt may result in no images or irrelevant results. Use clear and descriptive prompts.
  • Network or API errors: Connectivity issues or changes in Bing's API might cause failures. Check network connectivity and verify if the Bing service is operational.
  • Error messages: Errors related to authentication or API response should be resolved by updating the cookie or verifying prompt validity.

Links and References

  • Bing Image Creator — Official Bing AI image generation tool (for reference).
  • No direct public API documentation is referenced in the code; usage depends on the authorization cookie and internal helper logic.

Discussion