# Article AI

> Only when the user explicitly asks for Xholic's article AI. Queues an outline, full draft, selection rewrite/expand/shorten, titles, conclusion, teaser post or thread, or an AI cover image. Price depends on kind and model. Uses Xholic AI credits: quote first and pass confirmCredits after the user agrees. Read the result with articles.get. Otherwise write the text yourself.

`articles.ai_run` · write

- **MCP tool:** `articles_ai_run`. Catalog: reach it with `find_actions` and `run_write_action`, or turn on the full toolset.
- **REST:** `POST /v1/articles/ai-run`
- **CLI:** `xholic articles ai-run`
- **Scope:** `write`
- **Plan:** Pro plan or higher
- **Cost:** Xholic AI: up to about 150 credits (Xholic's article AI; the quote shows the price for the chosen kind and model). Returns a quote first; pass `confirmCredits` after the user agrees.
- **Rate limit bucket:** `write`

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | Yes | Article id from articles.list. |
| `kind` | "OUTLINE" \\| "FULL_ARTICLE" \\| "REWRITE_SELECTION" \\| "EXPAND_SELECTION" \\| "SHORTEN_SELECTION" \\| "TITLE_SUGGESTIONS" \\| "CONCLUSION" \\| "TEASER_POST" \\| "TEASER_THREAD" \\| "COVER" \\| "COVER_EDIT" | Yes |  |
| `model` | "luna" \\| "terra" \\| "sol" | No | luna fast, terra balanced (default), sol deep. |
| `instructions` | string ≤ 4000 chars | No |  |
| `selectedText` | string ≤ 20000 chars | No | Required for REWRITE_SELECTION, EXPAND_SELECTION and SHORTEN_SELECTION. |
| `coverStyle` | "surprise_me" \\| "editorial" \\| "minimal" \\| "bold_typography" \\| "illustration" | No |  |
| `sourceAssetId` | string (uuid) | No | Required for COVER_EDIT: the cover to edit. |
| `idempotencyKey` | string ≤ 120 chars | Yes | A unique key for this run so a retry never queues it twice. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `confirmCredits` | number 0–100000 | No | Xholic AI credits the user agreed to spend. Call first without it to get the quote, show the quote to the user, and pass the amount only after they say yes. |
| `quoteId` | string ≤ 100 chars | No | The quoteId from the quote the user agreed to. Send it with confirmCredits. |
