On May 20, 2026, WordPress 7.0 shipped with something most site owners didn't notice: a native AI Client baked directly into core. Not a plugin. Not a third-party SDK wrapped in a settings page. A first-party, provider-agnostic PHP API that lets any plugin or theme call AI models without managing API keys, SDKs, or provider-specific logic. WordPress 7.1, scheduled for August 19, is about to make it significantly more useful by adding streaming responses and vector embeddings.

If you've been ignoring the AI Client because it sounded like marketing fluff, pay attention. This is the most consequential developer API WordPress has shipped since the REST API landed in 4.7.

What the AI Client actually does

The pattern is familiar to anyone who's built AI features into a WordPress plugin. You need an OpenAI key in your settings. Then someone wants Anthropic support, so you add another key field. Then Google. Three SDKs, three update cycles, three sets of rate-limit logic. Every AI plugin on the site duplicates this infrastructure independently.

The AI Client replaces all of that. The entry point is a single function:

$text = wp_ai_client_prompt( 'Write a haiku about WordPress.' )
    ->generate_text();

Which model answers that call is up to the site owner, configured through a new Connectors screen under Settings. OpenAI, Anthropic, and Google ship as official provider plugins. Community providers use the same interface. No API keys end up in plugin code. No vendor lock-in at the plugin level.

The builder covers five modalities: text generation, image generation, text-to-speech, speech, and video. Each has a generate_*() method for raw output and a generate_*_result() variant that returns token usage, provider metadata, and model information. You can set temperature, system instructions, and model preferences:

$text = wp_ai_client_prompt( 'Summarize the benefits of caching.' )
    ->using_temperature( 0.7 )
    ->using_system_instruction( 'You are a WordPress developer.' )
    ->using_model_preference( 'claude-sonnet-4-6', 'gpt-5.4' )
    ->generate_text();

The using_model_preference() call is a preference, not a binding. If the preferred model isn't configured on the site, the client picks the next available match. That's a smart design — plugins don't break because a site owner switched providers.

Feature detection runs locally without an API call. $builder->is_supported_for_text_generation() returns a boolean based on what's configured. No network traffic, no cost, no guessing.

A REST endpoint in five lines

The most practical pattern from the developer documentation is almost a throwaway. GenerativeAiResult is serializable and goes directly into rest_ensure_response(). A complete AI-powered REST endpoint looks like this:

function my_rest_callback( WP_REST_Request $request ) {
    $result = wp_ai_client_prompt( $request->get_param( 'prompt' ) )
        ->generate_text_result();
    return rest_ensure_response( $result );
}

WP_Error responses get semantically correct HTTP status codes automatically. For most plugin-level AI features, this is the pattern you ship. It's also the recommended workaround for the JavaScript API, which stays admin-only by default and isn't intended for distributed plugins yet.

What 7.1 adds: streaming and embeddings

The 7.0 AI Client is functional but limited. You send a prompt, you wait, you get a response. WordPress 7.1 addresses two of the biggest gaps.

Streaming responses let AI agents send text back to users in real time. Instead of watching a loading spinner while a 500-word summary generates, users see tokens appear as they're produced. This is the difference between "AI-powered" and "feels like AI-powered." The catch: streaming requires server configurations that support long-running requests, which aren't standard on most WordPress hosts. Shared hosting environments with aggressive PHP timeout settings will need adjustments. This is a feature that works great on managed WordPress hosting and VPS setups, but may need configuration work elsewhere.

Vector embeddings are the bigger long-term play. Embeddings convert text into numerical representations that capture semantic meaning. Two pieces of content can be "similar" even if they share zero keywords. WordPress 7.1 leverages recent vector storage support in MySQL and MariaDB to store and query embeddings natively. The practical applications: semantic search that actually understands what a user is looking for, content recommendations based on meaning rather than tags, automatic clustering of related posts, and knowledge-base retrieval for AI chatbots that sit on top of WordPress.

The embeddings story connects to the Abilities API, which 7.0 also consolidated in core. Your AI functions can be exposed as MCP tools and made available to external agents. That means a WordPress site can become an AI tool server — other AI systems can discover and call your site's capabilities programmatically.

The Guidelines feature

Alongside the AI Client improvements, WordPress 7.1 introduces a feature called Guidelines. The details are still emerging from the merge proposal, but the core idea: site owners can define rules and boundaries for how AI interacts with their content. Think of it as a structured way to tell the AI Client "don't touch these post types," "always fact-check against these sources," or "limit creative tone to this range."

This addresses one of the loudest complaints about AI integration in CMS platforms — the fear that AI-generated content will go off-script. Guidelines give site owners a control surface that doesn't require writing custom validation logic in every plugin.

What to do right now

If you maintain a WordPress plugin that calls any AI API, start migrating to the AI Client now. The API is stable in 7.0, and the streaming and embeddings features arriving in 7.1 make it the clear standard going forward. Running your own SDK wrappers will increasingly look like technical debt.

If you manage WordPress sites, check the Connectors screen under Settings after updating to 7.0. Configure at least one provider. The AI Client does nothing without a provider connected, but once it's set up, every plugin that uses the API gets access immediately — no per-plugin configuration needed.

Beta 1 of WordPress 7.1 landed on July 15. If you want to test streaming and embeddings before the August 19 release, install the WordPress Beta Tester plugin or spin up a test instance via WordPress Playground. Don't put betas on production, but do test against your existing plugins and themes.

WordPress is making a bet that AI belongs in core, not in plugins. Two releases in, that bet is paying off.


Sources: WordPress Developer Blog — What's new for developers (July 2026), Unleash WP — WordPress 7.0 AI Client Developer Guide, WP Dude — AI Client Features in WordPress 7.1, Raidboxes — WordPress 7.1 Release Guide