for ai
npm install payload-ai-wixmax-test

The Payload AI Plugin is an advanced extension that integrates modern AI capabilities into your Payload CMS, streamlining content creation and management.
> β οΈ Important: This plugin is in active development. We're doing our best to improve its features and functionality. Please be prepared for regular updates; at the moment, the plugin has only been tested with Payload version v3.2.1.
>
> To give it a try, we recommend using Payload's website template.
---
- Installation
- Usage
- Configuration
- Setup Guide
- Contributing
Rock your Payload project with a single command:
``bash`
pnpm add @ai-stack/payloadcms
Config with ease:
`javascript
// Add below in payload.config.ts
import { buildConfig } from 'payload/config';
import { payloadAiPlugin } from '@ai-stack/payloadcms';
export default buildConfig({
plugins: [
payloadAiPlugin({
collections: {
[Posts.slug]: true,
},
debugging: false,
disableSponsorMessage: false
}),
],
// ... your existing Payload configuration
});
// Add below in Lexical Editor field config
import { PayloadAiPluginLexicalEditorFeature } from '@ai-stack/payloadcms'
fields: [
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ rootFeatures }) => {
return [
// ... your existing features
HeadingFeature({ enabledHeadingSizes: ['h1', 'h2', 'h3', 'h4'] }),
InlineToolbarFeature(),
HorizontalRuleFeature(),
OrderedListFeature(),
UnorderedListFeature(),
BlockquoteFeature(),
PayloadAiPluginLexicalEditorFeature() // Add this line
]
},
}),
},
]
`
To get started, choose your preferred AI model by setting one or more of the following environment variables. Create a .env file in your project root and add any of the following keys:
``
OPENAI_API_KEY=your-openai-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
ELEVENLABS_API_KEY=your-elevenlabs-api-key
For detailed guidance on personalizing and configuring the plugin to match your needs, check out the Complete Guide. It walks you through every step, from setting up fields to generating amazing content!
> β οΈ Note: Custom fields don't fully adhere to the Payload schema, making it difficult to determine which components support injecting ComposeField as a Description.
> If AI enabled fields don't display Compose settings, please manually add the following component path:
>
> @ai-stack/payloadcms/fields#ComposeFielddebugging` flag in your plugin config or check your server startup logs.
>
> To view AI enabled fields, enable the
Innovators: welcome! We're always excited to expand our community and hear fresh ideas. Whether youβre here to share feedback, suggest features, or contribute code, weβd love to have you on board.
Feel free to create a pull request with your ideas, improvements, or bug fixes. No contribution is too small, and every bit helps us grow!
Join the conversation on Payload's Discord and letβs build something amazing together! πβ¨