Skip to content

Queue Sora prompts locally and auto-submit when generation slots are available (respects Sora limits).

License

Notifications You must be signed in to change notification settings

tyhallcsu/sora-prompt-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ Sora Prompt Queue

Chrome Extension Manifest V3 Version 1.1.0 MIT License

Queue multiple Sora prompts and auto-submit them when generation slots become available.

Features โ€ข Installation โ€ข Usage โ€ข How It Works โ€ข Troubleshooting


๐ŸŽฏ The Problem

Sora limits you to 3 concurrent video generations. When you have multiple ideas, you're stuck waiting and manually submitting each prompt one by one.

โœจ The Solution

This extension lets you queue up unlimited prompts locally and automatically submits them as soon as a generation slot opens up. Set it and forget it.


๐Ÿš€ Features

Feature Description
๐Ÿ“ฅ Prompt Queue Add unlimited prompts to a local queue
โšก Auto-Submit Automatically submits when active tasks < 3
๐Ÿ” Token Capture Automatically captures auth tokens from manual generations
โฐ Daily Limit Detection Pauses gracefully when credits exhausted, shows reset countdown
๐Ÿ’พ Persistent Storage Queue survives page reloads and browser restarts
๐Ÿ–ฅ๏ธ Multi-Tab Aware Coordinates across tabs to prevent double-submissions
๐Ÿ› Debug Mode Built-in debug panel for troubleshooting

๐Ÿ“ฆ Installation

From Source (Developer Mode)

  1. Download this repository (Code โ†’ Download ZIP) or clone it:

    git clone https://github.com/YOUR_USERNAME/sora-prompt-queue.git
  2. Open Chrome and navigate to chrome://extensions/

  3. Enable Developer Mode (toggle in top right corner)

  4. Click "Load unpacked" and select the extension folder

  5. Navigate to sora.chatgpt.com โ€” the queue panel will appear!


๐ŸŽฎ Usage

First-Time Setup

  1. Go to sora.chatgpt.com
  2. The queue panel appears in the bottom-right corner
  3. Generate one video manually โ€” this captures the auth token
  4. Once Token: โœ… appears, you're ready to queue!

Adding Prompts

Method How
Queue Panel Type prompt โ†’ Select orientation โ†’ Click "Add to Queue"
Floating Button Enter prompt in Sora's input โ†’ Click ๐Ÿ“ฅ Queue button
Keyboard Shortcut Enter prompt in Sora's input โ†’ Press Ctrl+Shift+Q

Controls

Button Action
โ–ถ๏ธ / โธ๏ธ / โน๏ธ Play / Pause / Stop automation
๐Ÿ› Toggle debug panel
โž– Minimize panel
โฌ†๏ธ โฌ‡๏ธ Reorder queue items
โŒ Remove from queue
๐Ÿ”‘ Manually set token (for testing)
๐Ÿ”„ Refresh status

Status Indicators

Indicator Meaning
Token: โœ… Ready to auto-submit
Token: โŒ Generate once manually to capture token
MAIN: โœ… API execution working
Ctrl: โœ… This tab is controlling submissions
Active: 2/3 2 of 3 generation slots in use

โš™๏ธ How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Background Service Worker                   โ”‚
โ”‚  โ€ข Captures tokens via chrome.webRequest                    โ”‚
โ”‚  โ€ข Executes API calls in page context (MAIN world)          โ”‚
โ”‚  โ€ข Coordinates multi-tab controller selection               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ†•๏ธ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Content Script                           โ”‚
โ”‚  โ€ข Manages queue UI panel                                   โ”‚
โ”‚  โ€ข Controls automation (poll every 5s, submit when ready)   โ”‚
โ”‚  โ€ข Persists queue to chrome.storage.local                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Token Capture

When you generate a video manually, the extension intercepts the request headers and captures the openai-sentinel-token. This token is stored in session storage (auto-clears when browser closes) and reused for queued submissions.

Rate Limit Handling

Limit Type Detection Action
Concurrent (3 active) too_many_concurrent_tasks Requeue, backoff, retry
Daily Credits rate_limit_exhausted Stop automation, show countdown

๐Ÿ”ง Configuration

Edit content_script.js to customize:

const CONFIG = {
  POLL_INTERVAL_MS: 5000,        // Poll every 5 seconds
  SUBMIT_COOLDOWN_MS: 2000,      // Min time between submissions
  MAX_CONCURRENT_TASKS: 3,       // Sora's limit
  BACKOFF_BASE_MS: 10000,        // Retry backoff
  DEBUG: true                    // Console logging
};

๐Ÿ› Troubleshooting

Token won't capture (stays โŒ)
  1. Make sure you're on sora.chatgpt.com
  2. Generate at least one video manually using Sora's native button
  3. Check DevTools Console โ†’ filter by SoraQueue
  4. Look for: [SoraQueue:BG] Captured token (length=XXX)
Submissions keep failing
  1. Clear token (๐Ÿ”‘ Clear) and regenerate manually
  2. Check if daily limit reached (panel will show countdown)
  3. Verify you're logged in to OpenAI
  4. Enable debug panel (๐Ÿ›) to see detailed status
Panel doesn't appear
  1. Refresh the page
  2. Check extension is enabled at chrome://extensions/
  3. Check for errors in DevTools Console
"Extension context invalidated" errors

This happens when the extension updates while tabs are open. Just reload the page.


๐Ÿ”’ Privacy & Security

  • โœ… Tokens stored in session โ€” auto-clears when browser closes
  • โœ… No external requests โ€” only communicates with sora.chatgpt.com
  • โœ… No data collection โ€” prompts stay local in your browser
  • โœ… Token values never logged โ€” only length for debugging
  • โœ… Open source โ€” audit the code yourself

๐Ÿ“ Project Structure

sora-prompt-queue/
โ”œโ”€โ”€ manifest.json        # Extension manifest (MV3)
โ”œโ”€โ”€ background.js        # Service worker (token capture, API execution)
โ”œโ”€โ”€ content_script.js    # UI panel, queue management, automation
โ”œโ”€โ”€ styles.css           # Panel styling
โ”œโ”€โ”€ popup.html           # Extension popup
โ”œโ”€โ”€ popup.js             # Popup logic
โ”œโ”€โ”€ icons/
โ”‚   โ”œโ”€โ”€ icon16.png
โ”‚   โ”œโ”€โ”€ icon48.png
โ”‚   โ””โ”€โ”€ icon128.png
โ””โ”€โ”€ README.md

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


โš ๏ธ Disclaimer

This extension is not affiliated with OpenAI. It interacts with Sora in ways that may not be officially supported. Use responsibly:

  • OpenAI may change their API at any time
  • Excessive automated requests could affect your account
  • This tool enhances legitimate use, not circumvent limits

Made with โค๏ธ for Sora creators who have too many ideas

Try Sora โ€ข Report Bug โ€ข Request Feature

About

Queue Sora prompts locally and auto-submit when generation slots are available (respects Sora limits).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published