{"id":212102,"date":"2024-11-24T15:08:28","date_gmt":"2024-11-24T15:08:28","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/simple-post-publish-rewrite-using-api\/"},"modified":"2026-09-25T20:42:54","modified_gmt":"2026-09-25T20:42:54","slug":"simple-publish-rewrite-api","status":"publish","type":"plugin","link":"https:\/\/mri.wordpress.org\/plugins\/simple-publish-rewrite-api\/","author":23171778,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.1","stable_tag":"2.0.1","tested":"7.1.2","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Simple Post Publish & Rewrite using API","header_author":"Tech Avenue Labs","header_description":"Publishes and rewrites text content into articles using OpenAI's GPT model, saving images in the WordPress media library. Requires the JWT Authentication for WP REST API plugin.","assets_banners_color":"00a99d","last_updated":"2026-09-25 20:42:54","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/buymeacoffee.com\/techavenuelabs","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/simple-publish-rewrite-api\/","header_author_uri":"https:\/\/www.techavenuelabs.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":3330,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"techavenuelabs","date":"2024-11-24 15:14:01","revision":3195901},"1.1":{"tag":"1.1","author":"techavenuelabs","date":"2024-12-02 19:42:13","revision":3201164},"2.0.0":{"tag":"2.0.0","author":"techavenuelabs","date":"2026-09-25 20:31:57","revision":3713547},"2.0.1":{"tag":"2.0.1","author":"techavenuelabs","date":"2026-09-25 20:42:54","revision":3713555}},"upgrade_notice":{"2.0.1":"<p>Adds support for the WordPress 7.0 AI Connectors (OpenAI, Claude, Gemini) and fixes a settings reset on update.<\/p>","2.0.0":"<p>Major update: redesigned admin, GPT-6 support, Application Passwords and many bug fixes. Sites using GPT-3.5 Turbo or GPT-4 (being retired by OpenAI) are switched to GPT-6 Luna automatically.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3713547,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3713547,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3713547,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","2.0.0","2.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3713547,"resolution":"1","location":"assets","locale":"","width":1280,"height":1274},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3713547,"resolution":"2","location":"assets","locale":"","width":1280,"height":1058},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3713547,"resolution":"3","location":"assets","locale":"","width":1280,"height":1488},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3713547,"resolution":"4","location":"assets","locale":"","width":1280,"height":900}},"screenshots":{"1":"Settings \u2013 OpenAI connection, model, prompts and publishing defaults.","2":"Playground \u2013 create a test post from the dashboard and see the API response.","3":"API Guide \u2013 authentication, parameters and copy-paste code examples.","4":"Request Log \u2013 every request with its result, model and duration."}},"plugin_section":[],"plugin_tags":[210511,2015,216196,194533,23853],"plugin_category":[],"plugin_contributors":[235024],"plugin_business_model":[],"class_list":["post-212102","plugin","type-plugin","status-publish","hentry","plugin_tags-ai-writer","plugin_tags-auto-post","plugin_tags-chatgpt","plugin_tags-openai","plugin_tags-rest-api","plugin_contributors-techavenuelabs","plugin_committers-techavenuelabs"],"banners":{"banner":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/banner-772x250.png?rev=3713547","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/icon-128x128.png?rev=3713547","icon_2x":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/icon-256x256.png?rev=3713547","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/screenshot-1.png?rev=3713547","caption":"Settings \u2013 OpenAI connection, model, prompts and publishing defaults."},{"src":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/screenshot-2.png?rev=3713547","caption":"Playground \u2013 create a test post from the dashboard and see the API response."},{"src":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/screenshot-3.png?rev=3713547","caption":"API Guide \u2013 authentication, parameters and copy-paste code examples."},{"src":"https:\/\/ps.w.org\/simple-publish-rewrite-api\/assets\/screenshot-4.png?rev=3713547","caption":"Request Log \u2013 every request with its result, model and duration."}],"raw_content":"<!--section=description-->\n<p><strong>Simple Post Publish &amp; Rewrite using API<\/strong> 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.<\/p>\n\n<p>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.<\/p>\n\n<p>https:\/\/www.youtube.com\/watch?v=dH-viqHbTDA<\/p>\n\n<h4>Key features<\/h4>\n\n<ul>\n<li><strong>One REST endpoint<\/strong> \u2013 <code>POST \/wp-json\/api-publisher\/v1\/generate<\/code> from PHP, Python, cURL, Zapier, n8n, Make or anything that speaks HTTP.<\/li>\n<li><strong>AI headlines and rewriting<\/strong> \u2013 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 <em>Settings \u2192 Connectors<\/em> (OpenAI, Anthropic Claude or Google Gemini).<\/li>\n<li><strong>Clean HTML output<\/strong> \u2013 rewritten articles come back as paragraphs and subheadings, ready to publish.<\/li>\n<li><strong>Featured images<\/strong> \u2013 send an image URL and it is imported into the Media Library and set as the featured image.<\/li>\n<li><strong>Categories and tags<\/strong> \u2013 pass category IDs, slugs or names, plus tags.<\/li>\n<li><strong>Secure authentication<\/strong> \u2013 WordPress Application Passwords (built in) or JWT tokens.<\/li>\n<li><strong>Playground<\/strong> \u2013 create a test post from the dashboard to check your settings and prompts.<\/li>\n<li><strong>Request log<\/strong> \u2013 see every API call, its result, the model used and how long it took.<\/li>\n<li><strong>Customisable prompts<\/strong> \u2013 adjust the headline and article prompts to match your site's style.<\/li>\n<\/ul>\n\n<h4>Authentication<\/h4>\n\n<p>Requests must come from a user who can publish posts. Choose one method:<\/p>\n\n<ol>\n<li><strong>Application Passwords (recommended)<\/strong> \u2013 built into WordPress. Create one under <em>Users \u2192 Profile \u2192 Application Passwords<\/em> and send it with HTTP Basic auth.<\/li>\n<li><strong>JWT<\/strong> \u2013 install <a href=\"https:\/\/wordpress.org\/plugins\/jwt-authentication-for-wp-rest-api\/\">JWT Authentication for WP REST API<\/a>, define <code>JWT_AUTH_SECRET_KEY<\/code> in <code>wp-config.php<\/code>, and send <code>Authorization: Bearer &lt;token&gt;<\/code>.<\/li>\n<\/ol>\n\n<h4>Extend this plugin<\/h4>\n\n<p><strong><a href=\"https:\/\/www.techavenuelabs.com\/products\/telegram-bot-article-rewriter\/\">Telegram Bot Integration &amp; Article Rewrite with ChatGPT<\/a><\/strong> \u2013 send a message to your Telegram bot and get a finished, rewritten post on your website.<\/p>\n\n<h4>Source code<\/h4>\n\n<p><a href=\"https:\/\/github.com\/techavenuelabs\/Simple-Post-Publish-Rewrite-using-API\">GitHub repository<\/a><\/p>\n\n<h3>External Services<\/h3>\n\n<p>When \"WordPress AI (Settings \u2192 Connectors)\" is selected, AI requests go through the WordPress AI Client to the provider you connected there, under that provider's terms.<\/p>\n\n<p>Otherwise, this plugin connects to the <strong>OpenAI API<\/strong> (<code>https:\/\/api.openai.com<\/code>) 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.<\/p>\n\n<ul>\n<li><strong>What is sent:<\/strong> the source text from the API request, your title and article prompts, the selected model name and your OpenAI API key.<\/li>\n<li><strong>When:<\/strong> only while processing a request with <code>generate_title<\/code> or <code>rewrite<\/code> set to true, or during a settings connection test.<\/li>\n<li>Nothing is sent to OpenAI for requests that do not use AI features.<\/li>\n<\/ul>\n\n<p>Service provider: <a href=\"https:\/\/openai.com\/\">OpenAI<\/a>\nTerms of use: <a href=\"https:\/\/openai.com\/policies\/terms-of-use\">https:\/\/openai.com\/policies\/terms-of-use<\/a>\nPrivacy policy: <a href=\"https:\/\/openai.com\/policies\/privacy-policy\">https:\/\/openai.com\/policies\/privacy-policy<\/a><\/p>\n\n<p>When you send an <code>image_url<\/code>, the plugin downloads that image from the URL you supplied so it can be added to your Media Library.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from <em>Plugins \u2192 Add New<\/em>, or upload the plugin folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate it.<\/li>\n<li>Go to <strong>API Publisher \u2192 Settings<\/strong>. Add your OpenAI API key if you want AI features, choose a model and save.<\/li>\n<li>Create an Application Password under <em>Users \u2192 Profile<\/em> (or set up JWT).<\/li>\n<li>Try it in <strong>API Publisher \u2192 Playground<\/strong>, then call the endpoint from your app. <strong>API Publisher \u2192 API Guide<\/strong> has ready-made cURL, PHP and Python examples.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20an%20openai%20api%20key%3F\"><h3>Do I need an OpenAI API key?<\/h3><\/dt>\n<dd><p>Only for AI features (<code>generate_title<\/code> or <code>rewrite<\/code>). Plain publishing through the API works without one.<\/p><\/dd>\n<dt id=\"which%20parameters%20can%20i%20send%3F\"><h3>Which parameters can I send?<\/h3><\/dt>\n<dd><ul>\n<li><code>text<\/code> (required) \u2013 post content, or source text for a rewrite. Plain text or HTML.<\/li>\n<li><code>title<\/code> \u2013 required unless <code>generate_title<\/code> is true.<\/li>\n<li><code>generate_title<\/code> \u2013 true\/false. Let AI write the headline.<\/li>\n<li><code>rewrite<\/code> \u2013 true\/false. Let AI rewrite the text into a full article.<\/li>\n<li><code>category<\/code> \u2013 category IDs, slugs or names, comma-separated or as an array.<\/li>\n<li><code>tags<\/code> \u2013 comma-separated or as an array.<\/li>\n<li><code>image_url<\/code> \u2013 image to import as the featured image.<\/li>\n<li><code>status<\/code> \u2013 <code>publish<\/code>, <code>pending<\/code> or <code>draft<\/code>. Overrides the default status.<\/li>\n<\/ul><\/dd>\n<dt id=\"do%20i%20still%20need%20the%20jwt%20authentication%20plugin%3F\"><h3>Do I still need the JWT Authentication plugin?<\/h3><\/dt>\n<dd><p>No. Since version 2.0, Application Passwords (built into WordPress) work out of the box. JWT is still supported.<\/p><\/dd>\n<dt id=\"the%20article%20is%20cut%20off%20or%20empty.%20what%20should%20i%20do%3F\"><h3>The article is cut off or empty. What should I do?<\/h3><\/dt>\n<dd><p>Increase <strong>Max tokens<\/strong> 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.<\/p><\/dd>\n<dt id=\"i%20was%20using%20gpt-3.5%20turbo%20or%20gpt-4.%20what%20happens%3F\"><h3>I was using GPT-3.5 Turbo or GPT-4. What happens?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20use%20claude%20or%20gemini%20instead%20of%20openai%3F\"><h3>Can I use Claude or Gemini instead of OpenAI?<\/h3><\/dt>\n<dd><p>Yes, on WordPress 7.0 or later. Connect the provider in <em>Settings \u2192 Connectors<\/em>, then choose \"WordPress AI (Settings \u2192 Connectors)\" under <em>API Publisher \u2192 Settings \u2192 AI provider<\/em>.<\/p><\/dd>\n<dt id=\"can%20i%20use%20a%20model%20that%20is%20not%20in%20the%20list%3F\"><h3>Can I use a model that is not in the list?<\/h3><\/dt>\n<dd><p>Yes. Choose \"Custom model ID\u2026\" and type the model ID, or click \"Load models available on my key\" to list every chat model your account can use.<\/p><\/dd>\n<dt id=\"how%20do%20i%20use%20this%20plugin%3F\"><h3>How do I use this plugin?<\/h3><\/dt>\n<dd><p>Watch the step-by-step <a href=\"https:\/\/www.youtube.com\/watch?v=dH-viqHbTDA\">video tutorial<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>New: On WordPress 7.0+, use the AI provider connected in Settings \u2192 Connectors (OpenAI, Anthropic Claude or Google Gemini) instead of a separate OpenAI key.<\/li>\n<li>Fix: Later updates no longer reset a custom \"Max tokens\" value below 1000.<\/li>\n<li>Plugin Check: added translator comments and documented the time-limit extension for long AI requests.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>New: Redesigned admin with Settings, Playground, API Guide and Request Log tabs.<\/li>\n<li>New: Latest OpenAI models \u2013 GPT-6 Luna, Sol and Astra, GPT-5.5, GPT-5, GPT-4.1 and GPT-4o \u2013 plus custom model IDs and \"Load models available on my key\".<\/li>\n<li>New: \"Test connection\" button for the OpenAI API key.<\/li>\n<li>New: Reasoning effort setting for GPT-5 and GPT-6 models.<\/li>\n<li>New: WordPress Application Passwords are supported, so the JWT plugin is no longer required.<\/li>\n<li>New: Optional <code>status<\/code> parameter, and categories can be sent by slug or name.<\/li>\n<li>New: Fallback category setting. <code>category<\/code> is now optional.<\/li>\n<li>New: Rewritten articles are returned as clean HTML with paragraphs and subheadings.<\/li>\n<li>New: The response includes <code>post_url<\/code>, <code>edit_url<\/code>, <code>title<\/code> and <code>warnings<\/code>.<\/li>\n<li>Fix: Fatal \"Class Firebase\\JWT\\JWT not found\" error with current versions of the JWT Authentication plugin.<\/li>\n<li>Fix: Admin stylesheet was never loaded.<\/li>\n<li>Fix: Comma-separated category IDs were not assigned.<\/li>\n<li>Fix: Articles were cut short by the old 200-token default. The default is now 4000.<\/li>\n<li>Fix: Requests to newer OpenAI models failed because of the deprecated <code>max_tokens<\/code> parameter.<\/li>\n<li>Fix: OpenAI requests timed out after 15 seconds. The limit is now 180 seconds.<\/li>\n<li>Fix: Formatting (paragraphs, bold, links) was stripped from posts that were not rewritten.<\/li>\n<li>Fix: Posts had no author when created through the API.<\/li>\n<li>Fix: Image URLs with query strings or no file extension failed to import. A failed image no longer fails the whole request.<\/li>\n<li>Fix: Clear OpenAI error messages instead of raw JSON.<\/li>\n<li>Security: The JWT secret is no longer copied into the database. JWT issuer is validated.<\/li>\n<li>Security: AI output and submitted HTML are sanitised before saving.<\/li>\n<li>Performance: The request log is capped at 100 entries and no longer autoloaded on every page.<\/li>\n<li>Tested with WordPress 7.1.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Improvements.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Publish posts from any app or script through a secure REST API, with optional AI titles and article rewriting using OpenAI&#039;s latest GPT models.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/212102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=212102"}],"author":[{"embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/techavenuelabs"}],"wp:attachment":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=212102"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=212102"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=212102"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=212102"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=212102"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=212102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}