Title: Simple Post Publish &amp; Rewrite using API
Author: Tech Avenue Labs
Published: <strong>November 24, 2024</strong>
Last modified: September 25, 2026

---

Search plugins

![](https://ps.w.org/simple-publish-rewrite-api/assets/banner-772x250.png?rev=3713547)

![](https://ps.w.org/simple-publish-rewrite-api/assets/icon-256x256.png?rev=3713547)

# Simple Post Publish & Rewrite using API

 By [Tech Avenue Labs](https://profiles.wordpress.org/techavenuelabs/)

[Download](https://downloads.wordpress.org/plugin/simple-publish-rewrite-api.2.0.1.zip)

 * [Details](https://mri.wordpress.org/plugins/simple-publish-rewrite-api/#description)
 * [Reviews](https://mri.wordpress.org/plugins/simple-publish-rewrite-api/#reviews)
 *  [Installation](https://mri.wordpress.org/plugins/simple-publish-rewrite-api/#installation)
 * [Development](https://mri.wordpress.org/plugins/simple-publish-rewrite-api/#developers)

 [Support](https://wordpress.org/support/plugin/simple-publish-rewrite-api/)

## 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/generate` from 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:

 1. **Application Passwords (recommended)** – built into WordPress. Create one under
    _Users  Profile  Application Passwords_ and send it with HTTP Basic auth.
 2. **JWT** – install [JWT Authentication for WP REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/),
    define `JWT_AUTH_SECRET_KEY` in `wp-config.php`, and send `Authorization: Bearer
    <token>`.

#### Extend this plugin

**[Telegram Bot Integration & Article Rewrite with ChatGPT](https://www.techavenuelabs.com/products/telegram-bot-article-rewriter/)**–
send a message to your Telegram bot and get a finished, rewritten post on your website.

#### Source code

[GitHub repository](https://github.com/techavenuelabs/Simple-Post-Publish-Rewrite-using-API)

### 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_title` or `rewrite` 
   set to true, or during a settings connection test.
 * Nothing is sent to OpenAI for requests that do not use AI features.

Service provider: [OpenAI](https://openai.com/)
 Terms of use: [https://openai.com/policies/terms-of-use](https://openai.com/policies/terms-of-use)
Privacy policy: [https://openai.com/policies/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

[⌊Settings – OpenAI connection, model, prompts and publishing defaults.⌉⌊Settings–
OpenAI connection, model, prompts and publishing defaults.⌉[

Settings – OpenAI connection, model, prompts and publishing defaults.

[⌊Playground – create a test post from the dashboard and see the API response.⌉⌊
Playground – create a test post from the dashboard and see the API response.⌉[

Playground – create a test post from the dashboard and see the API response.

[⌊API Guide – authentication, parameters and copy-paste code examples.⌉⌊API Guide–
authentication, parameters and copy-paste code examples.⌉[

API Guide – authentication, parameters and copy-paste code examples.

[⌊Request Log – every request with its result, model and duration.⌉⌊Request Log –
every request with its result, model and duration.⌉[

Request Log – every request with its result, model and duration.

## Installation

 1. Install the plugin from _Plugins  Add New_, or upload the plugin folder to `/wp-
    content/plugins/`.
 2. Activate it.
 3. Go to **API Publisher  Settings**. Add your OpenAI API key if you want AI features,
    choose a model and save.
 4. Create an Application Password under _Users  Profile_ (or set up JWT).
 5. 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_title` or `rewrite`). 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 unless `generate_title` is 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`, `pending` or `draft`. 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](https://www.youtube.com/watch?v=dH-viqHbTDA).

## Reviews

![](https://secure.gravatar.com/avatar/447e3affa10eeebd1bbb40a8d9ed0a574f3adaa30b001bba44ca049946861be2?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin](https://wordpress.org/support/topic/amazing-plugin-2672/)󠁿

 [Sohail Ahmed](https://profiles.wordpress.org/gossdhosting/) November 28, 2024

This plugin solved my problem for publishing news from my flutter app!!

 [ Read all 1 review ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/)

## Contributors & Developers

“Simple Post Publish & Rewrite using API” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ Tech Avenue Labs ](https://profiles.wordpress.org/techavenuelabs/)

[Translate “Simple Post Publish & Rewrite using API” into your language.](https://translate.wordpress.org/projects/wp-plugins/simple-publish-rewrite-api)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/simple-publish-rewrite-api/),
check out the [SVN repository](https://plugins.svn.wordpress.org/simple-publish-rewrite-api/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/simple-publish-rewrite-api/)
by [RSS](https://plugins.trac.wordpress.org/log/simple-publish-rewrite-api/?limit=100&mode=stop_on_copy&format=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 `status` parameter, and categories can be sent by slug or name.
 * New: Fallback category setting. `category` is now optional.
 * New: Rewritten articles are returned as clean HTML with paragraphs and subheadings.
 * New: The response includes `post_url`, `edit_url`, `title` and `warnings`.
 * 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_tokens`
   parameter.
 * 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.

## Meta

 *  Version **2.0.1**
 *  Last updated **19 hours ago**
 *  Active installations **10+**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/simple-publish-rewrite-api/)
 * Tags
 * [AI writer](https://mri.wordpress.org/plugins/tags/ai-writer/)[auto post](https://mri.wordpress.org/plugins/tags/auto-post/)
   [ChatGPT](https://mri.wordpress.org/plugins/tags/chatgpt/)[openai](https://mri.wordpress.org/plugins/tags/openai/)
   [rest-api](https://mri.wordpress.org/plugins/tags/rest-api/)
 *  [Advanced View](https://mri.wordpress.org/plugins/simple-publish-rewrite-api/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/simple-publish-rewrite-api/reviews/)

## Contributors

 *   [ Tech Avenue Labs ](https://profiles.wordpress.org/techavenuelabs/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/simple-publish-rewrite-api/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://buymeacoffee.com/techavenuelabs)