Description
Simple Post Publish & Rewrite using API gives your site a single REST endpoint for creating posts from external scripts, apps, automations and bots. Send some text and the plugin creates the post, imports the featured image into your Media Library, and assigns categories and tags.
Want AI help? Add your OpenAI API key and the plugin can write a headline and rewrite your source text into a well-structured, ready-to-publish article, using GPT-6, GPT-5 or GPT-4 models.
Key features
- One REST endpoint –
POST /wp-json/api-publisher/v1/generatefrom PHP, Python, cURL, Zapier, n8n, Make or anything that speaks HTTP. - AI headlines and rewriting – optional. Use your own OpenAI key with the latest models (GPT-6 Luna, Sol and Astra, GPT-5.5, GPT-5, GPT-4.1, GPT-4o), or on WordPress 7.0+ the AI provider connected in Settings Connectors (OpenAI, Anthropic Claude or Google Gemini).
- Clean HTML output – rewritten articles come back as paragraphs and subheadings, ready to publish.
- Featured images – send an image URL and it is imported into the Media Library and set as the featured image.
- Categories and tags – pass category IDs, slugs or names, plus tags.
- Secure authentication – WordPress Application Passwords (built in) or JWT tokens.
- Playground – create a test post from the dashboard to check your settings and prompts.
- Request log – see every API call, its result, the model used and how long it took.
- Customisable prompts – adjust the headline and article prompts to match your site’s style.
Authentication
Requests must come from a user who can publish posts. Choose one method:
- Application Passwords (recommended) – built into WordPress. Create one under Users Profile Application Passwords and send it with HTTP Basic auth.
- JWT – install JWT Authentication for WP REST API, define
JWT_AUTH_SECRET_KEYinwp-config.php, and sendAuthorization: Bearer <token>.
Extend this plugin
Telegram Bot Integration & Article Rewrite with ChatGPT – send a message to your Telegram bot and get a finished, rewritten post on your website.
Source code
External Services
When “WordPress AI (Settings Connectors)” is selected, AI requests go through the WordPress AI Client to the provider you connected there, under that provider’s terms.
Otherwise, this plugin connects to the OpenAI API (https://api.openai.com) only when a request asks for an AI-generated title or a rewrite, or when an administrator clicks “Test connection” or “Load models” on the settings screen.
- What is sent: the source text from the API request, your title and article prompts, the selected model name and your OpenAI API key.
- When: only while processing a request with
generate_titleorrewriteset to true, or during a settings connection test. - Nothing is sent to OpenAI for requests that do not use AI features.
Service provider: OpenAI
Terms of use: https://openai.com/policies/terms-of-use
Privacy policy: https://openai.com/policies/privacy-policy
When you send an image_url, the plugin downloads that image from the URL you supplied so it can be added to your Media Library.
Screenshots




Installation
- Install the plugin from Plugins Add New, or upload the plugin folder to
/wp-content/plugins/. - Activate it.
- Go to API Publisher Settings. Add your OpenAI API key if you want AI features, choose a model and save.
- Create an Application Password under Users Profile (or set up JWT).
- Try it in API Publisher Playground, then call the endpoint from your app. API Publisher API Guide has ready-made cURL, PHP and Python examples.
FAQ
-
Do I need an OpenAI API key?
-
Only for AI features (
generate_titleorrewrite). Plain publishing through the API works without one. -
Which parameters can I send?
-
text(required) – post content, or source text for a rewrite. Plain text or HTML.title– required unlessgenerate_titleis true.generate_title– true/false. Let AI write the headline.rewrite– true/false. Let AI rewrite the text into a full article.category– category IDs, slugs or names, comma-separated or as an array.tags– comma-separated or as an array.image_url– image to import as the featured image.status–publish,pendingordraft. Overrides the default status.
-
Do I still need the JWT Authentication plugin?
-
No. Since version 2.0, Application Passwords (built into WordPress) work out of the box. JWT is still supported.
-
The article is cut off or empty. What should I do?
-
Increase Max tokens in the settings. Reasoning models (GPT-5 and GPT-6) use part of the budget to think before they write. The default of 4000 suits most articles.
-
I was using GPT-3.5 Turbo or GPT-4. What happens?
-
OpenAI is retiring those models. On update, the plugin switches sites that used them to GPT-6 Luna automatically. You can choose another model at any time.
-
Can I use Claude or Gemini instead of OpenAI?
-
Yes, on WordPress 7.0 or later. Connect the provider in Settings Connectors, then choose “WordPress AI (Settings Connectors)” under API Publisher Settings AI provider.
-
Can I use a model that is not in the list?
-
Yes. Choose “Custom model ID…” and type the model ID, or click “Load models available on my key” to list every chat model your account can use.
-
How do I use this plugin?
-
Watch the step-by-step video tutorial.
Reviews
Contributors & Developers
“Simple Post Publish & Rewrite using API” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Simple Post Publish & Rewrite using API” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.0.1
- New: On WordPress 7.0+, use the AI provider connected in Settings Connectors (OpenAI, Anthropic Claude or Google Gemini) instead of a separate OpenAI key.
- Fix: Later updates no longer reset a custom “Max tokens” value below 1000.
- Plugin Check: added translator comments and documented the time-limit extension for long AI requests.
2.0.0
- New: Redesigned admin with Settings, Playground, API Guide and Request Log tabs.
- New: Latest OpenAI models – GPT-6 Luna, Sol and Astra, GPT-5.5, GPT-5, GPT-4.1 and GPT-4o – plus custom model IDs and “Load models available on my key”.
- New: “Test connection” button for the OpenAI API key.
- New: Reasoning effort setting for GPT-5 and GPT-6 models.
- New: WordPress Application Passwords are supported, so the JWT plugin is no longer required.
- New: Optional
statusparameter, and categories can be sent by slug or name. - New: Fallback category setting.
categoryis now optional. - New: Rewritten articles are returned as clean HTML with paragraphs and subheadings.
- New: The response includes
post_url,edit_url,titleandwarnings. - Fix: Fatal “Class Firebase\JWT\JWT not found” error with current versions of the JWT Authentication plugin.
- Fix: Admin stylesheet was never loaded.
- Fix: Comma-separated category IDs were not assigned.
- Fix: Articles were cut short by the old 200-token default. The default is now 4000.
- Fix: Requests to newer OpenAI models failed because of the deprecated
max_tokensparameter. - Fix: OpenAI requests timed out after 15 seconds. The limit is now 180 seconds.
- Fix: Formatting (paragraphs, bold, links) was stripped from posts that were not rewritten.
- Fix: Posts had no author when created through the API.
- Fix: Image URLs with query strings or no file extension failed to import. A failed image no longer fails the whole request.
- Fix: Clear OpenAI error messages instead of raw JSON.
- Security: The JWT secret is no longer copied into the database. JWT issuer is validated.
- Security: AI output and submitted HTML are sanitised before saving.
- Performance: The request log is capped at 100 entries and no longer autoloaded on every page.
- Tested with WordPress 7.1.
1.1
- Improvements.
1.0
- Initial release.
