Socket
Book a DemoInstallSign in
Socket

strapi-plugin-ai-generated-field

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-plugin-ai-generated-field

A Strapi plugin that provides an AI-generated field allowing automatic content generation using AI models. Ideal for filling text fields like titles, descriptions, or summaries with context-aware suggestions.

latest
Source
npmnpm
Version
5.0.2
Version published
Maintainers
1
Created
Source

Strapi AI Generated Field Plugin

This plugin adds AI-generated text suggestions to Strapi content management using Google's Gemini API.

Features

  • AI-powered text suggestions for content fields
  • Integration with Google's Gemini API
  • Custom settings page to configure API tokens
  • Dynamic prompt field that appears only when a token is configured

Installation

Version Compatibility

  • For Strapi 5:

    # Latest version works with Strapi 5
    npm i strapi-plugin-ai-generated-field
    
    # or using yarn
    yarn add strapi-plugin-ai-generated-field
    
  • For Strapi 4:

    # Specific version for Strapi 4 compatibility
    npm install strapi-plugin-ai-generated-field@4.0.0
    
    # or using yarn
    yarn add strapi-plugin-ai-generated-field@4.0.0
    

Important: Make sure to use version 4.0.0 if you're running Strapi 4. Users on Strapi 5 can use the latest version.

Configuration

  • After installing the plugin, access the plugin settings through the main menu
  • Add your Google Gemini API token
  • Test the connection using the test field

How to Get a Gemini API Token

  • Visit Google AI Studio
  • Log in with your Google account
  • Create a new API key
  • Copy the key and paste it in the plugin settings

Usage

  • Add the "Ai Generated Field" field type to your content types
  • When editing content, click on the field to activate the AI prompt
  • Enter a descriptive prompt about what content you need
  • Click "Generate" to get AI suggestions
  • Click on a suggestion to use it in your content

Field Configuration

The Ai Generated Field field works as a standard text field with additional AI capabilities.

// Example content-type configuration
{
  attributes: {
    description: {
      type: 'ai-text',
      options: {
        description: 'Enter product description or use AI to generate one'
      }
    }
  }
}

Security Notes

  • API tokens are stored in Strapi's secure configuration storage
  • Tokens are never exposed to frontend users
  • All API requests are made server-side for security

Troubleshooting

  • If the AI prompt field doesn't appear, check that you've configured a valid API token
  • If generation fails, verify your token is correct and has not expired
  • Check your network connection if requests time out
  • Make sure you're using the correct plugin version for your Strapi version (4.0.0 for Strapi 4, latest for Strapi 5)

FAQs

Package last updated on 15 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.