Ai Story Generator
Playground
Try it on WavespeedAI!AI Story Generator creates stories from a theme or idea with customizable genre, length, perspective, audience, and format. Ready-to-use REST inference API, no coldstarts, affordable pricing.
Features
AI Story Generator
AI Story Generator turns your ideas into fully-formed stories — instantly. Give it a theme, pick a genre, and watch a complete narrative unfold. Whether you need a bedtime fairy tale, a sci-fi thriller, or a romantic drama, this AI has a story for every occasion.
Why Choose This?
-
Idea to story in seconds Drop in a theme or concept, and get a complete, polished story back. Writer’s block? Never heard of her.
-
Any genre you want Fantasy, romance, mystery, sci-fi, thriller, horror, comedy — name your flavor.
-
Customizable length Quick 500-word flash fiction or an immersive 3,000-word tale. You decide.
-
Choose your perspective First person for intimacy, third person for scope, second person for that choose-your-own-adventure vibe.
-
Audience-aware Kid-friendly fairy tales, edgy teen drama, or mature adult fiction — tailored to your readers.
-
Multiple formats Short stories, fables, fairy tales, scripts, and more.
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| prompt | Yes | — | Your story idea, theme, or concept |
| genre | No | auto | fantasy, romance, mystery, sci-fi, thriller, horror, comedy… |
| length | No | medium | short (~500 words), medium (~1500), long (~3000) |
| narrative_perspective | No | auto | first person, second person, third person |
| audience | No | auto | children, teens, adults |
| format | No | auto | short story, fairy tale, fable, script, and more |
How to Use
- Enter your idea — a theme, concept, character, or scenario. Be vague or specific — AI adapts.
- Pick your settings — genre, length, perspective, audience, format. Or leave on auto and let AI decide.
- Generate — click and watch your story come to life.
- Enjoy — read, edit, share, or use as inspiration.
Pricing
| Output | Cost |
|---|---|
| Per story | $0.035 |
Best Use Cases
- Creative writing — Overcome writer’s block or spark new ideas.
- Bedtime stories — Custom tales for kids, starring whoever you want.
- Content creation — Blog posts, social media stories, marketing narratives.
- Education — Teaching story structure, genre conventions, or creative writing.
- Entertainment — Generate stories for fun, games, or reading aloud.
- Screenwriting practice — Get script-format output to study dialogue and pacing.
- Gift ideas — Personalized stories featuring friends or family members.
Pro Tips
- The more specific your prompt, the more tailored your story. “A dragon” vs “A shy dragon who runs a bakery” — big difference.
- Let AI pick the genre if you want to be surprised.
- Use “children” audience for clean, wholesome content.
- Try “script” format for dialogue-heavy output.
- Generate multiple stories from the same prompt — each one will be unique.
Notes
- Prompt is the only required field.
- All other parameters default to “auto” or “medium” if not specified.
- Stories are original AI-generated content.
- Perfect for inspiration — feel free to edit and make it your own.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/ai-story-generator" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"genre": "auto",
"length": "medium",
"narrative_perspective": "auto",
"audience": "auto",
"format": "auto"
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Story theme or idea. | |
| genre | string | No | auto | auto, fantasy, romance, mystery, sci-fi, thriller, horror, comedy, drama, adventure | Story genre. |
| length | string | No | medium | short, medium, long | Story length: short (~500 words), medium (~1500 words), long (~3000 words). |
| narrative_perspective | string | No | auto | auto, first person, second person, third person | Narrative perspective. |
| audience | string | No | auto | auto, children, teens, adults | Target audience. |
| format | string | No | auto | auto, short story, fairy tale, fable, script, poem, letter | Story format. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |