Description
Blippinz AI SEO is a lightweight WordPress plugin that bridges your external AI content generation service with your WordPress site. It registers a secure, configurable REST API endpoint that accepts AI-generated articles — including HTML content, titles, and featured images — and creates them as WordPress posts automatically.
This plugin was built for the Blippinz platform, which uses artificial intelligence to generate SEO-optimised articles. Instead of manually copying content from an AI tool into WordPress, Blippinz AI SEO handles the entire publish flow: receive content upload image set featured image create post go live.
How it works:
- Your AI service (or any HTTP client) sends a POST request to
/wp-json/blipaise/v1/addPost - The request is authenticated using an API key you set in the WordPress admin
- The plugin sanitises and validates all inputs
- It creates the WordPress post with the provided title, content, and status
- If an image is included (base64 or file upload), it is uploaded to the Media Library and set as the post’s featured image
- The API returns the new post ID, permalink, and media URL
Key Features:
- Secure API key authentication — All requests to the post creation endpoint must carry a secret key set exclusively by you in WP Admin. No hardcoded defaults.
- Base64 image upload — Send an image as a base64-encoded string in the JSON payload and the plugin automatically decodes, validates, and uploads it to the Media Library.
- Multipart file upload — Alternatively, upload a file directly using
multipart/form-data. - Automatic featured image — Uploaded images are set as the post’s featured image automatically.
- Configurable upload limits — Set the maximum file size (1–50 MB) and allowed MIME types (JPEG, PNG, GIF, WEBP, PDF) from the settings page.
- Full input sanitisation — All fields are sanitised using native WordPress functions (
sanitize_text_field,wp_kses_post,sanitize_key,absint,sanitize_file_name). - MIME type validation — File types are verified against the server’s actual file contents using
wp_check_filetype_and_ext, not just the filename or client-reported type. - WordPress-native internationalisation — All user-facing strings use the
blippinz-ai-seotext domain and are ready for translation.
Configuration
After activation, go to Settings Blippinz AI SEO to configure:
Blippinz API Key
The secret key that must be included in every request to the addPost endpoint. Use a long, random string (e.g. a UUID or 32-character random hex string). This key is stored in the WordPress options table and is never exposed in the front-end.
Max Upload Size (MB)
Maximum file size allowed for image uploads via this plugin. Range: 1–50 MB. The effective limit is also capped by your server’s PHP upload_max_filesize setting.
Allowed File Types
Choose which MIME types are accepted for image uploads. Available options: JPEG, PNG, GIF, WEBP, PDF.
REST API Reference
Base URL
https://yoursite.com/wp-json/blipaise/v1
Authentication
All requests to the addPost endpoint must be authenticated. There are two methods:
Method 1 — HTTP Header (recommended):
X-BLIPAISE-KEY: your-secret-api-key
Method 2 — Query parameter:
?api_key=your-secret-api-key
Requests with a missing, empty, or incorrect key will receive a 401 Unauthorized response.
WordPress administrators logged in via cookie/nonce (e.g. from the WP admin) can also call the endpoint without an API key, provided they have the edit_posts capability.
Endpoints
GET /status
Returns the plugin status. Requires edit_posts capability (logged-in WordPress users only).
Response:
{
"status": "ok",
"plugin": "blippinz-ai-seo",
"version": "1.0.0"
}
POST /addPost
Creates a new WordPress post. Accepts JSON or multipart/form-data.
Request Headers:
Content-Type: application/json
X-BLIPAISE-KEY: your-secret-api-key
JSON Body Parameters:
Field
Type
Required
Description
title
string
Yes
The post title. Sanitised with sanitize_text_field.
content
string
Yes
The post body. Full HTML is accepted and sanitised with wp_kses_post.
status
string
No
Post status. One of: publish, draft, pending, private. Defaults to publish.
featured_media
integer
No
The attachment ID of an existing media library item to use as the featured image.
image_data
string
No
A base64-encoded image to upload and set as the featured image. May include a data URI prefix (e.g. data:image/jpeg;base64,...).
image_mime
string
No
The MIME type of the image_data image. Defaults to image/jpeg. Must be in your configured allowlist.
Example request (JSON with base64 image):
curl -X POST "https://yoursite.com/wp-json/blipaise/v1/addPost" \
-H "Content-Type: application/json" \
-H "X-BLIPAISE-KEY: your-secret-api-key" \
-d '{
"title": "10 SEO Tips That Actually Work in 2024",
"content": "<h2>Introduction</h2><p>Search engine optimisation has changed...</p>",
"status": "publish",
"image_data": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
"image_mime": "image/jpeg"
}'
Example request (multipart file upload):
curl -X POST "https://yoursite.com/wp-json/blipaise/v1/addPost" \
-H "X-BLIPAISE-KEY: your-secret-api-key" \
-F "title=My Article" \
-F "content=<p>Body content here.</p>" \
-F "status=publish" \
-F "file=@/path/to/image.jpg"
Success Response (200 OK):
{
"status": "ok",
"plugin": "blippinz-ai-seo",
"version": "1.0.0",
"post_id": 42,
"link": "https://yoursite.com/10-seo-tips-that-actually-work-in-2024/",
"uploaded_media_id": 17,
"uploaded_media_url": "https://yoursite.com/wp-content/uploads/2024/06/blipaise-20240622-120000.jpg"
}
Error Responses:
HTTP Code
Error Code
Cause
400
blipaise_invalid_payload
Request body is empty or not valid JSON
400
blipaise_missing_fields
title or content is empty
400
blipaise_invalid_file_type
Uploaded file MIME type is not in the allowlist
400
blipaise_file_too_large
Uploaded file exceeds the configured size limit
400
blipaise_invalid_image_data
image_data is not valid base64 content
400
blipaise_upload_failed
WordPress file system error during upload
401
—
Missing or incorrect API key
Installation
From the WordPress Admin (recommended):
- Go to Plugins Add New in your WordPress dashboard.
- Search for Blippinz AI SEO.
- Click Install Now, then Activate.
- Navigate to Settings Blippinz AI SEO and configure your API key.
Manual installation:
- Download the plugin ZIP file.
- Extract and upload the
blippinz-ai-seofolder to/wp-content/plugins/on your server. - Go to Plugins in your WordPress dashboard and click Activate next to Blippinz AI SEO.
- Navigate to Settings Blippinz AI SEO and set a strong, unique API key.
Important: The REST endpoint will reject all API-key-authenticated requests until you have saved a key in the settings page.
FAQ
-
The endpoint returns 401. What’s wrong?
-
Make sure you have saved an API key in Settings Blippinz AI SEO and that you are sending it exactly as saved — either in the
X-BLIPAISE-KEYheader or as theapi_keyquery parameter. The key comparison is case-sensitive. -
Can I send HTML in the content field?
-
Yes. The
contentfield is processed through WordPress’swp_kses_post(), which allows safe post HTML including headings, paragraphs, lists, links, images, tables, and inline styles. Script tags and event attributes are stripped. -
What happens to the uploaded image?
-
The image is decoded (if base64) and written to the WordPress uploads directory, then registered as a Media Library attachment and set as the post’s featured image. It is treated identically to any image uploaded via the WordPress media uploader.
-
Can I use this without the Blippinz platform?
-
Yes — the plugin is a general-purpose authenticated REST endpoint for post creation. Any HTTP client or script can call it with the correct API key.
-
How do I rotate or reset the API key?
-
Go to Settings Blippinz AI SEO, enter a new key, and click Save Settings. Old keys are immediately invalidated.
-
Does uninstalling the plugin delete my posts?
-
No. Posts created via this plugin are standard WordPress posts and remain after uninstalling. However, the plugin’s stored options (API key and upload settings) are deleted from the database on uninstall.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Blippinz AI SEO” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Blippinz AI SEO” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial public release.
- Registered
POST /wp-json/blipaise/v1/addPostendpoint with API key authentication. - Registered
GET /wp-json/blipaise/v1/statusendpoint (requiresedit_postscapability). - Admin settings page for API key and upload configuration (max size, allowed MIME types).
- Base64 image upload support with automatic Media Library registration and featured image assignment.
- Multipart file upload support (keys:
file,image,featured_image,featured_media). - MIME type validation using
wp_check_filetype_and_extagainst server-side file inspection. - Full input sanitisation on all fields using native WordPress functions.
- Plugin options deleted on uninstall to prevent credential leakage.