Skip to content

Sergon10/calliope-bots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calliope-Sora Bot ✨

Calliope-Sora is a command-line tool that automates AI image generation using your own ChatGPT account. It uses Puppeteer to control Chrome, so you can programmatically exploit the daily generation limit directly on your Windows PC via ChatGPT’s image generation feature (in the chat itself).


How It Works

Calliope-Sora launches Chrome with your user profile (where you’re already logged into ChatGPT) and simulates your actions to request images. All images are generated by your account—so any limits or restrictions of your ChatGPT plan apply. By reusing your login session, the bot avoids requiring API keys, but you must configure your environment correctly.


Prerequisites

Before installing, ensure you have:

  1. Node.js (v14 or later)
    Download and install from nodejs.org.

  2. Google Chrome
    The bot is tested on Chrome for Windows. Make sure it’s installed.

  3. ChatGPT Plus Account (recommended)
    Plus users get ~120 image generations per 24 hours. The bot will run on a free plan but may hit rate limits more often.


Installation

Open PowerShell or CMD and install globally:

npm install -g calliope-bots

This makes the calliope-sora command available system-wide.


Setup and Configuration (One-Time)

  1. Create a working folder. Choose or create a directory for your sessions, for example:

    C:\Users\<YOUR_WINDOWS_USERNAME>\Desktop\CalliopeBotWorkspace
    
  2. Create config.json. In that folder, add a file named config.json:

    {
      "chromeExecutablePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
      "chromeUserDataDir": "C:\\Users\\<YOUR_WINDOWS_USERNAME>\\AppData\\Local\\Google\\Chrome\\User Data",
      "downloadsDir": "C:\\Users\\<YOUR_WINDOWS_USERNAME>\\Downloads\\CalliopeBot_Downloads",
      "outputsDir": "C:\\Users\\<YOUR_WINDOWS_USERNAME>\\Desktop\\CalliopeBot_Outputs"
    }
    • Replace <YOUR_WINDOWS_USERNAME> with your actual Windows user name.

    • If Chrome is installed elsewhere, update "chromeExecutablePath".

    • "downloadsDir": The temporary folder where Chrome will save images. The bot will move files from here. the"outputsDirDir": The final folder for your generated images. This path must be different from downloadsDir.

    • Replace <YOUR_WINDOWS_USERNAME> with your actual Windows user name.

    • If Chrome is installed elsewhere, update "chromeExecutablePath".

    • The "downloadsDir" is where images will be saved; the bot will create it if it doesn’t exist.

  3. Create prompts.json. In the same folder, add prompts.json containing an array of prompt objects:

    [
      {
        "positivePrompt": "An astronaut surfing on Saturn’s rings, watercolor style.",
        "negativePrompt": "text, watermark, realistic"
      },
      {
        "positivePrompt": "A red fox reading a book in a glowing mushroom forest at night.",
        "negativePrompt": "darkness, scary, people"
      }
    ]

    Each object represents one image:

    • positivePrompt: what you want in the image.
    • negativePrompt: what to avoid.

Usage: Generate Your Images

  1. Close Chrome completely. Ensure no Chrome windows are open so the bot can launch with your profile.

  2. Open a terminal in your working folder.

    cd C:\Users\<YOUR_WINDOWS_USERNAME>\Desktop\CalliopeBotWorkspace
  3. Run the bot:

    calliope-sora <path_to_prompts.json> <content_type> "<image_style>"
    • <path_to_prompts.json>: path to your prompts.json (e.g., ./prompts.json).
    • <content_type>: video (16:9) or short (9:16).
    • "<image_style>": (optional) a quoted phrase describing the overall style (e.g., "Ghibli style, pastel colors"). If omitted, no extra style is added.

Example:

calliope-sora .\prompts.json video "Studio Ghibli style, pastel colors, concept art"

The bot will generate images one by one, saving them in the outputsDir folder as:

1_calliopeBot_image.png
2_calliopeBot_image.png
…

If an error occurs, a screenshot named error-screenshot.png will be saved in the current directory.


What to Expect / Current Capabilities

  • Sequential Generation: Processes prompts one at a time, downloading a single image per prompt.

  • Speed: Each image may take a few seconds to a minute, depending on ChatGPT’s response time and your network.

  • Error Handling & Retries:

    • Detects rate limit messages and waits as instructed.
    • On policy refusals, it can retry up to 10 times with exponential backoff (up to ~30 min).
    • If retries fail, the bot stops and alerts you.
  • Resource Usage: Chrome runs visibly. Do not interfere with it. Chrome may use significant CPU/memory during generation.


Troubleshooting (FAQ)

  • calliope-sora not recognized Ensure you installed globally (-g). Restart your terminal if needed.

  • config.json not found Run the command from the folder containing config.json (cd into it).

  • Chrome launch failure Verify the chromeExecutablePath in config.json and close any open Chrome windows. If a parent directory contains a package.json: add an empty package.json in the working folder to prevent npx from changing the cwd (config.json not found error).

  • Not logged into ChatGPT The bot uses your saved session. Manually log in via Chrome and ensure chromeUserDataDir points to the correct profile folder.

  • Hit rate limit On Plus you get ~120 images/day. The bot will wait and retry automatically when possible. Free accounts have lower limits.

  • Policy violation errors If a prompt is blocked, try rephrasing it. The bot will attempt compliance but won’t override core content rules.

  • Image not saved The bot waits up to 10 s for each download. Check your downloadsDir and folder permissions. Successful images are moved to outputsDir.


Contributing & Feedback

Contributions and issues are welcome via the repository. Note: This project is not affiliated with OpenAI. Use responsibly and in accordance with OpenAI’s terms.

About

Puppeteer bots for chat-gpt automatic interactions without API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors