AI Story Generator

Generate story based on mode, topic and genre


Endpoints

  1. Endpoint: POST request to "https://www.capix.uz/v2/generate/story/".

  2. Headers:

    • Content-Type: Specifies the format of the request body, which is application/json.

    • token: The API key for authentication. Replace "API_KEY" with your actual API key.

  3. Request Body:

    • Format: JSON

    • Parameters:

      • mode: Specifies the mode of story generation. In this case, it's set to "Creative".

      • text: The text providing details about the story to be generated. This includes the story topic, setting, main characters, plot details, resolution, and themes.

      • word_count: Specifies the desired word count for the generated story, set to 1200 in this example.

      • story_genre: Specifies the genre of the story. In this case, it's set to "Mystery".

  4. Authentication: The API requires an API key (token) for authentication.

Here's the documentation based on the provided cURL command:


Story Generation API Documentation

Endpoint:

POST https://www.capix.uz/v2/generate/story/

Headers:

Content-Type: application/json
token: YOUR_API_KEY

Request Body (JSON):

jsonCopy code{
  "mode": "Creative",
  "text": "Story Topic: A Time-Travel Adventure Setting: The story is set in both the present day and the Victorian era. The present-day setting is a bustling modern city known for its technological advancements. The Victorian setting is characterized by cobblestone streets, gas-lit lamps, and the early stages of industrialization. Main Characters: Alex: A curious and adventurous software engineer from the present day who inadvertently discovers a time-travel device. Eliza: A resourceful and intelligent Victorian-era inventor who dreams of changing the future. Plot Details: Discovery of the Time Machine: Alex discovers an old, mysterious device in their attic, left behind by a forgotten ancestor. Experimenting with it, they accidentally activate it and are transported to the Victorian era. Meeting Eliza: Alex meets Eliza, who is fascinated by the time machine and Alex's futuristic knowledge. Together, they explore the possibilities of time travel. A Threat Emerges: A sinister figure from the Victorian era learns about the time machine and wants to use it for nefarious purposes, threatening both the past and the future. Race Against Time: Alex and Eliza must work together to safeguard the time machine and prevent the alteration of history. They face challenges in both eras, blending elements of Victorian society with futuristic technology. Resolution: The story concludes with a thrilling confrontation, and a decision that affects both characters' destinies. Themes: The story explores themes of adventure, the ethics of time travel, the impact of technology on society, and the timeless nature of human curiosity and ambition.",
  "word_count": 1200,
  "story_genre": "Mystery"
}

Request Parameters:

  • mode: Specifies the mode of story generation.

  • text: Details about the story, including topic, setting, characters, plot, resolution, and themes.

  • word_count: Desired word count for the generated story.

  • story_genre: Genre of the story.

Authentication:

This API requires an API key (token) for authentication.

Code Examples

curl -X POST "https://www.capix.uz/v2/generate/story/" \
     -H "Content-Type: application/json" \
     -H "token: API_KEY" \
     -d '{
           "mode": "Creative",
           "text": "Story Topic: A Time-Travel Adventure Setting: The story is set in both the present day and the Victorian era. The present-day setting is a bustling modern city known for its technological advancements. The Victorian setting is characterized by cobblestone streets, gas-lit lamps, and the early stages of industrialization. Main Characters: Alex: A curious and adventurous software engineer from the present day who inadvertently discovers a time-travel device. Eliza: A resourceful and intelligent Victorian-era inventor who dreams of changing the future. Plot Details: Discovery of the Time Machine: Alex discovers an old, mysterious device in their attic, left behind by a forgotten ancestor. Experimenting with it, they accidentally activate it and are transported to the Victorian era. Meeting Eliza: Alex meets Eliza, who is fascinated by the time machine and Alex\'s futuristic knowledge. Together, they explore the possibilities of time travel. A Threat Emerges: A sinister figure from the Victorian era learns about the time machine and wants to use it for nefarious purposes, threatening both the past and the future. Race Against Time: Alex and Eliza must work together to safeguard the time machine and prevent the alteration of history. They face challenges in both eras, blending elements of Victorian society with futuristic technology. Resolution: The story concludes with a thrilling confrontation, and a decision that affects both characters\' destinies. Themes: The story explores themes of adventure, the ethics of time travel, the impact of technology on society, and the timeless nature of human curiosity and ambition.",
           "word_count": 1200,
           "story_genre": "Mystery"
         }'

Data values

  • You can explain the story on the topic parametr

  • Word Count is the max word count of the story. Max 2000 is received.

  • Writing Mode could be either: Standard, Complex, Creative, Simple

  • Story Genre could be eighter: science fiction, mystery, fantasy, descriptive

Last updated