---
title: AI Services
version: AI Services 0.2.x
updated: 2026-11-24
---

# AI Services

**AI Services** (`ironcms/ai`) is optional and independent from the [IronCMS Content API](content-api.html). It lets the site itself ask an AI provider for analysis; it never writes, edits or publishes articles.

## Overview

| | |
|---|---|
| Providers | OpenAI (Responses), Anthropic Claude (Messages), xAI Grok (Chat Completions) |
| Tasks | Comment moderation, Blog article SEO review |
| Keys | Entered in **Admin → AI Services**, stored encrypted, never shown again. Chat subscriptions are not API keys |
| Safety | Observation mode by default; optional automatic spam placement only at ≥0.98 estimated confidence; no approval, deletion or editing by AI |
| Limits | Per-task daily attempt quota, 25 s provider timeout, one job at a time, max 1,000 queued |
| Privacy | Only comment text/article title, or article title/description/body are sent; e-mail and phone patterns are masked best-effort. Account, e-mail, IP and session data are not sent |

## Setup

1. Enable **AI Services** in **Modules**.
2. Open **AI Services**, enter the provider API key (password confirmation required).
3. For each task choose provider, model id, daily limit and confirm external processing consent. Start in observation mode with a small limit.
4. Add a scheduler that runs every minute as the site user:

```bash
php spark ironcms:ai:work 5
```

Without a scheduler the AI Services page processes the queue in the background while it is open.

Results (spam verdicts, SEO suggestions) appear in the comment moderation queue and on the AI Services page. Review them before acting; AI output is a suggestion, not a decision.
