Binapi – Secure REST API for Automated Content & Image Creation

Hi Grav Community,

I’m excited to share a new plugin I’ve developed: binapi – a secure, configurable REST API for Grav CMS that makes it easy to automate content and image creation.

What is binapi?

binapi lets you create articles and upload images to your Grav site through authenticated API endpoints. It’s perfect for integrating with automation tools like n8n, Zapier, or your own scripts. You can control permissions, require authentication (via Grav Login or a Bearer token), and configure which folders are used—all from the Grav Admin Panel.

Key Features

  • Create articles via REST API
  • Upload images via REST API
  • Dual authentication: Grav session or Bearer token
  • Configurable permissions: Enable/disable folder, article, and image creation
  • Designed for automation: Works great with n8n, Zapier, and more

Example Use Cases

  • Connect n8n or Zapier to auto-post content from other sources
  • Build your own mobile or desktop publishing tools
  • Automate image uploads for media-heavy sites

Get Started

Feedback & Contributions

I’d love your feedback, suggestions, and contributions!
If you have questions or run into issues, feel free to open an issue on GitHub or reply here.

Thanks, and happy automating!
—Johnny

Nice one, Thanks for sharing.

Docs on Github are pretty good. What stops me trying this is that you don’t provide much detail on use cases. What can you build with this and how does that benefit users or editors? Can you describe what you’ve built on this as example(s)? Which problem were you trying to overcome when you decided to build this plugin?

Hi there!

Here’s how I use binapi in my own project:

  • I have an n8n workflow that leverages AI nodes to research trending topics, generate articles, and create image generation prompts.
  • The workflow formats the AI-generated article for Grav, downloads the AI-generated image, converts it to base64, and then pushes both the article and image to my Grav site using binapi.
  • This results in perfectly structured articles being automatically published to my Grav site—no manual intervention required.

Some practical use cases for binapi include:

  • Automated content curation: Pipe in multiple RSS feeds, have an AI node analyze trending topics, generate fresh articles and images, and publish them automatically to Grav.
  • Personal news aggregator: Like me, you can have your workflow collect news articles, filter out ads and paywalls, rewrite the content, and publish it to a private Grav site for distraction-free reading.
  • Bulk publishing: Use arrays in n8n to generate and publish as many articles as you want, on any schedule.
  • Integration with other platforms: Connect Zapier, Make, or custom scripts to push content from Google Docs, Notion, other sources directly into Grav.
  • Editorial automation: Automatically generate drafts for editors to review or set up scheduled publishing pipelines.
  • Media management: Automate image and asset uploads for galleries, portfolios, or news sites.
1 Like

Here is one I am playing with this weekend. My wife has hundreds of recipes on notecards from her grandmother. I scanned all of the notecards and will create a workflow to push the recipe card images through AI. The AI node pulls the recipes off of the note card images, formats it, generates a cute sketch image of the meal and pushes the recipes and images to a grav site. Now she has a perfectly formatted website with all of her recipes that is easily sortable and searchable.

I will create a front end with input fields so she can paste future recipes and publish them to her recipe site. Also a search function if she finds a recipe she likes, she can click it and have the workflow/grav format it and publish to her site.

1 Like