You can try these below:
1)Pollinations.ai is one of the few services that allows you to generate images via a simple URL without any API key or account registration.
- How it works: You simply construct a URL with your prompt.
- n8n Implementation:
- Use an HTTP Request node.
- Method: GET
- URL:
https://image.pollinations.ai/prompt/[YOUR_PROMPT](Replace[YOUR_PROMPT]with a dynamic expression from your previous nodes, ensuring it is URL-encoded). - Response Format: File.
- Pros: Completely free, no sign-up, no credit card, instant setup.
- Cons: Less control over specific artistic styles compared to Midjourney or DALL-E 3.
More info here
2)Hugging Face hosts thousands of open-source models (like Stable Diffusion XL). They offer a “Free Inference API” for many of these models.
- How it works: You create a free account (no credit card required) and generate a “User Access Token.”
- n8n Implementation:
- Use the HTTP Request node.
- URL:
https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0 - Authentication: Header Auth (
Authorization: Bearer YOUR_TOKEN). - Method: POST (send the prompt in a JSON body).
- Pros: High quality, access to various professional open-source models.
- Cons: Rate limits apply; models may occasionally be “loading” and return a 503 error.