# Presets API

> Create, read, edit, duplicate and test-run presets — the same generator settings used by the XBeast app.

Source: https://xbeast.io/docs/api-presets

Presets are the generator settings behind XBeast's automated posts: source (AI, web search, YouTube, X rewrite, X news, link, list, article), output format, prompt, style, image settings and more. The API exposes the same fields as the preset editor in the app.

> **Read-only keys can list and read presets**
>
> Create, update, delete, duplicate and test-run require a full-access key. Generation consumes credits.

## Preset object

```json
{
  "id": "84f1c2a0-…",
  "title": "Tesla News",
  "preset_type": "xbeast",
  "text_type": "x-news",
  "tweet_format": "thread",
  "img_type": "recommend",
  "llm_prompt": "Write about Tesla from a builder's perspective.",
  "x_news_search_query": "Tesla",
  "style_id": "f3a9…",
  "is_community": false,
  "used_by_account_ids": ["123456789"],
  "credit_cost": 3,
  "created_at": "2026-11-28T10:00:00.000Z",
  "updated_at": "2026-11-28T10:00:00.000Z"
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | — | Preset id. |
| title | string | — | Display name. |
| preset_type | string | — | xbeast (AI generator) or api (API preset). |
| text_type | string | — | ai, search, youtube, x, x-news, list or article. |
| tweet_format | string | — | tweet, thread, long, article or same. |
| img_type | string | — | recommend, list, search, youtube, tiktok, ai, ai-auto, off or none. |
| credit_cost | number | — | Credits one generated post from this preset costs. |
| is_community | boolean | — | Community presets are read-only; duplicate them to customize. |
| used_by_account_ids | string[] | — | Accounts whose schedules reference this preset. |

### List presets

**`GET /api/v1/presets`**

#### Query

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| include_community | boolean | No | Also return community presets you can duplicate. |
| search | string | No | Filter by title. |
| limit | number | No | Default 20, max 100. |
| offset | number | No | Pagination offset. |

```bash
curl "https://xbeast.io/api/v1/presets?include_community=true&search=tesla" \
  -H "Authorization: Bearer xb_live_YOUR_KEY"
```

### Create a preset

**`POST /api/v1/presets`**

Only `title` is required. Defaults: `text_type: "ai"`, `img_type: "recommend"`, `tweet_format: "tweet"`. The plan preset limit is enforced.

**Body**

```json
{
  "title": "Tesla News",
  "text_type": "x-news",
  "tweet_format": "thread",
  "x_news_search_query": "Tesla",
  "llm_prompt": "Write from a builder's perspective."
}
```

### Get a preset

**`GET /api/v1/presets/:id`**

### Update a preset

**`PATCH /api/v1/presets/:id`**

Send any subset of the generator fields. Community presets cannot be edited — call `POST /presets/:id/duplicate` first.

### Delete a preset

**`DELETE /api/v1/presets/:id`**

The preset is removed from any schedules that reference it. Destructive and cannot be undone.

### Duplicate a preset

**`POST /api/v1/presets/:id/duplicate`**

Copy a community preset (or your own) into your workspace. Optional body: `{ "title": "My Tesla preset" }`.

### Test-run a preset

**`POST /api/v1/presets/:id/generate`**

Generates one post and saves it to history. Consumes the preset's credit cost. Optional body: `account_id` (required for X news and other account-scoped sources) and `day_of_week`.

```bash
curl -X POST "https://xbeast.io/api/v1/presets/P_RESET_ID/generate" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "account_id": "YOUR_ACCOUNT_ID" }'
```

Response: `{ data: { post, preset_id, tweets, article_title, credits_used } }`.

## Related

- [Attach the preset to a weekly schedule](https://xbeast.io/docs/api-schedules.md)
- [Writing styles used by presets](https://xbeast.io/docs/api-styles.md)
- [Manage presets from an AI agent over MCP](https://xbeast.io/docs/mcp.md)

[Schedules](https://xbeast.io/docs/api-schedules.md)
