AI Story Generator

Generate story based on mode, topic and genre

Try Demo

Endpoints

  1. Endpoint: POST request to "https://api.magicapi.dev/api/v1/capix/story/generate/story/v1/".

  2. Headers:

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

    • x-magicapi-key: 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:

Request Body (JSON):

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.

Code Examples

It returns response like this

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