# How to build an image generation plugin with the WordPress AI Client

DevFeed: [How to build an image generation plugin with the WordPress AI Client](<https://devfeed.tech/articles/how-to-build-an-image-generation-plugin-with-the-wordpress-ai-client-44837.md>)

Original publisher: [Read original article](<https://developer.wordpress.org/news/2026/05/how-to-build-an-image-generation-plugin-with-the-wordpress-ai-client/>)

Author: Felix Arntz

Published: 2026-05-14T14:54:00Z

Content type: tutorial

Language: en

Sources: [WordPress](<https://devfeed.tech/sources/wordpress-developer-blog.md>)

Topics: [WordPress AI](<https://devfeed.tech/topics/wordpress-ai.md>), [WordPress](<https://devfeed.tech/topics/wordpress.md>), [PHP](<https://devfeed.tech/topics/php.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>), [prompt](<https://devfeed.tech/topics/prompt.md>), [Library](<https://devfeed.tech/topics/library.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [interface](<https://devfeed.tech/topics/interface.md>), [service](<https://devfeed.tech/topics/service.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [common-apis](<https://devfeed.tech/tags/common-apis.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [extenders](<https://devfeed.tech/tags/extenders.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [learning](<https://devfeed.tech/tags/learning.md>), [php](<https://devfeed.tech/tags/php.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [plugin-development](<https://devfeed.tech/tags/plugin-development.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [results](<https://devfeed.tech/tags/results.md>), [wordpress](<https://devfeed.tech/tags/wordpress.md>), [wordpress-ai](<https://devfeed.tech/tags/wordpress-ai.md>)

## AI overview

A tutorial on using the WordPress AI Client to build a provider-agnostic PHP plugin that generates images in the Media Library. It explains how plugins describe requirements while WordPress routes requests to configured AI providers and models.

## Source excerpt

Learn how to use the WordPress AI Client to build a provider-agnostic plugin that generates images directly within the Media Library.