> ## Documentation Index
> Fetch the complete documentation index at: https://lightsage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Content

> Generate drafts, finalize articles, and retrieve content from the Lightsage CLI.

Content commands generate and manage AI-written articles. Draft and finalize operations consume credits.

## Commands

| Command | Description |
| - | - |
| `lightsage content drafts create` | Generate and save a draft article. |
| `lightsage content finalize --content-id <content_id>` | Rewrite a draft into final content. |
| `lightsage content retrieve --content-id <content_id>` | Retrieve a content record. |

## Create a draft

```bash theme={null}
lightsage content drafts create \
  --title "Getting started with the Acme API" \
  --topic-name "onboarding" \
  --description "Tutorial for first-time API users" \
  --prompt-texts "How do I authenticate?" \
  --prompt-texts "How do I send my first request?"
```

`--prompt-texts` is repeatable. The response includes the new content record with its ID, title, markdown body, slug, and status.

## Finalize content

```bash theme={null}
lightsage content finalize --content-id content_123
```

Rewrites the draft into publish-ready content and updates its status.

## Retrieve content

```bash theme={null}
lightsage content retrieve --content-id content_123
```

Returns the content record by ID, including title, markdown body, slug, and status.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.