Skip to content

About

Local image generation queue and gallery for ChatGPT plans and OpenAI, with MCP agent access

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-queue: local AI image generation queue and gallery

image-queue: a local AI image generation queue and gallery for Codex, OpenAI and MCP agents

Apache 2.0 Local-first MCP Node.js 24+ Security

Generate AI images with your Codex plan or an OpenAI API key, and keep every prompt, reference and version in one local gallery. image-queue runs on your machine, saves images to your own folders, and lets coding agents request images through MCP.

image-queue gallery showing example images in a local project

Install

Requires Node.js 24+ and pnpm 10.28.2. Tested on macOS (Apple silicon) only. Linux, Windows and Intel Macs are untested and not supported yet. Local Codex execution also requires Codex CLI 0.167.1+, signed in with ChatGPT. Version 0.167.1 is the tested baseline.

git clone https://github.com/corgicorner/image-queue.git
cd image-queue
pnpm install --frozen-lockfile
pnpm build
pnpm start

Then:

  1. Open http://127.0.0.1:3215.
  2. Create a project.
  3. In Settings, add your OpenAI API key, or choose Resume for Codex queue in Processing for your signed-in Codex installation.
  4. Write a prompt and generate.

Prefer to let an agent do it? See Set up with an agent.

Queue processing

Open Settings → Processing to pause both local sources, control Codex and OpenAI API separately, or change their parallel limits. Running images finish when you pause. Resuming all preserves each source’s own pause. Default source applies to new requests. Explicit API requests use the configured OpenAI key and may incur charges.

Each source continues with other requests after an individual failure. Under Processing limits, set a failure count and a window in minutes to stop after repeated failures, for example 5 different requests in 60 minutes. A count of 0 disables this threshold. Authentication and usage limits can stop the source immediately. Check the affected image before retrying an uncertain result.

The local dashboard processes API jobs saved by the panel and by MCP, including after an app restart. Keep the dashboard running and the Mac awake. Agents can inspect both executors using get_queue_processing and adjust the same settings using set_queue_processing.

Two ways to generate images

OpenAI API key Codex plan
Best for The fastest start Using the access you already pay for
Setup Paste a key in Settings Set up local Codex execution
How it works Your prompt goes straight to the image model A local executor sends each request to Codex
Cost Billed by OpenAI per image Included in your plan, within its limits

ChatGPT Pro or Business subscriber? You may have monthly API credits you can spend on image generation. Claim them, then create a key in the linked organization. Unused credits expire each billing cycle.

How the queue works

Add a request and image-queue starts it as soon as a slot is free, up to the Parallel requests limit. Keep the image-queue server running and your Mac awake while generating. Sleep suspends local execution; closing the server or shutting down the Mac stops it. The browser tab can be closed. An empty queue does not wake the model. Pause stops new requests and lets running images finish. If a verified plan limit is reached, waiting requests resume after its reset. Interrupted generations need your review before retrying.

No cron setup is needed for local execution. The older scheduled Codex chats remain an advanced compatibility option; see Codex workers.

What you get

  • A local gallery. Images, prompts and references stay in project folders on your disk.
  • A queue. Requests wait safely while workers are offline.
  • Reference image editing. Drop a PNG, JPEG or WebP into the prompt, or open a result and use Next version.
  • Version stacks. Every revision stays next to the image it came from.
  • Agent access. Any MCP client can request images and get file paths back.

image-queue image preview with the prompt and next version controls

Connect your coding agent (MCP)

pnpm build:mcp

Copy the MCP configuration from Settings into Claude Code, Codex or another MCP client. The agent can then request images and read results as local file paths.

Choose the default for new requests in Settings → Default source, or use MCP get_generation_source and set_generation_source. An explicit source on a request overrides the default for that request. Changing the default does not move existing jobs or resume a paused queue. API requests use separately billed API credit.

The optional image-queue skill explains references, source selection and error recovery for agents. Reference images must be PNG, JPEG or WebP; style documents belong in text instructions. Before retrying an uncertain result, inspect the retained output and the recovery details returned by MCP.

Use it from your phone: deploy to Cloudflare

You can also run your own private copy on Cloudflare and add it as a remote MCP server in the Claude apps (web, desktop and phone), Claude Code or Codex. Cloudflare Access protects the panel and the MCP endpoint, and generation uses your image API key. It costs 5 USD per month for Workers Paid plus API usage. pnpm cloudflare:setup --domain app.example.com --email you@example.com sets everything up; see Cloudflare deployment.

claude mcp add --transport http image-queue https://app.example.com/api/mcp
codex mcp add image-queue --url https://app.example.com/api/mcp && codex mcp login image-queue

In claude.ai or Claude Desktop, add the same URL under Settings → Connectors → Add custom connector; it also appears in the Claude mobile app.

Set up with an agent

Give a local agent terminal access to the folder where you want image-queue, then paste:

Set up https://github.com/corgicorner/image-queue in this folder.
Read its README and AGENTS.md. Check Node.js 24+ and pnpm, install, build the app
and the MCP server, and start the dashboard on loopback. Add the local MCP
configuration to this agent and verify list_projects. Keep any existing projects,
queue and credentials. I will enter my API key in Settings myself.

FAQ

Can I generate images with my existing Codex plan?

Yes. Follow the Codex worker setup and choose Codex queue in the prompt editor. The application must stay running. Choose Resume in Settings to start the local executor. Parallel requests sets how many images can run at once; Pause preserves that setting. Availability and limits depend on your account. See current Codex limits.

Is image-queue free?

The software is free and open source. Generation is not unlimited: the Codex queue uses your plan's allowance, and API usage is billed by OpenAI unless credits cover it.

How do I edit an image from a reference?

Drop an image into the prompt editor and describe the change. To revise a result, open it and use Next version. Each request is a new image, not a chat, so write the full instruction.

Where are my images and keys stored?

Images and references live in your project folders. API keys are kept in the macOS Keychain or a private credential file. Only the prompt and the references you attach are sent to the provider.

Current limits

The supported deployment is local on macOS (Apple silicon). Cloudflare deployment is experimental.

  • Tested on macOS (Apple silicon) only. Codex queue and Keychain storage have not been verified on other platforms.
  • Tested models: GPT Image 2.6 Flare and GPT Image 1.5, at 1024 × 1024, with reference editing.
  • Only models with a verified size profile appear in the model list.
  • References: PNG, JPEG or WebP, up to 20 MB.
  • Interrupted paid requests are not retried automatically.
  • The Cloudflare deployment runs API generation only; the Codex queue stays local.
  • Not included yet: multi-machine sync, video, Windows and Linux support.
  • Some OpenAI accounts need organization verification before using image models.

More

Configuration · Cloudflare deployment · Codex workers · Contributing · Security

Licensed under Apache 2.0.

About

Local image generation queue and gallery for ChatGPT plans and OpenAI, with MCP agent access

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages