This workflow generates high-quality AI images from text prompts using Leonardo AI, then automatically uploads the result to your WordPress media library and returns the final image URL.
It functions as a Modular Content Production (MCP) tool - ideal for AI agents or workflows that need to dynamically generate and store visual assets on-demand.
🧠 AI-Powered Generation
Uses Leonardo AI to create 1472x832px images from any text prompt, with enhanced contrast and style UUID preset.
☁️ WordPress Media Upload
Uploads the image as an attachment to your connected WordPress site via REST API.
🔗 Returns Final URL
Outputs the publicly accessible image URL for immediate use in websites, blogs, or social media posts.
🔁 Workflow-Callable (MCP Compatible)
Can be executed standalone or triggered by another workflow. Acts as an image-generation microservice for larger automation pipelines.
image_url
for content embedding or post-publishingField | Type | Description |
---|---|---|
prompt | string | Text prompt for image generation |
slug | string | Filename identifier (e.g. hero-image ) |
Example:
{
"prompt": "A futuristic city skyline at night",
"slug": "futuristic-city"
}
{
"image_url": "https://yourwordpresssite.com/wp-content/uploads/2025/07/img-futuristic-city.jpg"
}
httpHeaderAuth
for Leonardo headershttpBearerAuth
for Leonardo bearer tokenwordpressApi
for uploadExecute Workflow Trigger
/ Manual Trigger
Code
(Input Parser)HTTP Request
→ Leonardo image generationWait
→ 1 min delayHTTP Request
→ Poll generation resultHTTP Request
→ Download imageHTTP Request
→ Upload to WordPressCode
→ Return final image URL{
"prompt": "Batman typing on a laptop",
"slug": "batman-typing-on-a-laptop"
}
Will return:
https://articles.emp0.com/wp-content/uploads/2025/07/img-batman-typing-on-a-laptop.jpg
This workflow is MCP-compliant—plug it into:
Trigger it from any parent AI agent that needs to generate an image based on a given idea, post, or instruction.