Skip to main content

AI Content Assist

AI Content Assist lets you use large language models to generate blog drafts, SEO metadata, excerpts, and translations directly inside the admin dashboard. It connects to a provider of your choice and keeps your API key encrypted at rest.

info

AI Content Assist is a site module. It must be enabled during site creation or in your site's module settings before it appears in the dashboard.

Supported Providers

Forja ships with presets for popular providers. You can also point it at any OpenAI-compatible endpoint.

ProviderDefault Base URLDefault ModelAPI Key Required
OpenAIhttps://api.openai.comgpt-4o-miniYes
Anthropic (Claude)https://api.anthropic.comclaude-sonnet-4-20250514Yes
Google Geminihttps://generativelanguage.googleapis.com/v1beta/openaigemini-2.0-flashYes
Mistralhttps://api.mistral.aimistral-small-latestYes
LM Studiohttp://localhost:1234(auto-detect)No
Ollamahttp://localhost:11434(auto-detect)No
Custom(you provide)(you provide)Configurable

Local providers (LM Studio, Ollama, or any localhost URL) do not require an API key.

Setting Up AI

  1. Navigate to Site Settings > AI Assist tab (visible only when the AI module is enabled).
  2. Select a Provider from the preset dropdown, or choose Custom and enter your own base URL.
  3. Enter your API Key if the provider requires one. The key is encrypted with AES-256-GCM before storage and never displayed in full again.
  4. Choose a Model. Available models are automatically discovered from your provider when the page loads. You can also type a model name manually.
  5. Click Save.
tip

After saving, click Test Connection to verify that Forja can reach your provider and the API key is valid. The test sends a minimal prompt and reports success or failure.

info

Any Admin or Site-Owner can change the selected model — you don't need to re-enter the API key. Forja securely reuses the stored encrypted key for model discovery.

Configuration Options

Basic Settings

SettingDescription
ProviderThe AI service to use. Selecting a preset auto-fills the base URL and default model.
Base URLThe API endpoint. Auto-filled for presets, editable for custom providers.
API KeyYour provider's secret key. Encrypted at rest, masked in the UI after saving.
ModelThe model to use for generation. Free-text or select from discovered models.

Default Settings

The Default Settings section controls the baseline configuration applied to all AI tasks unless overridden:

SettingDefaultDescription
Temperature0.7Controls randomness (0 = deterministic, 2 = very creative).
Max Tokens1,024Maximum length of generated output (1 -- 16,384).

Per-Task Configuration

Each AI task can override the default model, temperature, max tokens, and system prompt. Expand a task's accordion to configure it individually:

TaskDescriptionVision
SEO GenerationGenerate meta titles and descriptions from blog contentNo
Excerpt GenerationCreate concise summaries of blog postsNo
TranslationTranslate content to other localesNo
Draft OutlineGenerate a structured outline for a new postNo
Draft PostGenerate a full draft from an outline or topicNo
Auto-TagAutomatically suggest tags for imagesYes
Alt TextGenerate descriptive alt text for imagesYes

Fields left empty inherit the global defaults. A Custom chip indicates when a task has overrides.

tip

Use a fast, inexpensive model (e.g. gpt-4o-mini) for high-volume tasks like tagging and SEO, and a more capable model (e.g. gpt-4o) for drafting and translation.

info

Leave system prompt fields empty to use Forja's built-in defaults. When you provide a custom prompt, it fully replaces the default -- Forja does not merge them.

AI Capabilities

Blog Draft Generation

Create a full blog post from an idea in three steps:

  1. Describe your idea -- enter a topic, angle, or key points you want to cover.
  2. Review the outline -- Forja generates a title, subtitle, and structured outline. You can edit, reorder, add, or remove points before proceeding.
  3. Generate the post -- Forja writes the full Markdown body, excerpt, and SEO metadata from your approved outline. Review and edit the result before saving.

The same AI-assisted workflow is available from:

  • The Create Blog wizard (select AI Assist as the creation method)
  • The Quick Post dialog (toggle from Write to AI Assist)

SEO Metadata Generation

On the blog editor's SEO tab, click Generate SEO to produce a meta title (max 60 characters) and meta description (max 160 characters) from your post's content.

info

The button is disabled until your post body has at least 50 characters of content.

Excerpt Generation

On the blog editor's SEO tab, click Generate Excerpt to produce a concise 1 -- 2 sentence summary of your post. The same 50-character minimum applies.

AI-Powered Translation

When your site has multiple locales, the blog editor toolbar shows an AI Translate button:

  1. Click AI Translate and select a Target Locale.
  2. Click Suggest Translation -- Forja translates all fields (title, subtitle, excerpt, body, meta title, meta description) in one request.
  3. Review the translation preview. Each field has a refresh button to re-translate that field individually.
  4. Click Apply to populate the target locale's fields with the translated content.

Translations preserve Markdown formatting and respect field-specific constraints (e.g. meta title length).

Vision Models — Auto-Tag and Alt Text

When you configure a vision-capable model (e.g. gpt-4o, any Claude model, or gemini-2.0-flash), Forja can analyze images in your media library.

Generating Alt Text

  1. Open any image in the Media section.
  2. In the detail dialog, find the AI Vision section.
  3. Click Generate Alt Text — Forja sends the image to your vision model and returns a concise 1-2 sentence description suitable for screen readers.
  4. Review and edit the result, then save.

Auto-Tagging Images

  1. Open any image in the Media section.
  2. Click Auto Tag — Forja generates 5-15 descriptive tags based on the image content.
  3. Tags appear as chips that you can review.
info

Vision actions use the model configured for the Auto-Tag or Alt Text task. If no per-task model is set, the global default is used. Make sure your default or task-specific model supports vision (most modern models do).

API Key Security

  • Keys are encrypted with AES-256-GCM before being stored in the database.
  • The encryption key is derived from the AI_ENCRYPTION_KEY environment variable (base64-encoded, 32 bytes).
  • The API response always returns a masked key (e.g. sk-123...abcd) -- the full key is never sent back to the client.
  • Deleting the AI configuration removes the encrypted key from the database entirely.

Module Gating

When the AI module is disabled for a site:

  • The AI Assist tab is hidden from Site Settings.
  • AI generation buttons (SEO, excerpt, translate, draft) do not appear in the blog editor.
  • AI endpoints return 403 Forbidden for generation requests.
  • Configuration endpoints (GET/PUT/DELETE config, test, models) remain accessible to admins, so you can set up the provider before enabling the module.

Removing the Configuration

  1. Navigate to Site Settings > AI Assist.
  2. Click Remove Configuration at the bottom of the page.
  3. Confirm the action in the dialog.

This deletes the provider configuration and encrypted API key. AI features are disabled until you configure a new provider. No previously generated content is affected.

Permissions

ActionRequired Role
View / modify AI configurationAdmin
Test provider connectionAdmin
Discover modelsAuthor+
Generate content (SEO, excerpt, draft, translate)Author
Vision actions (auto-tag, alt-text)Author