---
title: "Generate Story"
method: POST
path: "/api/mcp/generate_story"
tags: ["mcp"]
---

# Generate Story

`POST /api/mcp/generate_story`

## Request

- Base URL: `https://writer.swapp1990.org` (the document declares no server; this is the origin it was published from)
- URL: `https://writer.swapp1990.org/api/mcp/generate_story`
- Auth: none declared

Kick off a new story — planner + characterizer run in the background.

Status state machine:
  pending → in_progress → reviewing → in_progress → completed

By default the job settles at 'reviewing' so the caller can edit
the outline/cast via update_outline / update_characters and then
call start_writing. Pass auto_approve=true to skip review and go
straight to 'completed'.

Terminal statuses: completed, failed, cancelled. Use
wait_for_status to block until one is reached instead of polling
get_job_status manually.

## Request body

- GenerateStoryInput
  - `premise` string, required: The premise for the new story.
  - `chapter_count` integer, required: The number of chapters to generate.
  - `target_words_per_chapter` integer, nullable: Target word count per chapter.
  - `nsfw` boolean: Content-rating metadata; does not override client safety policies.
  - `model` string, nullable: Model override (e.g. 'grok-4').
  - `auto_approve` boolean: If true, skip the review stage: the planner auto-chains into characterizer and directly into the chapter writer. Removes the need for a follow-up start_writing call when you don't want to review or edit the outline/cast first. Job settles at 'completed' on success.

## Response `200`

Successful Response

- StoryMutationResponse
  - `job_id` string, nullable
  - `status` string, nullable
  - `story_url` string, nullable
  - `chapter` integer, nullable
  - `kind` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api.md) · [All operations](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/revisions/ce5e2a89ab4d?raw)
