WordPress 7.0 introduces a built-in AI Client — a provider-agnostic PHP API that allows plugins to send prompts to AI models and receive results through a consistent interface. The entry point is wp_ai_client_prompt(), which returns a fluent WP_AI_Client_Prompt_Builder object. It supports text generation, image generation,

9m read timeFrom make.wordpress.org
Post cover image
Table of contents
The entry point: wp_ai_client_prompt()Text generationImage generationGetting the full result objectFeature detectionAdvanced configurationError handlingControlling AI availabilityArchitectureMigration from php-ai-client and wp-ai-clientAdditional resources

Sort: