---
title: "Auto-optimize an article"
method: POST
path: "/v3/cms/articles/{slug}/auto-optimize"
tags: ["CMS"]
---

# Auto-optimize an article

`POST /v3/cms/articles/{slug}/auto-optimize`

Returns an AI-optimized version of the article content based on selected audit issues, keywords, and prompts. Charges a flat credit cost derived from the article's word count.

## Path parameters

- `slug` string, required

## Request body

- object
  - `teamId` string
  - `keywords` string[]
  - `prompts` string[]
  - `selectedIssues` string[]

## Response `200`

Success: `{ queued: true, jobId, creditEstimate }` — the job is enqueued; poll `GET /articles/:slug/auto-optimize/status` until `status` is `done` or `failed`. Insufficient credits: `{ queued: false, requiredCredits, message }`.

- object — Success: `{ queued: true, jobId, creditEstimate }` — the job is enqueued; poll `GET /articles/:slug/auto-optimize/status` until `status` is `done` or `failed`. Insufficient credits: `{ queued: false, requiredCredits, message }`.
  - `queued` boolean
  - `jobId` string
  - `creditEstimate` number
  - `requiredCredits` number
  - `message` string
  - `alreadyRunning` boolean

## Other responses

- `400` — Default Response
- `402` — Default Response
- `404` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/snowseo/apis/snowseo-api.md) · [All operations](https://skmtc.net/snowseo/apis/snowseo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/snowseo/snowseo-api/versions/8f92b00b75d6/schema)
