Browse ModelsWavespeed AIAI Story Generator

Ai Story Generator

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

ParameterRequiredDefaultDescription
promptYesYour story idea, theme, or concept
genreNoautofantasy, romance, mystery, sci-fi, thriller, horror, comedy…
lengthNomediumshort (~500 words), medium (~1500), long (~3000)
narrative_perspectiveNoautofirst person, second person, third person
audienceNoautochildren, teens, adults
formatNoautoshort story, fairy tale, fable, script, and more

How to Use

  1. Enter your idea — a theme, concept, character, or scenario. Be vague or specific — AI adapts.
  2. Pick your settings — genre, length, perspective, audience, format. Or leave on auto and let AI decide.
  3. Generate — click and watch your story come to life.
  4. Enjoy — read, edit, share, or use as inspiration.

Pricing

OutputCost
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

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Story theme or idea.
genrestringNoautoauto, fantasy, romance, mystery, sci-fi, thriller, horror, comedy, drama, adventureStory genre.
lengthstringNomediumshort, medium, longStory length: short (~500 words), medium (~1500 words), long (~3000 words).
narrative_perspectivestringNoautoauto, first person, second person, third personNarrative perspective.
audiencestringNoautoauto, children, teens, adultsTarget audience.
formatstringNoautoauto, short story, fairy tale, fable, script, poem, letterStory format.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction, the ID of the prediction to get
data.modelstringModel ID used for the prediction
data.outputsstringArray of URLs to the generated content (empty when status is not completed).
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2025 WaveSpeedAI. All rights reserved.